Skip to content

Add Lookbook#100

Merged
lorenyu merged 1 commit intomainfrom
lorenyu/lookbook
May 1, 2025
Merged

Add Lookbook#100
lorenyu merged 1 commit intomainfrom
lorenyu/lookbook

Conversation

@lorenyu
Copy link
Copy Markdown
Contributor

@lorenyu lorenyu commented May 1, 2025

Ticket

Resolves #93

Changes

  • Add lookbook gem and related dependencies
  • Add ENABLE_LOOKBOOK environment variable, defaulting to true in local and dev environment
  • Mount lookbook if ENABLE_LOOKBOOK is set
  • Add component_preview layout for previewing partials without application header/footer
  • Add breadcrumb preview
  • Make partial paths explicit

Context for reviewers

Add Lookbook. Took a while to get something working since Lookbook docs don't make it clear:

  1. You cannot use partial:
  2. You need to specify template: explicitly in render method (cannot just pass a string to render) which they claim is possible from the examples in their documentation
  3. You need to use explicit paths to partials within templates

Testing

see navapbc/platform-test#205

@lorenyu lorenyu merged commit 6dbe98a into main May 1, 2025
4 checks passed
@lorenyu lorenyu deleted the lorenyu/lookbook branch May 1, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Lookbook

1 participant