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

Show project picker when no project id is in main.js #10

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d439a03
add back prerelease check so we have somewhere to add additional chec…
weeksling Jun 26, 2023
1973bd0
WIP: Adding the useParameter hook to get the projectId and token (cur…
weeksling Jun 27, 2023
9b64dae
Accounts and Projects graphql types and queries
weeksling Jun 28, 2023
d548777
fix parameters error move useProjectId to Panel. Includes bare ui
weeksling Jun 28, 2023
b65c2ea
clean up comments, imports, jsx
weeksling Jun 28, 2023
d68d08a
Add boilerplate for adding projectId (rename to appId) config to prev…
weeksling Jun 28, 2023
814b627
Cleaned up UI and removed private repo form
weeksling Jul 5, 2023
8ff7c7b
connected projectId selection and add in memory variable for singleton
weeksling Jul 5, 2023
33818eb
Display visual tests after selecting a project and in memory selected…
weeksling Jul 5, 2023
f04fdf5
Adding serverChannel methods to update the storybook config directly …
weeksling Jun 26, 2023
5d62f8b
Include projectToken in updateProject hook and serverChannel
weeksling Jul 5, 2023
5690a40
Update useProjectId hook to use memo to return projectId in preview c…
weeksling Jul 5, 2023
84e978f
serverChannel updates preview.tsx - main.ts update currently not working
weeksling Jul 5, 2023
bd2ab4f
Update selector with correct schema
weeksling Jul 11, 2023
fb359d2
Fix visual test queries (useProjectId only in panel, no parameters ho…
weeksling Jul 11, 2023
b39b004
Use `main.js` and env for projectId + git info
tmeasday Jul 13, 2023
b61c87d
Use update project token for builds
tmeasday Jul 13, 2023
77dd481
Pass branch into `VisualTests`
tmeasday Jul 13, 2023
96a5b3c
Switch to default export
tmeasday Jul 13, 2023
5246be4
Don't set env in prod
tmeasday Jul 13, 2023
a4f2299
Fix formatting
ghengeveld Jul 14, 2023
10f2b5e
Fix formatting
ghengeveld Jul 14, 2023
4d2869b
Fix formatting
ghengeveld Jul 14, 2023
870c0a8
cleanup
ndelangen Jul 14, 2023
7a86c94
add slug partially implemented
ndelangen Jul 14, 2023
f60be53
Update src/Panel.tsx
ghengeveld Jul 14, 2023
6df7fd8
Validate slug and pass it to the project.lastBuild field
ghengeveld Jul 14, 2023
ceb649b
Merge branch 'main' into matt/ap-3260-project-picker-with-chromatic-a…
ghengeveld Jul 15, 2023
f8c401c
Fix missing dependency and bad import
ghengeveld Jul 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type { StorybookConfig } from "@storybook/react-vite";

const CHROMATIC_BASE_URL = process.env.CHROMATIC_BASE_URL || "https://www.chromatic.com";

const config: StorybookConfig = {
addons: [
{
Expand All @@ -17,16 +14,13 @@ const config: StorybookConfig = {
name: "../dist/index.js",
options: {
projectToken: "chpt_c4206d1157d8947",
projectId: "6480e1b0042842f149cfd74c", // Default to the the production project of this addon - WILL BE MOVED TO preview.tsx since we can't access options in the manager.
},
},
],
docs: {
autodocs: "tag",
},
env: (config) => ({
...config,
CHROMATIC_BASE_URL,
}),
framework: {
name: "@storybook/react-vite",
options: {},
Expand All @@ -35,5 +29,4 @@ const config: StorybookConfig = {
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
logLevel: "debug",
};

export default config;
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@
"lint": "eslint src --max-warnings 0 --report-unused-disable-directives",
"release": "pnpm run build && auto shipit",
"start": "run-p build:watch 'storybook --quiet'",
"storybook": "storybook dev -p 6006"
"prerelease": "zx scripts/prepublish-checks.mjs",
"storybook": "CHROMATIC_ADDON_NAME='../dist/index.js' storybook dev -p 6006"
},
"dependencies": {
"@storybook/csf-tools": "^7.1.0-alpha.34",
"@storybook/design-system": "^7.15.11",
"chromatic": "^6.19.8",
"date-fns": "^2.30.0",
Expand All @@ -63,6 +65,7 @@
"devDependencies": {
"@graphql-codegen/cli": "^4.0.1",
"@graphql-codegen/client-preset": "^4.0.1",
"@graphql-typed-document-node/core": "^3.2.0",
"@storybook/addon-actions": "^7.1.0-alpha.34",
"@storybook/addon-essentials": "^7.1.0-alpha.34",
"@storybook/addon-interactions": "^7.1.0-alpha.34",
Expand Down
Loading