Remove website modal and use cookbook detail routes#2312
Merged
Conversation
- replace cookbook recipe/example modal views with dedicated detail pages - add legacy #file cookbook hash redirects to canonical routes - remove modal component/runtime and associated CSS and stale page references Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ca1a64ec-678f-45ac-ba68-33a37717398a
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces cookbook modals with canonical recipe detail pages and redirects legacy cookbook hashes.
Changes:
- Adds cookbook recipe detail routes with file browsing.
- Replaces modal buttons with direct links and legacy redirects.
- Removes modal components, runtime, and styles.
Show a summary per file
| File | Description |
|---|---|
website/src/styles/global.css |
Removes modal styles. |
website/src/scripts/pages/samples.ts |
Adds legacy hash redirects. |
website/src/scripts/pages/samples-render.ts |
Links cards to detail routes. |
website/src/scripts/modal.ts |
Removes modal runtime. |
website/src/pages/learning-hub/cookbook/index.astro |
Removes cookbook modal. |
website/src/pages/learning-hub/cookbook/[cookbook]/[language]/[recipe].astro |
Adds recipe detail page. |
website/src/pages/index.astro |
Removes homepage modal. |
website/src/integrations/pagefind-resources.ts |
Removes obsolete search hashes. |
website/src/components/Modal.astro |
Removes modal component. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 2
- Review effort level: Medium
| return Astro.redirect("/learning-hub/cookbook/"); | ||
| } | ||
|
|
||
| const { markdownHtml } = readResourceMarkdown(variant.doc); |
Comment on lines
+948
to
950
| .hidden { | ||
| display: none; | ||
| } |
| return Astro.redirect("/learning-hub/cookbook/"); | ||
| } | ||
|
|
||
| const { markdownHtml } = readResourceMarkdown(variant.doc); |
Comment on lines
+169
to
+174
| <FileBrowser | ||
| files={files} | ||
| primaryPath={variant.doc} | ||
| primaryName={variant.doc.split("/").pop() ?? variant.doc} | ||
| primaryHtml={markdownHtml} | ||
| githubBase={GITHUB_BASE} |
Comment on lines
+948
to
950
| .hidden { | ||
| display: none; | ||
| } |
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.
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com
Copilot-Session: ca1a64ec-678f-45ac-ba68-33a37717398a
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.