Reintroduce Lookbook for component previews#7115
Merged
Conversation
zachmargolis
reviewed
Oct 7, 2022
zachmargolis
reviewed
Oct 7, 2022
Contributor
Author
|
Currently this pull request simply reverts to what had previously existed, which is a bit out of date with the featureset of the components which were documented. Originally I was planning to do a follow-up pull request, but thinking I may as well just include them here and now. |
Contributor
Author
|
With the changes in 122074e, we may be able to support previews in deployed environments. I'll plan to test this in my personal sandbox. |
This reverts commit e7ff579.
changelog: Internal, Component Preview, Add development preview environment for UI components
For future support in deployed environments
Because current_content_security_policy will not be nil, even if empty
Address previous issues by checking env in the same way that Lookbook does https://github.com/allmarkedup/lookbook/blob/b40f6ea42296be4d5eec9c5d858c4b11f878451c/app/controllers/lookbook/application_controller.rb#L3-L5
31f0846 to
612539f
Compare
aduth
commented
Oct 20, 2022
Theory is something in the engine init is messing with the tests? Shouldn't be mounted tho, based on feature flag
This reverts commit cf2fff9.
Merged
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.
🛠 Summary of changes
This reintroduces the Lookbook tool for ViewComponent previews.
It's essentially a revert of #6004.
Some of the issues we had encountered at the time have since been resolved as far as being able to host Lookbook in a deployed environment.
As of https://github.com/allmarkedup/lookbook/issues/73, there are still some conflicts with content-security policy due to implementation of an underlying JavaScript library. For now, I'm proposing that this would only be available for local development.Edit: These are now addressed in this pull request.It had been discussed as part of @18F/identity-joy-engineers's recent engineering sync as a useful tool to be able to perform implementation iterations and accessibility testing in an isolated preview environment, rather than having to navigate through entire flows of the real-world application.
📜 Testing Plan
👀 Screenshots