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

feat: warning if backdrop click or escape key is pressed when new action form is dirty #5989

Merged
merged 9 commits into from
Jun 13, 2023

Conversation

doncicuto
Copy link
Contributor

As a dev, I want to get a warning when I click anywhere outside the modal or the escape key is pressed

Acceptance Criteria

  • Warn users before closing the modal with unsaved changes.

Deviation from acceptance criteria:

  • I tried to tackle the "Accidentally navigating back (swipe gesture)" issue using router outlets, auxiliary routes and route guards for dialogs (new action and update action). Angular/Material Dialog didn't help me to find an elegant way to show the warning message, code was too convoluted so I prefer to stash files.

This is a sample video showing backdrop click or when escape key is pressed:

output.mp4

Would close #5681

Definition of Ready

  • I am happy with the code
  • Short description of the feature/issue is added in the pr description
  • PR is linked to the corresponding user story
  • Acceptance criteria are met
  • All open todos and follow ups are defined in a new ticket and justified
  • Deviations from the acceptance criteria and design are agreed with the PO and documented.
  • No debug or dead code
  • My code has no repetitions
  • Critical parts are tested automatically
  • Where possible E2E tests are implemented
  • Documentation/examples are up-to-date
  • All non-functional requirements are met
  • Functionality of the acceptance criteria is checked manually on the dev system.

@vercel
Copy link

vercel bot commented Jun 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2023 3:10pm

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #5989 (756a9c2) into main (383e68b) will increase coverage by 1.21%.
The diff coverage is 57.05%.

@@            Coverage Diff             @@
##             main    #5989      +/-   ##
==========================================
+ Coverage   44.66%   45.87%   +1.21%     
==========================================
  Files        1187     1192       +5     
  Lines      104527   106622    +2095     
==========================================
+ Hits        46682    48915    +2233     
+ Misses      55672    55400     -272     
- Partials     2173     2307     +134     
Impacted Files Coverage Δ
cmd/setup/10.go 0.00% <0.00%> (ø)
cmd/setup/11.go 0.00% <0.00%> (ø)
cmd/setup/config.go 0.00% <ø> (ø)
cmd/setup/setup.go 14.54% <0.00%> (-0.14%) ⬇️
internal/api/grpc/admin/idp.go 0.00% <0.00%> (ø)
internal/api/grpc/admin/import.go 0.00% <0.00%> (ø)
internal/api/grpc/management/idp.go 0.00% <0.00%> (ø)
internal/api/grpc/management/user.go 0.00% <0.00%> (ø)
internal/api/grpc/server/gateway.go 47.22% <0.00%> (ø)
internal/api/http/cookie.go 26.08% <0.00%> (ø)
... and 63 more

... and 31 files with indirect coverage changes

@hifabienne
Copy link
Member

hei @doncicuto thanks for your work.
We will have a look at it.

@hifabienne
Copy link
Member

@peintnermax can you have a look at this?

Copy link
Member

@peintnermax peintnermax left a comment

Choose a reason for hiding this comment

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

Thank you for your effort.. 🙏 I've made a suggestion to use typed forms and initialize it on top. What do you think?

console/src/assets/i18n/de.json Outdated Show resolved Hide resolved
console/src/assets/i18n/en.json Outdated Show resolved Hide resolved
console/src/assets/i18n/es.json Outdated Show resolved Hide resolved
console/src/assets/i18n/fr.json Outdated Show resolved Hide resolved
console/src/assets/i18n/it.json Outdated Show resolved Hide resolved
console/src/assets/i18n/zh.json Outdated Show resolved Hide resolved
console/src/assets/i18n/it.json Outdated Show resolved Hide resolved
@doncicuto
Copy link
Contributor Author

Thanks a lot @peintnermax, as always, for your review. I'll submit a PR including your suggested changes.

@peintnermax peintnermax enabled auto-merge (squash) June 13, 2023 15:06
@peintnermax peintnermax merged commit 33a8ab4 into zitadel:main Jun 13, 2023
10 checks passed
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

🎉 This PR is included in version 2.30.0-eventstore-performance.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 2.24.0-ignore-me2.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn about unsaved changes when editing Actions
3 participants