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

2753 error panel needs extending to accept two errors for one input #2817

Conversation

precious-onyenaucheya-ons
Copy link
Contributor

@precious-onyenaucheya-ons precious-onyenaucheya-ons commented Sep 28, 2023

What is the context of this PR?

This fixes #2753. This ticket ensures that the error panel accepts multiple errors for a single input. Users can now enter a list of errors for a single input.

How to review this PR

Check that the error panel component can accept multiple error message as well as a single one.

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Project for this PR (Design System) and selected the correct status
  • I have selected the correct Assignee
  • I have linked the correct Issue

@netlify
Copy link

netlify bot commented Sep 28, 2023

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit fc7f2fb
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/651570ec68657900085a1c4a
😎 Deploy Preview https://deploy-preview-2817--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@precious-onyenaucheya-ons precious-onyenaucheya-ons added the Enhancement Change of existing feature label Sep 28, 2023
src/components/error/_macro-options.md Outdated Show resolved Hide resolved
src/components/error/_macro.njk Outdated Show resolved Hide resolved
src/components/error/_macro.njk Show resolved Hide resolved
src/components/error/_macro.spec.js Outdated Show resolved Hide resolved
Comment on lines 31 to 58
{{
onsDateInput({
"id": "period-from-date",
"legendOrLabel": "Period from:",
"description": "For example, 31 3 2019",
"day": {
"label": {
"text": "Day"
},
"name": "day",
"value": "31"
},
"month": {
"label": {
"text": "Month"
},
"name": "month",
"value": "13"
},
"year": {
"label": {
"text": "Year"
},
"name": "year",
"value": "2018"
}
})
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

To show the functionality I think we only need one date input and just have it ask for date of birth or something would make it simpler as the extra date input isn't really adding anything. Or could just use a single regular input with 2 problems with the answer might be even better as this isn't only going to be used on components with more than one input

Copy link
Contributor

Choose a reason for hiding this comment

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

The example now no longer makes sense because you have a period from but no period to.
I think an example based on this would be good as its a real eQ example of what would happen in a real questionnaire.

Screenshot 2023-09-28 at 13 47 00

@rmccar
Copy link
Contributor

rmccar commented Sep 28, 2023

Might be something you want to check with Dina but I think the spacing has changed when making this a list compared to a panel with a single error. This extra margin-top that has been added because it is now a list might need removing and the margin bottom added at the bottom of the list might need increasing to match <p> for consistency

Screenshot 2023-09-28 at 11 17 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Change of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error panel needs extending to accept two errors for one input
3 participants