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

tidy: release add Team Editor feature #3580

Merged
merged 50 commits into from
Sep 2, 2024
Merged

tidy: release add Team Editor feature #3580

merged 50 commits into from
Sep 2, 2024

Conversation

jamdelion
Copy link
Contributor

@jamdelion jamdelion commented Aug 27, 2024

Ticket: https://trello.com/c/piMcGsJa/2973-add-user-in-editor

✅ Done

  • Add accessibility test
  • Add error toast if server-side error (probably won't get reached?)
  • Release from feature flag

jamdelion and others added 30 commits August 5, 2024 15:40
…s/AddNewEditorModal.tsx

Co-authored-by: Dafydd Llŷr Pearson <[email protected]>
Copy link

github-actions bot commented Aug 27, 2024

Removed vultr server and associated DNS entries

Comment on lines +27 to +28
setShowSuccessToast,
setShowErrorToast,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the sort of thing I hope to get rid of with a useToast hook in another PR 😁

Comment on lines +54 to +56
if (err.message === "Unable to create user") {
setShowErrorToast(true);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we'll ever reach this due to the error handling already in src/lib/graphql.ts but hopefully a good fallback

Comment on lines +36 to +44
const handleCloseErrorToast = (
_event?: React.SyntheticEvent | Event,
reason?: string,
) => {
if (reason === "clickaway") {
return;
}

setShowErrorToast(false);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this as duplicated for now and will revisit with a useToast hook 🤞

@jamdelion jamdelion marked this pull request as ready for review August 29, 2024 13:41
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! All looks good, just the small issue highlighted by @jessicamcinchak on Slack but then I think that's it 🙌

@@ -11,7 +15,7 @@ export const createAndAddUserToTeam = async (
teamSlug: string,
) => {
// NB: the user is hard-coded with the 'teamEditor' role for now
const response = (await client.mutate({
const response: CreateAndAddUserResponse = await client.mutate({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: client.mutate also accepts a generic which will automatically wrap the provided type with FetchResult, e.g. client.mutate<MyType>

@jamdelion jamdelion merged commit b888daa into main Sep 2, 2024
12 checks passed
@jamdelion jamdelion deleted the jh/tidy-up-add-editor branch October 28, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants