-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat(slice-machine): add GitHub settings page #1285
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
1eaede2
to
0ef02f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/slice-machine/components/Forms/RenameVariationModal/RenameVariationModal.tsx
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/ConnectGitRepository.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/ConnectGitRepository.tsx
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/ConnectGitRepository.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitProvider.ts
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoriesSearch.tsx
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoryDisconnectDialog.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoryConnectDialog.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoryDisconnectDialog.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UI works great! It looks and feels how it should. 🙂 There are some small changes requested below.
packages/slice-machine/src/features/settings/git/ConnectGitRepository.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitProvider.ts
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitProviderConnectButtons.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoryConnectDialog.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoryConnectDialog.tsx
Outdated
Show resolved
Hide resolved
const providerConfig = gitProviderToConfig[repo.provider]; | ||
const { updateToken } = useWriteAPIToken({ git: repo }); | ||
return ( | ||
<Dialog size={{ width: 448, height: "auto" }} trigger={trigger}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dialog is closable while the token is being saved. Is it possible to disable closing it while it is loading? Or maybe we can disable the "X" and clicking outside the dialog completely, and only allow closing via the "Cancel" button?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's possible, but not now as we would need to update the Editor's Dialog
component to:
- Disable the ESC keyboard shortcut.
- Disable dismissal by clicking the overlay.
- Potentially disable the "Cancel" button.
Before doing any of that, I think it would be safer to have @benjammartin's thoughts (knowing we need to have accessibility in mind).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to continue processing in the background after closing the modal? We'll need a toaster for confirmation or error messages in this scenario.
Do we need to check the viability of the token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to continue processing in the background after closing the modal? We'll need a toaster for confirmation or error messages in this scenario.
I think we can either:
- Completely disable closing the dialog.
→ It could be frustrating for users. - Allow closing the dialog, but disable the Connect/Disconnect buttons while the request is running. Once it succeeds, display a success toast.
→ It would probably better as users would be able to leave the Settings page.
What do you think? Do you see a better way of handling it?
Do we need to check the viability of the token?
What do you mean? Are you asking if there's a specific token format that we could validate in the dialog's form?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second solution is good.
In both solutions one and two, my only concern is the token's validity. Do we implement a way to check the token’s validity?
Since it’s a temporary solution, I believe that’s not an issue anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the second solution requires more time, I’m ok with releasing the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @angeloashmore,
Does the backend reject invalid Write API tokens? Do you think there's a format we could validate on the frontend?
Thank you,
packages/slice-machine/src/features/settings/git/GitRepositoryDisconnectDialog.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoryDisconnectDialog.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoriesList.tsx
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/ConnectGitRepository.tsx
Outdated
Show resolved
Hide resolved
packages/slice-machine/src/features/settings/git/GitRepositoryConnectDialog.tsx
Show resolved
Hide resolved
0ef02f8
to
80089c8
Compare
80089c8
to
d9088e8
Compare
d9088e8
to
cd7c68e
Compare
cd7c68e
to
4bcea38
Compare
c743f29
to
fd8de81
Compare
fd8de81
to
aa83662
Compare
e5b6b07
to
d4e705f
Compare
d4e705f
to
e15005f
Compare
Completes DT-1804, DT-1848 and DT-1950.