Skip to content

Document usage of Lookbook for ViewComponents#11540

Merged
aduth merged 1 commit intomainfrom
aduth-lookbook
Nov 25, 2024
Merged

Document usage of Lookbook for ViewComponents#11540
aduth merged 1 commit intomainfrom
aduth-lookbook

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Nov 21, 2024

🛠 Summary of changes

Expands on the "View Components" section of the Frontend Architecture documentation to detail our use of Lookbook for component previews.

Related Slack discussion: https://gsa-tts.slack.com/archives/C0NGESUN5/p1732049308670279

📜 Testing Plan

Review proposed text as being easy-to-understand and without typos.

changelog: Internal, Documentation, Document usage of Lookbook for ViewComponents
@aduth aduth requested a review from eileen-nava November 21, 2024 15:49

To preview components and their available options, we use [Lookbook](https://lookbook.build/) to
generate a navigable index of our available components. These previews are available at the [`/components/` route](http://localhost:3000/components/)
in local development, review applications, and in the `dev` environment. When adding a new component
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just link the dev environment? or are trying to minimize crawling of it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional to add some light friction here with the assumption that there's enough detail to help the target audience find their way to the page, without directly linking to the deployed environment. (I think we don't usually link there?)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prob fine to leave as-is


To preview components and their available options, we use [Lookbook](https://lookbook.build/) to
generate a navigable index of our available components. These previews are available at the [`/components/` route](http://localhost:3000/components/)
in local development, review applications, and in the `dev` environment. When adding a new component
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth noting that the component_previews_enabled feature flag toggles visibility on/off?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could, but I can't personally imagine much need to change it from its defaults, so didn't want to dilute the critical information here.

Do you think there's a use-case to be turning it on and off?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, probably not.

Copy link
Copy Markdown
Contributor

@eileen-nava eileen-nava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is helpful, thank you for adding the documentation. 🙏🏻

@aduth aduth merged commit 94e98d7 into main Nov 25, 2024
@aduth aduth deleted the aduth-lookbook branch November 25, 2024 12:38
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.

3 participants