Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup modes for Chromatic #114

Merged
merged 13 commits into from
Sep 20, 2023
Merged

Setup modes for Chromatic #114

merged 13 commits into from
Sep 20, 2023

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Sep 19, 2023

📦 Published PR as canary version: 0.0.85--canary.114.34ead1e.0

✨ Test out this PR locally via:

npm install @chromaui/addon-visual-tests@0.0.85--canary.114.34ead1e.0
# or 
yarn add @chromaui/addon-visual-tests@0.0.85--canary.114.34ead1e.0

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

I like it. Can you talk me through the choice to do 2-up views for the pages but 1-up views for the components? I'm not quite understanding that, TBH.

@ghengeveld
Copy link
Member Author

I like it. Can you talk me through the choice to do 2-up views for the pages but 1-up views for the components? I'm not quite understanding that, TBH.

Twofold. Components are supposed to render nicely regardless of their container. They shouldn't really be affected by explicit breakpoints. But that's just from an idealistic view. The other reason is that this setup yields nicer images in Chromatic:

Screenshot 2023-09-20 at 09 20 33

The 2-up really is designed to mimic the addon panel. It even has the appropriate borders and background to make it look like a panel. Throwing individual components on there feels a bit weird.

By the way I imagine we won't use the 2-up layout for fullscreen screens either (since they won't have horizontal/vertical layout variants). I'll rename componentModes and screenModes to better reflect that.

@ghengeveld ghengeveld merged commit 33fe8e1 into main Sep 20, 2023
3 checks passed
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.

2 participants