Closed
Conversation
lorenyu
commented
Apr 30, 2025
| layout "component_preview" | ||
|
|
||
| def default | ||
| render template: "application/_breadcrumbs", locals: { crumbs: [ |
Collaborator
Author
There was a problem hiding this comment.
render partial: "application/breadcrumbs" not supported by lookbook so use render template: and remember to prefix with _ and set layout to "component_preview" to get rid of application layout
lorenyu
commented
Apr 30, 2025
|
|
||
| <li class="usa-nav__primary-item"> | ||
| <%= render partial: "language-toggle", locals: { container_class: "display-block desktop:display-none relative" } %> | ||
| <%= render partial: "application/language-toggle", locals: { container_class: "display-block desktop:display-none relative" } %> |
Collaborator
Author
There was a problem hiding this comment.
We need to explicitly set partial paths rather than rely on Rails fallback behavior. This is probably better practice anyways, easier to read/find things for the reader
lorenyu
commented
Apr 30, 2025
Collaborator
Author
There was a problem hiding this comment.
Mostly a copy of application.html.erb except without the application header/footer
Collaborator
Author
|
Thanks for the review @LeslieJAnderson , I added the doc in navapbc/template-application-rails#100 per your suggestion |
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.
Ticket
Resolves navapbc/template-application-rails#93
Changes
Context for reviewers
Add Lookbook. Took a while to get something working since Lookbook docs don't make it clear:
partial:template:explicitly inrendermethod (cannot just pass a string to render) which they claim is possible from the examples in their documentationTesting
Tested locally and also in the preview environment which you can see here
Preview environment for app
♻️ Environment destroyed ♻️
Preview environment for app-rails
♻️ Environment destroyed ♻️