Closed tmeasday closed 1 year ago
When a user selects a project from the project picker, we automatically add these to the main.js file. However, in the event that the user has a very custom configuration, there is a possibility that adding it automatically will fail. This is a suggestion that we display the project token and project id that the user selects, before trying to automatically add it to the storybook configuration. In this case, it may also make sense to provide a prompt to the user before trying to automatically modify their configuration. Perhaps a secondary button that skips automatic configuration (and lets the user know how to manually configure it). Otherwise, we would always attempt to configure it and potentially break their configuration. Even in the event of a failure, the projectToken and projectId are stored in localstorage on the client and an environment variable on the server to not require a storybook restart, so the addon allows the user to continue without finishing the configuration step. This may not be an issue, but if we allow user to manually update, then this may lead to some confusion if they skip manually and automatically updating it.
Add a new event to tell manager if we failed + UI as per design here: https://linear.app/chromaui/issue/AP-3485#comment-0767a585
To QA:
options
frommain.js
updateMain.ts
Pick a project in the addon.
📦 Published PR as canary version:
0.0.41--canary.41.7576b70.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/addon-visual-tests@0.0.41--canary.41.7576b70.0 # or yarn add @chromaui/addon-visual-tests@0.0.41--canary.41.7576b70.0 ```