New menu items#83
Merged
Merged
Conversation
- Refactored the routing constants to improve organization and maintainability, separating routes into distinct categories (root, foundation, collection, admin). - Added a new script in package.json to start a local PostgreSQL service for development convenience. - Updated various components to utilize the new route structure, ensuring consistent link generation across the application. - Improved category handling in queries to include links for easier navigation.
- Added a new setting to `.vscode/settings.json` to disable pinning to Prisma 6. - Updated the `RootLayout` component in `layout.tsx` to include a `data-scroll-behavior` attribute for smoother scrolling. - Removed an unnecessary blank line in `routes.ts` for cleaner code.
- Added a new entry for local documentation in .gitignore to exclude the .docs/ directory. - Deleted the outdated DB_DRIFT_FIX.md file, which is no longer relevant to the project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to category and route handling throughout the app, as well as a renaming of the "Documents" section to "Ephemera". The main focus is on centralizing and standardizing route definitions, ensuring that category links are consistently generated and used, and updating related UI and metadata logic. Additionally, the sitemap generation and several navigation components are updated to use the new route structure. Some developer tooling and minor UI changes are also included.
Routing and Category Link Refactoring
constants/routes.ts, introducing category-specific routes and a newisRouteKeytype guard for safer route handling. (constants/routes.tsconstants/routes.tsL1-R54)linkproperty from category objects instead of string concatenation, including in navigation, breadcrumbs, and after actions like deletion. (e.g.app/(home)/page.tsx[1]app/(pages)/brands/[slug]/page.tsxapp/(pages)/brands/[slug]/page.tsxR52-R63,app/(pages)/collection/items/[slug]/components/breadcrumbs.tsxapp/(pages)/collection/items/[slug]/components/breadcrumbs.tsxL37-R42,app/(pages)/collection/items/[slug]/components/delete-barometer/delete-barometer.tsxapp/(pages)/collection/items/[slug]/components/delete-barometer/delete-barometer.tsxL41-R40,app/(pages)/collection/items/[slug]/page.tsxapp/(pages)/collection/items/[slug]/page.tsxL84-R88, app/(pages)/collection/items/[slug]/page.tsxL113-R117, [2]"Documents" to "Ephemera" Renaming
app/(pages)/admin/page.tsx[1]app/(pages)/ephemera/DocumentTable.tsx[2]app/(pages)/ephemera/[cat-no]/page.tsxapp/(pages)/ephemera/[cat-no]/page.tsxL82-R82, app/(pages)/ephemera/[cat-no]/page.tsxL258-R260)Sitemap and Metadata Improvements
app/sitemap.ts[1] [2] [3]linkproperty for canonical URLs. (app/(pages)/collection/categories/[...category]/page.tsxapp/(pages)/collection/categories/[...category]/page.tsxL26-R27, app/(pages)/collection/categories/[...category]/page.tsxL37-R37)Developer Experience and Minor UI Enhancements
package.jsonpackage.jsonR14-R18)data-scroll-behaviorattribute for smooth scrolling. (components/containers/header/mobile-menu.tsx[1]app/layout.tsx[2].vscode/settings.json.vscode/settings.jsonL23-R24)