-
Notifications
You must be signed in to change notification settings - Fork 3
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: add search results and dialog with input (resolves #207) #252
Conversation
Deploy preview for pinecone ready! Built with commit 9b30444 |
Spacing is good. H1: Save Search Input field label: Name of saved search: CTA: |
@cherylhjli Back to you for final review. |
if ( this.config.input && this.config.inputLabel ) { | ||
innerHtml += '<div class="input-group">'; | ||
innerHtml += `<label for="${this.config.input}">${this.config.inputLabel}</label>`; | ||
innerHtml += `<input id="${this.config.input}" type="text" name="${this.config.input}" />`; |
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.
Couple questions (more design related):
- Should there be an explicit close button on the dialog? My expectation is there should be one.
- If the input field is mandatory, I think the initial focus should be on the input field (or second in the tab order if a close button is added as per comment above).
- If the input field is optional, the initial focus can be on "No, don't save".
Thoughts?
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.
* Should there be an explicit close button on the dialog? My expectation is there should be one.
I thought we had discussed this at some point, but my thinking was that we shouldn't. I was thinking this for a few reasons:
- The modal is essentially an enhanced version of a native
confirm()
dialog, which doesn't provide a close button; you either confirm or cancel (hitting the esc key is effectively the same as cancelling the operation). - This guide doesn't mention adding a close button other than the cancel button: https://guide.inclusivedesign.ca/tools/AccessibleDevelopmentTools.html
- In this case, where a user may have entered text, closing the dialog with a neutral close button as opposed to a specific cancel button might lead some users to think that if they invoke the dialog again, their input will be preserved.
* If the input field is mandatory, I think the initial focus should be on the input field (or second in the tab order if a close button is added as per comment above).
Agreed! Fixed in c220f9b.
* If the input field is optional, the initial focus can be on "No, don't save".
Description
Steps to test
Review dialog component and search results layout.
Additional information
Not applicable.
Related issues