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

Visual Test Addon Onboarding behind query param #144

Merged
merged 91 commits into from Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e3cea4c
Add stories for first few onboarding screen
weeksling Oct 12, 2023
d057f3d
Add ui that was missing from previous commits
weeksling Nov 1, 2023
c45d96c
extending the other stories to show the full ui workflow. Does not in…
weeksling Nov 1, 2023
ac8836c
fix running first test story to show the test progress
weeksling Nov 1, 2023
60260e2
Add the rest of the stories, navigation code, and screens for first b…
weeksling Nov 6, 2023
990b807
Add images to make a change screen and finish the final flow
weeksling Nov 6, 2023
1fa625a
first draft onboarding guided
weeksling Nov 7, 2023
4de9cb1
naive walkthrough. Does not require clicking filters or stories. Does…
weeksling Nov 7, 2023
471c14a
Merge branch 'main' of https://github.com/chromaui/storybook-visual-t…
weeksling Nov 13, 2023
2c14284
Add basic GuidedTour component and fix some merge issues
weeksling Nov 13, 2023
bca327f
Ensure addon panel is open
weeksling Nov 15, 2023
09f8d00
Show GuidedTour as soon as there is a build - for now
weeksling Nov 15, 2023
d05fb8c
cleanup addon panel open logic - for some reason, addon panel in gene…
weeksling Nov 15, 2023
470af63
Fix always jump to first story so we can open addon panel
weeksling Nov 15, 2023
47df404
Add listener for enableFilter event to proceed in guided onboarding
weeksling Nov 15, 2023
f6a37cf
Add skipWalkthrough and completeWalkthrough (stubbed with state) and …
weeksling Nov 16, 2023
29d5b9f
Refactor high-level routing logic (not inside onboarding yet)
weeksling Nov 16, 2023
623e24d
Attempting to let onboarding flow skip initial build when possible. D…
weeksling Nov 17, 2023
59887f5
Merge branch 'main' of https://github.com/chromaui/storybook-visual-t…
weeksling Nov 17, 2023
594ca70
fix hasCompletedWalkthrough logic
weeksling Nov 17, 2023
3383d56
autogenerated graphql update
weeksling Nov 17, 2023
b4d4c9f
Merge branch 'ap-3585-onboarding-flow-for-creating-first-build/updati…
weeksling Nov 17, 2023
12ab090
Add query param to force onboarding, and improve check for if current…
weeksling Nov 17, 2023
751b493
Merge branch 'main' into matt/ap-3586-product-tour-of-vt-features
ghengeveld Nov 20, 2023
c1dbe18
Merge branch 'matt/ap-3586-product-tour-of-vt-features' of https://gi…
weeksling Nov 20, 2023
88344af
Layout tweaks
ghengeveld Nov 20, 2023
f20bfbc
fix testsForStatus query to fix sidebar statuses
weeksling Nov 20, 2023
78fc343
Add SnapshotImageThumb component
ghengeveld Nov 20, 2023
751b53f
Fix height of container
ghengeveld Nov 20, 2023
a99f3bb
Fix missing prop
ghengeveld Nov 20, 2023
efda7da
Formatting
ghengeveld Nov 20, 2023
438fc25
Work on logic
ghengeveld Nov 20, 2023
019f248
fix: prevent GuidedTour from constantly rerendering by limiting the a…
weeksling Nov 21, 2023
e635925
add back logic to jump to first story if selectedStory is a docs stor…
weeksling Nov 21, 2023
337cc84
update guided tour - fix target ids, allow toggling, show confetti, c…
weeksling Nov 21, 2023
3d415ef
attempt to resize panel to 500px (one time) by setting storybook-layo…
weeksling Nov 21, 2023
4dd2f23
finish guided tour, add resize logic
weeksling Nov 21, 2023
26655e4
remove query param on skip or complete
weeksling Nov 21, 2023
3332402
lint --fix; and add PulsatingEffect in case we want to use it
weeksling Nov 21, 2023
bb2ea4d
lint fix other errors
weeksling Nov 21, 2023
dd8fa18
fix the centering of the GuidedTour tooltip after the sidebar is filt…
weeksling Nov 23, 2023
cce721e
fix styling issue
weeksling Nov 24, 2023
faa79c9
Fix unexpected errors in VisualTests stories (only in build) - we nee…
weeksling Nov 25, 2023
33676d9
remove unneeded Done story - would just show the regular panel
weeksling Dec 4, 2023
d477eb9
stay in the walkthrough if the user accpets the comparison on a build…
weeksling Dec 4, 2023
6121c4c
remove extra skip localstorage - either the entire onboarding was com…
weeksling Dec 4, 2023
3c2dae2
Disable the initial build screen unless a prop is given. This would b…
weeksling Dec 4, 2023
dcab644
Merge branch 'main' of https://github.com/chromaui/storybook-visual-t…
weeksling Dec 11, 2023
16b1407
fix linting errors caused by some sort of configuration conflict - ne…
weeksling Jan 15, 2024
930d395
fix missing useEffect import causing stories to fail
weeksling Jan 15, 2024
78012ca
Fix type errors - one in Confetti due to our eslint/typescript rules …
weeksling Jan 15, 2024
54ab9ec
fix: add back id on switch button to support guided walkthrough
weeksling Jan 17, 2024
1eb614c
fix: remove label on button-toggle-snapshot
weeksling Jan 17, 2024
3891506
remove resizing logic for the addon panel.
weeksling Jan 17, 2024
068a84b
add missing ids to accept and unaccept buttons.
weeksling Jan 17, 2024
9e4b0fb
remove unnecessary projectId change from testing new storybook flow a…
weeksling Jan 23, 2024
ae990c9
remove 'hack' to clear notifications - acceptable issue for now. Allo…
weeksling Jan 23, 2024
1d616af
comment out localstorage flag. Will remove after completing AP-3586
weeksling Jan 23, 2024
eb46261
remove unneeded comment
weeksling Jan 23, 2024
6abbed7
fix: show initial build onboarding correctly if this is a new repo
weeksling Jan 25, 2024
62de0d7
don't display an error state if no screen is temporarily displayed. L…
weeksling Jan 25, 2024
f136301
onboarding: show warning if 2nd build has no changes, and if changes …
weeksling Jan 26, 2024
b89712f
fix: guided tour play button selector id
weeksling Jan 26, 2024
2a88f70
Make a Change multiple times until there are changes, and other navig…
weeksling Jan 26, 2024
c8226fa
don't disable flaky snapshot comparison stories. Fix eol typo
weeksling Jan 26, 2024
6a52c75
remove unneeded comment
weeksling Jan 26, 2024
af6313d
0.0.125-canary.0
weeksling Jan 26, 2024
50712c3
0.0.126-canary.0
weeksling Jan 26, 2024
20d2ed0
import images instead of /url to include them in public release
weeksling Jan 26, 2024
c3e81d7
0.0.127-canary.0
weeksling Jan 26, 2024
d23ab35
tsup should make png images into dataUrls
weeksling Jan 26, 2024
1a1ce78
0.0.128-canary.0
weeksling Jan 26, 2024
9ea4ab7
style: eslint fix
weeksling Jan 27, 2024
668f113
remove unexpected border under warning texts
weeksling Jan 27, 2024
ba88279
fix: include png types in tsconfig for .png import types
weeksling Jan 29, 2024
2ed5f9e
resolves AP-4133
thafryer Jan 30, 2024
040a2eb
resolves AP-4116
thafryer Jan 30, 2024
a46634f
resolves AP-4127
thafryer Jan 30, 2024
5d95b8a
fix linting issues
thafryer Jan 31, 2024
962fa93
Fixes AP-4126
thafryer Jan 31, 2024
0c342a0
fixes AP-4115
thafryer Jan 31, 2024
a59b229
Merge branch 'main' into matt/ap-3586-product-tour-of-vt-features
thafryer Jan 31, 2024
d3e14cb
fix lint
thafryer Jan 31, 2024
ef35d9d
update pkg version
thafryer Jan 31, 2024
2cbf05f
bump react
thafryer Jan 31, 2024
860a09f
update rogue jackspeak version
thafryer Jan 31, 2024
e11e9f5
clean yarn lock
thafryer Jan 31, 2024
9d346c3
update lockfile
thafryer Jan 31, 2024
676e27a
update types
thafryer Jan 31, 2024
6590d7e
pin valid version of dom types
thafryer Feb 1, 2024
53a44d0
add image loader
thafryer Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion development.config.json
@@ -1,4 +1,4 @@
{
"projectId": "Project:64c0b64ef4c47fe31e1262f5",
"projectId": "Project:652865507e138292e0cf0821",
"zip": true
}
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -59,6 +59,8 @@
"filesize": "^10.0.12",
"jsonfile": "^6.1.0",
"pluralize": "^8.0.0",
"react-confetti": "^6.1.0",
"react-joyride": "^2.6.2",
"ts-dedent": "^2.2.0",
"urql": "^4.0.3",
"uuid": "^9.0.0",
Expand Down
Binary file added public/Snapshot-Preview.png
ghengeveld marked this conversation as resolved.
Show resolved Hide resolved
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/example-button-noargs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/onboarding-adjust-size.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/onboarding-color-palette.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/onboarding-embiggen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/onboarding-layout.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/Panel.tsx
Expand Up @@ -16,6 +16,7 @@ import {
import { Project } from "./gql/graphql";
import { Authentication } from "./screens/Authentication/Authentication";
import { GitNotFound } from "./screens/GitNotFound/GitNotFound";
import { GuidedTour } from "./screens/GuidedTour/GuidedTour";
weeksling marked this conversation as resolved.
Show resolved Hide resolved
import { LinkedProject } from "./screens/LinkProject/LinkedProject";
import { LinkingProjectFailed } from "./screens/LinkProject/LinkingProjectFailed";
import { LinkProject } from "./screens/LinkProject/LinkProject";
Expand Down
8 changes: 7 additions & 1 deletion src/SidebarBottom.tsx
Expand Up @@ -12,8 +12,14 @@ interface SidebarBottomProps {
api: API;
}

export const ENABLE_FILTER = "enableFilter";

export const SidebarBottom = ({ api }: SidebarBottomProps) => {
const onEnable = useCallback(() => api.experimental_setFilter(ADDON_ID, filterWarn), [api]);
const onEnable = useCallback(() => {
api.experimental_setFilter(ADDON_ID, filterWarn);
// Used internally to trigger next step in guided tour
api.emit(ENABLE_FILTER, ADDON_ID, filterWarn);
}, [api]);
const onDisable = useCallback(() => api.experimental_setFilter(ADDON_ID, filterNone), [api]);

const { status } = useStorybookState();
Expand Down
2 changes: 1 addition & 1 deletion src/components/SidebarToggleButton.tsx
Expand Up @@ -50,7 +50,7 @@ export const SidebarToggleButton = React.memo(function SidebarToggleButton({
useEffect(() => () => onDisable(), [onDisable]);

return (
<Button active={filter} onClick={toggleFilter}>
<Button id="changes-found-filter" active={filter} onClick={toggleFilter}>
<Badge status="warning" data-badge={filter}>
{count}
</Badge>
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Expand Up @@ -10,6 +10,7 @@ export const SIDEBAR_TOP_ID = `${ADDON_ID}/sidebarTop`;
export const SIDEBAR_BOTTOM_ID = `${ADDON_ID}/sidebarBottom`;
export const ACCESS_TOKEN_KEY = `${ADDON_ID}/access-token/${CHROMATIC_BASE_URL}`;
export const DEV_BUILD_ID_KEY = `${ADDON_ID}/dev-build-id`;
export const HAS_COMPLETED_ONBOARDING_KEY = `${ADDON_ID}/has-completed-onboarding`;

export const GIT_INFO = `${ADDON_ID}/gitInfo`;
export const GIT_INFO_ERROR = `${ADDON_ID}/gitInfoError`;
Expand Down
10 changes: 5 additions & 5 deletions src/gql/gql.ts
Expand Up @@ -14,9 +14,9 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
*/
const documents = {
"\n query VisualTestsProjectCountQuery {\n viewer {\n projectCount\n accounts {\n newProjectUrl\n }\n }\n }\n": types.VisualTestsProjectCountQueryDocument,
"\n query SelectProjectsQuery {\n viewer {\n accounts {\n id\n name\n avatarUrl\n newProjectUrl\n projects {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n }\n }\n": types.SelectProjectsQueryDocument,
"\n query ProjectQuery($projectId: ID!) {\n project(id: $projectId) {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n": types.ProjectQueryDocument,
"\n query AddonVisualTestsBuild(\n $projectId: ID!\n $branch: String!\n $gitUserEmailHash: String!\n $repositoryOwnerName: String\n $storyId: String!\n $testStatuses: [TestStatus!]!\n $selectedBuildId: ID!\n $hasSelectedBuildId: Boolean!\n ) {\n project(id: $projectId) {\n name\n lastBuildOnBranch: lastBuild(\n branches: [$branch]\n repositoryOwnerName: $repositoryOwnerName\n localBuilds: { localBuildEmailHash: $gitUserEmailHash }\n ) {\n ...LastBuildOnBranchBuildFields\n ...SelectedBuildFields @skip(if: $hasSelectedBuildId)\n }\n }\n selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {\n ...SelectedBuildFields\n }\n viewer {\n projectMembership(projectId: $projectId) {\n userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)\n }\n }\n }\n": types.AddonVisualTestsBuildDocument,
"\n query SelectProjectsQuery {\n viewer {\n accounts {\n id\n name\n avatarUrl\n newProjectUrl\n projects {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n }\n }\n": types.SelectProjectsQueryDocument,
"\n query AddonVisualTestsBuild(\n $projectId: ID!\n $branch: String!\n $gitUserEmailHash: String!\n $repositoryOwnerName: String\n $storyId: String!\n $testStatuses: [TestStatus!]!\n $selectedBuildId: ID!\n $hasSelectedBuildId: Boolean!\n ) {\n project(id: $projectId) {\n name\n lastBuildOnBranch: lastBuild(\n branches: [$branch]\n repositoryOwnerName: $repositoryOwnerName\n localBuilds: { localBuildEmailHash: $gitUserEmailHash }\n ) {\n ...LastBuildOnBranchBuildFields\n ...SelectedBuildFields @skip(if: $hasSelectedBuildId)\n }\n lastBuild {\n id\n slug\n }\n }\n selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {\n ...SelectedBuildFields\n }\n viewer {\n projectMembership(projectId: $projectId) {\n userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)\n }\n }\n }\n": types.AddonVisualTestsBuildDocument,
"\n fragment LastBuildOnBranchBuildFields on Build {\n __typename\n id\n status\n committedAt\n ... on StartedBuild {\n testsForStatus: tests(first: 1000, statuses: $testStatuses) {\n nodes {\n ...StatusTestFields\n }\n }\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...LastBuildOnBranchTestFields\n }\n }\n }\n ... on CompletedBuild {\n result\n testsForStatus: tests(first: 1000, statuses: $testStatuses) {\n nodes {\n ...StatusTestFields\n }\n }\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...LastBuildOnBranchTestFields\n }\n }\n }\n }\n": types.LastBuildOnBranchBuildFieldsFragmentDoc,
"\n fragment SelectedBuildFields on Build {\n __typename\n id\n number\n branch\n commit\n committedAt\n uncommittedHash\n status\n ... on StartedBuild {\n startedAt\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...StoryTestFields\n }\n }\n }\n ... on CompletedBuild {\n startedAt\n testsForStory: tests(storyId: $storyId) {\n nodes {\n ...StoryTestFields\n }\n }\n }\n }\n": types.SelectedBuildFieldsFragmentDoc,
"\n fragment StatusTestFields on Test {\n id\n status\n story {\n storyId\n }\n }\n": types.StatusTestFieldsFragmentDoc,
Expand Down Expand Up @@ -46,15 +46,15 @@ export function graphql(source: "\n query VisualTestsProjectCountQuery {\n v
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query SelectProjectsQuery {\n viewer {\n accounts {\n id\n name\n avatarUrl\n newProjectUrl\n projects {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query SelectProjectsQuery {\n viewer {\n accounts {\n id\n name\n avatarUrl\n newProjectUrl\n projects {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n }\n }\n"];
export function graphql(source: "\n query ProjectQuery($projectId: ID!) {\n project(id: $projectId) {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n"): (typeof documents)["\n query ProjectQuery($projectId: ID!) {\n project(id: $projectId) {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query ProjectQuery($projectId: ID!) {\n project(id: $projectId) {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n"): (typeof documents)["\n query ProjectQuery($projectId: ID!) {\n project(id: $projectId) {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n"];
export function graphql(source: "\n query SelectProjectsQuery {\n viewer {\n accounts {\n id\n name\n avatarUrl\n newProjectUrl\n projects {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n }\n }\n"): (typeof documents)["\n query SelectProjectsQuery {\n viewer {\n accounts {\n id\n name\n avatarUrl\n newProjectUrl\n projects {\n id\n name\n webUrl\n lastBuild {\n branch\n number\n }\n }\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query AddonVisualTestsBuild(\n $projectId: ID!\n $branch: String!\n $gitUserEmailHash: String!\n $repositoryOwnerName: String\n $storyId: String!\n $testStatuses: [TestStatus!]!\n $selectedBuildId: ID!\n $hasSelectedBuildId: Boolean!\n ) {\n project(id: $projectId) {\n name\n lastBuildOnBranch: lastBuild(\n branches: [$branch]\n repositoryOwnerName: $repositoryOwnerName\n localBuilds: { localBuildEmailHash: $gitUserEmailHash }\n ) {\n ...LastBuildOnBranchBuildFields\n ...SelectedBuildFields @skip(if: $hasSelectedBuildId)\n }\n }\n selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {\n ...SelectedBuildFields\n }\n viewer {\n projectMembership(projectId: $projectId) {\n userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)\n }\n }\n }\n"): (typeof documents)["\n query AddonVisualTestsBuild(\n $projectId: ID!\n $branch: String!\n $gitUserEmailHash: String!\n $repositoryOwnerName: String\n $storyId: String!\n $testStatuses: [TestStatus!]!\n $selectedBuildId: ID!\n $hasSelectedBuildId: Boolean!\n ) {\n project(id: $projectId) {\n name\n lastBuildOnBranch: lastBuild(\n branches: [$branch]\n repositoryOwnerName: $repositoryOwnerName\n localBuilds: { localBuildEmailHash: $gitUserEmailHash }\n ) {\n ...LastBuildOnBranchBuildFields\n ...SelectedBuildFields @skip(if: $hasSelectedBuildId)\n }\n }\n selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {\n ...SelectedBuildFields\n }\n viewer {\n projectMembership(projectId: $projectId) {\n userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)\n }\n }\n }\n"];
export function graphql(source: "\n query AddonVisualTestsBuild(\n $projectId: ID!\n $branch: String!\n $gitUserEmailHash: String!\n $repositoryOwnerName: String\n $storyId: String!\n $testStatuses: [TestStatus!]!\n $selectedBuildId: ID!\n $hasSelectedBuildId: Boolean!\n ) {\n project(id: $projectId) {\n name\n lastBuildOnBranch: lastBuild(\n branches: [$branch]\n repositoryOwnerName: $repositoryOwnerName\n localBuilds: { localBuildEmailHash: $gitUserEmailHash }\n ) {\n ...LastBuildOnBranchBuildFields\n ...SelectedBuildFields @skip(if: $hasSelectedBuildId)\n }\n lastBuild {\n id\n slug\n }\n }\n selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {\n ...SelectedBuildFields\n }\n viewer {\n projectMembership(projectId: $projectId) {\n userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)\n }\n }\n }\n"): (typeof documents)["\n query AddonVisualTestsBuild(\n $projectId: ID!\n $branch: String!\n $gitUserEmailHash: String!\n $repositoryOwnerName: String\n $storyId: String!\n $testStatuses: [TestStatus!]!\n $selectedBuildId: ID!\n $hasSelectedBuildId: Boolean!\n ) {\n project(id: $projectId) {\n name\n lastBuildOnBranch: lastBuild(\n branches: [$branch]\n repositoryOwnerName: $repositoryOwnerName\n localBuilds: { localBuildEmailHash: $gitUserEmailHash }\n ) {\n ...LastBuildOnBranchBuildFields\n ...SelectedBuildFields @skip(if: $hasSelectedBuildId)\n }\n lastBuild {\n id\n slug\n }\n }\n selectedBuild: build(id: $selectedBuildId) @include(if: $hasSelectedBuildId) {\n ...SelectedBuildFields\n }\n viewer {\n projectMembership(projectId: $projectId) {\n userCanReview: meetsAccessLevel(minimumAccessLevel: REVIEWER)\n }\n }\n }\n"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down