-
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 Form.InfoOverlay
to display error, success (receipt), or custom messages to users
#4357
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. |
I did a quick test in CSB, looks good! 👍 There are some quirks.
Screen.Recording.2024-12-04.at.10.02.01.mov |
packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/Status/info.mdx
Outdated
Show resolved
Hide resolved
Small observation when entering the docs is that it does not start/show the top of the page, but scrolls down the page, not very important though. |
When "trying again", should I as a user get updated feedback that something went wrong again? Screen.Recording.2024-12-04.at.10.42.15.movPerhaps we could remove the existing error message when displaying the loader in the button? |
packages/dnb-eufemia/src/extensions/forms/Form/Status/Status.tsx
Outdated
Show resolved
Hide resolved
It is actually important that this not happens. The focus gets set initially. Which should it not. Let me fix that. |
I think its because the heading font is a different font and needs to be downloaded. If you would have a heading on the first view, it should not happen.
I will look into this asap. And I wonder if it is possible to customize the success and error pages? Just the texts.
Yes. We will add the illustrations in a followup PR. |
packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/Status/info.mdx
Outdated
Show resolved
Hide resolved
Thoughts in regards to naming,
Other suggestions:
Since we have a lot of
|
|
||
### Success | ||
|
||
<PropertiesTable props={StatusSuccessProperties} /> |
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.
We could perhaps add an example which shows how to use these properties.
I'm not 100% sure how to do so when reading the docs my self, as the examples as of now only use Form.Status.setStatus
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.
We don't have a prop to show the status at the moment. What could be call it? I guess just status="error"
.
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'm not sure if we are following each other here 😅
To me, when I read the property docs https://eufemia-git-feat-forms-status-eufemia.vercel.app/uilib/extensions/forms/Form/Status/properties/#error
I would think that I as a consumer/user could use these props. How can I use the cancelButton
property? Could we add an example or so, so that I can see how to use the prop?
2593f3f
to
59a80dd
Compare
I have changed the text. Maybe it's better now? |
Regarding the naming. I think I want to avoid to use submit in it. Just because it can be used in other cases as well. Like in between a Wizard step. In many ways, it acts like a "modal".
Something like this?
|
The reason behind this is that I saw a negative side-effect in PR #4357 when it comes to the initial render, where we don't want an animation, but it did animate.
I don't feel it's about the text content, but that I as a user don't get any feedback when clicking "prøv igjen", and it fails over and over again. It just displays the same text (which can be fine if it's the same error message). But there's no "flashing" of the text and/or feedback. I'm not sure if I see the latest error message or the first error message. Screen.Recording.2024-12-05.at.20.39.23.mov |
… success messages (receipt) Co-authored-by: Anders <[email protected]>
packages/dnb-eufemia/src/extensions/forms/constants/locales/nb-NO.ts
Outdated
Show resolved
Hide resolved
I see, sounds smart :) Perhaps But it doesn't feel like a normal component to me? Sort of like a Provider (probably not) or something else? |
59a80dd
to
04d5860
Compare
Here is the new build preview. |
Form.Status
components for showing error and success messages (receipt)Form.InfoOverlay
components for showing error and success messages (receipt)
dfda8b4
to
0de3fef
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.
Looks good :)
My last thought is regarding the default texts/translations that we provide.
Should we provide them? Do we think they'll ever be used?
Perhaps most of them will be used, so that gives some value. But I can't imagine Vi har mottatt din informasjon.
to ever be used in an app, as it just seems to generic for me. Same for Tilbake til forsiden
, is it that likely that they'll be navigated to the home page?
Just keep it as it is, just a few last thoughts 💚
Yes, good thoughts. |
Form.InfoOverlay
components for showing error and success messages (receipt)Form.InfoOverlay
to display error, success (receipt), or custom messages to users
## [10.60.0](v10.59.0...v10.60.0) (2024-12-10) ### 📝 Documentation * **Upload:** adds `exists` to file object ([#4346](#4346)) ([52f8b2f](52f8b2f)) * **Upload:** adds exists to docs ([b6baa64](b6baa64)) ### ✨ Features * **Field.Upload:** add `onFileClick` event ([#4369](#4369)) ([c892eec](c892eec)) * **Forms:** add `Form.InfoOverlay` to display error, success (receipt), or custom messages to users ([#4357](#4357)) ([9dd8402](9dd8402)) * **Forms:** add `onAnimationEnd` property to Form.Visibility ([#4356](#4356)) ([87728b4](87728b4)), closes [#4350](#4350) * **Forms:** add `onVisible` property to Form.Visibility ([#4350](#4350)) ([41306d8](41306d8)) * host fonts in the public directory ([#4359](#4359)) ([e6e08b2](e6e08b2)) * **Upload:** add support for async `onFileClick` event ([#4370](#4370)) ([82588c1](82588c1)) * **Upload:** adds `onFileClick` event ([#4365](#4365)) ([c5abd0e](c5abd0e)) * **Upload:** adds support for async `onFileDelete` ([#4351](#4351)) ([f41e42d](f41e42d)) * **Value.Upload:** add `onFileClick` event ([#4367](#4367)) ([56e9caf](56e9caf)) ### 🐛 Bug Fixes * **Dropdown:** enhance height calcilation and add support for strict `direction="bottom"` usage, including when used in a Dialog component ([#4368](#4368)) ([32b7b5b](32b7b5b)) * **Field.Upload:** handling of multiple async file uploads ([#4360](#4360)) ([5cb1518](5cb1518)) * **Forms:** avoid unnecessary rerenders in Form.Handler ([#4363](#4363)) ([7de5e49](7de5e49)), closes [#4357](#4357)
🎉 This PR is included in version 10.60.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
PR Preview.