-
Notifications
You must be signed in to change notification settings - Fork 2
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
Show project picker when no project id is in main.js
#10
Show project picker when no project id is in main.js
#10
Conversation
AP-3260 Project Picker with Chromatic api and token
After the user has logged into Chromatic, the onboarding asks them to select a project to connect to. Using the authentication token, and the public API, implement a project picker. Questions/Unknowns:
|
…ks down the line, matches other addons
…rently failing for multiple reasons =_=)
…iew.ts (change to main.ts if we can)
…(still need to find api to do this)
…onfig or in memory or selected
085edc7
to
84e978f
Compare
@ndelangen can you take a look, especially at the preset code-- @ghengeveld can you review the UI code. I have it working doing the following:
What's missing/broken right now is:
If y'all agree we could just say we are OK with 1+2 as limitations right now and fix it in a later ticket. I'm leaning that way. |
I feel like that's what I've been saying for a while, that will yield the best result, no weird behavior for anyone. |
I guess so. But it seems overly complex to have 2 events just to request some data. Is that the pattern we want to lay down for client initiated server->client communication? Other options:
My inclination is to take it a bit further like this just to gather information and then thrash it out very soon. |
Co-authored-by: Gert Hengeveld <info@ghengeveld.nl>
I added |
main.js
Screen.Recording.2023-07-05.at.12.47.47.PM.mov
Adds a parameter for the projectId and lets the user select between projects they are associated with. Includes serverChannel method to mutate the storybook configuration when setting the projectId & projectToken.
Not working yet:
Pull request base is test-screens to make the changes here easier to diff. Should be changed to main prior to merging.
This depends on related Chromatic api PR https://github.com/chromaui/chromatic/pull/7460
📦 Published PR as canary version:
0.0.4-canary.10.1175a32.0
✨ Test out this PR locally via:
npm install @chromaui/addon-visual-tests@0.0.4-canary.10.1175a32.0 # or yarn add @chromaui/addon-visual-tests@0.0.4-canary.10.1175a32.0