-
Notifications
You must be signed in to change notification settings - Fork 32
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(Forms): add showConfirmDialog
to Iterate.RemoveButton
#4330
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
ea26cc7
to
64c5bc2
Compare
@@ -205,7 +205,7 @@ export const ArrayFromFormHandler = () => { | |||
</Field.Composition> | |||
|
|||
<Iterate.Toolbar> | |||
<Iterate.RemoveButton /> | |||
<Iterate.RemoveButton confirmRemove /> |
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.
<Iterate.RemoveButton confirmRemove /> | |
<Iterate.RemoveButton confirmRemove /> |
Can the prop just be named confirm? As the component is RemoveButton, so we sort of know the confirming should be about removing. Hence the name of the component.
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.
Yes 👍
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.
But on the other hand I like more unique props so it's easier to maintain for everyone.
Could be showConfirmDialog or confirmBeforeRemove?
Any thoughts about such prop names?
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.
Sure, perhaps just showConfirmDialog
, I think I like that the best.
packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Iterate/RemoveButton/info.mdx
Outdated
Show resolved
Hide resolved
It's a custom toolbar. So apps would need to adjust it to their needs. |
I see, then it's fine by me :) |
Some strange animation happening. Probably not related to exactly this RemoveButton PR, but yeah. Screen.Recording.2024-11-23.at.08.14.24.movHere's a few screenshots from the video above when opening/closing: |
In mobile using Safari: This is probably difficult to resolve. But when removing using the confirm dialog, it sort of laggs/stutters. Sort of feels like it is under heavy load: trim.1D57F9E8-33ED-486C-B15D-1EC92E09072F.MOV |
confirmRemove
to Iterate.RemoveButtonshowConfirmDialog
to Iterate.RemoveButton
15877fe
to
93537ea
Compare
Its not 100% perfect, but I think the latest commit enhances the UX. Let me know your result. |
Before we merge this, we should merge #4329 |
It felt better now, thanks👏 |
Sure, I let you handle this🫡 |
I still experience this. Not sure if this is important to fik, but to me the animation feels a bit strange because it's a few spøit seconds during the animation where I can see both Avatars, as seen in the video: trim.7DF4AA91-C1C5-41A7-8DFF-8A56D6646FEA.MOV |
It's not a new thing. But it's more visible with the Avatar now. That's how we transition the two containers. But this can for sure be improved. We could hide the "hiding" content earlier with an opacity. But in another PR. |
Co-authored-by: Anders <[email protected]>
Co-authored-by: Anders <[email protected]>
Co-authored-by: Anders <[email protected]>
93537ea
to
2bc90cf
Compare
## [10.58.0](v10.57.1...v10.58.0) (2024-11-29) ### ✨ Features * **Forms:** add `showConfirmDialog` to Iterate.RemoveButton ([#4330](#4330)) ([76bddf0](76bddf0)) * **Forms:** add `variant="filled"` and `toolbarVariant="custom"` to Iterate.EditContainer and Iterate.ViewContainer ([#4329](#4329)) ([b2b9eef](b2b9eef)) * **Forms:** add support for using a function references instead of a string based id ([#4331](#4331)) ([a6e3bc3](a6e3bc3)) * **Forms:** enhance typing and add docs on how to deal with TypeScript types ([#4343](#4343)) ([10b199b](10b199b)) * **Forms:** introduce `decoupleForm` prop to Form.Handler ([#4332](#4332)) ([0b02b6e](0b02b6e)) ### 🐛 Bug Fixes * **DatePicker:** make sure the picker and input only reacts to the props that have changed ([#4342](#4342)) ([4cd52a3](4cd52a3)) * **Forms.Card:** remove outline when variant="basic" on Section containers when used in Wizard ([#4336](#4336)) ([ebad212](ebad212)) * **forms:** add `sessionStorageId` support to Field.Upload with empty file list rendering ([#4339](#4339)) ([d02a0af](d02a0af)) * **NumberFormat:** improve regex for parsing phone numbers with country codes ([#4340](#4340)) ([96613ed](96613ed)), closes [#4337](#4337)
🎉 This PR is included in version 10.58.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Based on #4329
Here is a PR Preview.