New docs layout + remove Extensions#1248
Conversation
Greptile SummaryThis PR introduces a dedicated
Confidence Score: 3/5Not safe to merge until the stale extensions route is removed from routes.rb One P1 bug (orphaned route pointing to a deleted controller) makes the /extensions path broken at runtime; everything else looks solid config/routes.rb — extensions resource route must be removed Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant InertiaController
participant DocsController
participant DocsLayout
Browser->>InertiaController: GET /docs (or /docs/*)
InertiaController->>DocsController: route match
DocsController->>DocsController: inertia_share docs_nav (docs_nav_props)
DocsController-->>Browser: Inertia response with docs_nav prop
Browser->>DocsLayout: render layout(docs_nav)
DocsLayout->>DocsLayout: isActive(href) via docs_nav.current_path
DocsLayout-->>Browser: sidebar + main with children
Note over Browser,DocsLayout: Mobile: toggleNav() / closeNav() via button clicks, resize, Escape key
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated documentation layout (with a persistent sidebar) and removes the “Extensions” page from the app navigation and codebase.
Changes:
- Add
DocsLayoutand switch Docs pages to use it via Svelte module layout exports. - Add shared
docs_navprops fromDocsControllerto power sidebar navigation. - Remove the Extensions page/controller/helper and replace the nav link with “Setup”.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| app/javascript/pages/Extensions/Index.svelte | Removes the Extensions index page. |
| app/javascript/pages/Docs/Show.svelte | Adopts DocsLayout and refactors docs article/breadcrumb/footer markup. |
| app/javascript/pages/Docs/Index.svelte | Adopts DocsLayout and updates docs landing page layout/styling. |
| app/javascript/layouts/DocsLayout.svelte | Adds a new docs-specific layout with responsive sidebar navigation. |
| app/javascript/layouts/AppLayout.svelte | Updates link caching logic after removing Extensions from nav. |
| app/helpers/extensions_helper.rb | Removes now-unused helper module. |
| app/controllers/inertia_controller.rb | Replaces Extensions nav link with Setup. |
| app/controllers/extensions_controller.rb | Removes Extensions controller. |
| app/controllers/docs_controller.rb | Shares docs_nav via Inertia for the new docs sidebar. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| href={docs_nav.github_url} | ||
| target="_blank" | ||
| rel="noopener" | ||
| onclick={handleNavLinkClick} | ||
| class={resourceLinkClass} |
| target="_blank" | ||
| rel="noopener" | ||
| onclick={handleNavLinkClick} | ||
| class={resourceLinkClass} | ||
| > |
| <a | ||
| href={edit_url} | ||
| target="_blank" | ||
| rel="noopener" |
| rel="noopener" | ||
| class="text-primary hover:underline">#hackatime-help on Slack</a | ||
| > | ||
| <a | ||
| href="https://github.com/hackclub/hackatime/issues" | ||
| target="_blank" | ||
| rel="noopener" |
| rel="noopener" | ||
| class="text-primary hover:underline">#hackatime-help on Slack</a | ||
| > | ||
| <a | ||
| href="https://github.com/hackclub/hackatime/issues" | ||
| target="_blank" | ||
| rel="noopener" |
| links << inertia_link("Projects", my_projects_path, active: request.path.start_with?("/my/projects"), inertia: true) | ||
| links << inertia_link("Docs", docs_path, active: helpers.current_page?(docs_path) || request.path.start_with?("/docs"), inertia: true) | ||
| links << inertia_link("Extensions", extensions_path, active: helpers.current_page?(extensions_path), inertia: true) | ||
| links << inertia_link("Setup", my_wakatime_setup_path, active: helpers.current_page?(my_wakatime_setup_path), inertia: true) |
| </nav> | ||
| </aside> | ||
|
|
||
| <main class="min-h-dvh flex-1 transition-all duration-300 ease-in-out lg:ml-72"> |
No description provided.