Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: have user type name of thing to delete for extra safety#4080

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
presleyp merged 12 commits intomainfrompresleyp/destructive-dialog
Sep 20, 2022

Conversation

presleyp
Copy link
Contributor

Closes#3384

bpmct reacted with heart emoji
@bpmct
Copy link
Member

this PR title made me smile, idk why :D

presleyp reacted with laugh emoji

@presleyppresleyp marked this pull request as ready for reviewSeptember 20, 2022 20:28
@presleyppresleyp requested a review froma team as acode ownerSeptember 20, 2022 20:28
@presleyppresleyp requested review fromcode-asher andBrunoQuaresma and removed request fora team andcode-asherSeptember 20, 2022 20:28
})

it("disables confirm button when the text field is filled incorrectly", async () => {
const { t } = i18next
Copy link
Member

Choose a reason for hiding this comment

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

❤️

<Maybe condition={info !== undefined}>
<Typography className={styles.warning}>{info}</Typography>
</Maybe>
<Typography>{t("deleteDialog.confirm", { entity })}</Typography>
Copy link
Member

Choose a reason for hiding this comment

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

I love how we're not passing whole strings in so that the language will stay consistent.

title,
description,
entity,
info,
Copy link
Member

Choose a reason for hiding this comment

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

What kind of info is this? A description?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah, it's intended to help the user identify the entity to delete, so they don't delete the wrong one by accident.@bpmct suggested this on the basis of an article about making the wrong repo private and thus losing all their github stars.

Kira-Pilot reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It's the orange text here. Note storybook isn't showing buttons; that's been going on for a while and so far doesn't mean the buttons are actually gone.
Screen Shot 2022-09-20 at 4 52 28 PM

Kira-Pilot reacted with thumbs up emoji
fireEvent.click(moreButton)
const moreButtons = await screen.findAllByLabelText("more")
const suspendedMoreButton = moreButtons[2]
fireEvent.click(suspendedMoreButton)
Copy link
Member

Choose a reason for hiding this comment

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

Curious why we're using afireEvent instead of anawait user.click like above.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

It should be fine to do so - I just didn't make as many changes in this test. I wanted to switch to getting the "more" buttons everywhere because they load later than users, but theuserEvent change was more of a hygiene thing than a cause of bugs.

Copy link
Member

Choose a reason for hiding this comment

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

Got it! Thanks

Copy link
Member

@Kira-PilotKira-Pilot left a comment

Choose a reason for hiding this comment

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

This was satisfying to review!!! Thanks for doing it.

@presleyppresleyp merged commit0899548 intomainSep 20, 2022
@presleyppresleyp deleted the presleyp/destructive-dialog branchSeptember 20, 2022 21:13
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Kira-PilotKira-PilotKira-Pilot approved these changes

@BrunoQuaresmaBrunoQuaresmaAwaiting requested review from BrunoQuaresma

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Require that user input object name in destructive actions
3 participants
@presleyp@bpmct@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp