1 commit
fix(generateChangeLog): update branch reference to main for commits
Why: The previous branch reference was set to "hellosketch," which may have been outdated or incorrect. This could lead to fetching the wrong set of commits when generating the changelog.
What: Updated the branch reference from "hellosketch" to "main" in the GenerateChangeLogUseCase.ts
file. This change ensures that the application fetches commits from the currently active main branch.
How: The modification was made in the section of code responsible for defining GitHub repository details. By changing the string value assigned to the branch
variable, the code now correctly points to the main branch for fetching commit data.
9 commits
feat(editor): add drag-and-drop functionality for scene reordering
Why: Enhancing user experience by allowing users to reorder scenes via drag-and-drop increases the flexibility of the editor. Previously, users could not change the order of scenes intuitively, which could hinder workflow efficiency.
What: Integrated the react-beautiful-dnd
library to implement drag-and-drop functionality in the EditorShell
component. Users can now reorder scenes directly within the table of contents, which automatically updates the state and saves changes without manual intervention.
How:
DragDropContext
and utilized Droppable
and Draggable
components to manage drag-and-drop operations.handleDragEnd
function to handle the reordering logic, updating the magnetron document's scenes array and saving the updated document automatically after a drag operation.This change significantly improves the interactivity of the editor and provides a more dynamic way for users to manage their scenes.
fix(changelog): correct spelling in publish-changelog script
Why: The existing script name for generating the changelog contained a typo, which could lead to confusion and potential errors when attempting to execute the command.
What: Updated the key command in the package.json
from GenerateChangeLog
to GenerateChangelog
for consistency.
How: This change only modified the string in the publish-changelog
script section, ensuring that it correctly references the intended function as it is defined in the codebase.
feat(changelog): enhance changelog management and UI updates
Why: To improve the functionality of the changelog generation process and enhance the user experience by providing a clearer distinction for current and past months in the UI.
What:
publish-changelog
to automate changelog generation in the build process.How:
Dockerfile
to include the new publish-changelog
script execution during the build process.isCurrentMonth
in [month-year].tsx
that checks if the changelog displayed is for the current month, modifying the heading accordingly to improve user clarity.GenerateChangelog.ts
script to set the default date range for changelog generation, dynamically calculated to focus on recent changes rather than a broader historical range.chore(docker): remove unnecessary network configurations from services
Why: The previous configuration included a dedicated network for the services which was unnecessary as the default bridge network suffices for container communication. This simplification helps streamline the Docker setup.
What:
networks
section for each service in the docker-compose.yml
file.magnetron-network
definition from the networks
section since it was no longer being used.How: Adjusted the docker-compose.yml
file by deleting the relevant lines related to the custom network, ensuring that the services continue to operate under the default Docker networking settings. This change reduces complexity and improves maintainability of the Docker configuration.
feat(sitemap): streamline sitemap generation with changelog integration
Why: The previous implementation generated a sitemap based on questions and markdown services, which limited the site's visibility for static pages and changelog entries. We needed to enhance the sitemap by including relevant URLs for improved SEO and user accessibility.
What: This update refactors the GenerateSitemapUseCase
to focus on generating a sitemap that includes static pages and changelog URLs. The QuestionRepo
and MarkdownService
dependencies were removed in favor of the ChangeLogRepo
, simplifying the use case's responsibility.
How:
ChangeLogRepo
retrieves unique changelog months, allowing the addition of URLs for both the main changelog page and individual month pages.feat(changelog): improve commits handling and safety checks
Why: Previously, the code did not robustly handle cases where the commits
array might not exist or be of an unexpected type, potentially leading to errors when rendering the changelog.
What: Introduced a helper function getCommitsArray
to ensure safe access to the commits
array. This function returns an empty array if the provided commits
is not an array, thus preventing runtime errors during display.
How: The function is used throughout the ChangelogMonth
component to safeguard against undefined or non-array commits when calculating lengths and mapping through commits. Additionally, the changes in GetChangelogsByMonthUseCase
ensure that the commits
are always an array, improving reliability in how changelogs are processed and displayed.
feat(changelog): enhance commit display with improved styling and structure
Why: To improve the user experience when viewing the changelog by providing better visual separation and clarity for each commit entry.
What: This update includes adjustments to the spacing between commit entries, the addition of commit index labels, and a visual separator for better organization. The changes make the commit list more readable and visually appealing.
How:
space-y-4
to space-y-6
for greater separation.feat(changelog): implement automated changelog generation, storage, and display functionality with monthly overview and commit details.
feat(changelog): add automated changelog generation and storage
Why: To enhance our project’s documentation and tracking of changes, we needed a systematic way to generate changelogs. Manual updates were prone to errors and missed details, so an automated solution is essential for accuracy and efficiency.
What: Implemented a comprehensive changelog feature that captures commits within a specified date range. This includes:
How: Developed a new GenerateChangeLogUseCase
class that:
ChangeLog
aggregate root and associated mapper and repo for handling database interactions.GenerateChangelog
runner class.3 commits
feat(admin): implement FlyWheels management page and database changes
Why: To provide a user interface for managing Fly Wheels and their configurations, including the ability to view and edit Fly Wheel properties. This change addresses the need for a frontend component to handle Fly Wheel records effectively.
What:
pages/admin/fly-wheels.tsx
) for displaying Fly Wheels, handling loading states, and displaying error messages.slug
column to the FlyWheel
table.ChangeLog
table for tracking changes.FlyWheel
model in schema.prisma
to include the new slug
field.FlyWheelRepo
to replace the findByAdminOrCreate
method with findBySlugOrCreate
to align with the new data structure.GetAllFlyWheelsUseCase
to retrieve all Fly Wheel records and format them for the frontend.How:
Risks/Trade-offs:
slug
field may require existing Fly Wheel records to be updated to avoid null constraint violations. Migration scripts were carefully crafted to ensure table integrity.ChangeLog
table adds complexity but supports future auditing needs.Testing:
Add FlyWheel aggregate, mapper, and repository implementation.
Add FlyWheel model and corresponding migration SQL script to the Prisma schema.