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: add search results and dialog with input (resolves #207) #252

Merged
merged 5 commits into from
Feb 19, 2020

Conversation

greatislander
Copy link
Collaborator

@greatislander greatislander commented Feb 18, 2020

Description

  • Adds support for optional text input to dialog component.
  • Implements page layout for search results.

Steps to test

Review dialog component and search results layout.

Additional information

Not applicable.

Related issues

@greatislander greatislander changed the title feat: add support for optional text input to dialog component feat: add search results layout and dialog with input (resolves #207) Feb 18, 2020
@greatislander greatislander self-assigned this Feb 18, 2020
@greatislander greatislander added the enhancement New feature or request label Feb 18, 2020
@greatislander greatislander added this to In progress in Pinecone 1.0.0 via automation Feb 18, 2020
@greatislander greatislander added this to To do in Cooperative Resource Library 1.0.0 via automation Feb 18, 2020
@greatislander greatislander moved this from To do to In progress in Cooperative Resource Library 1.0.0 Feb 18, 2020
@greatislander greatislander added this to the 1.0.0-alpha.11 milestone Feb 18, 2020
@netlify
Copy link

netlify bot commented Feb 18, 2020

Deploy preview for pinecone ready!

Built with commit 9b30444

https://deploy-preview-252--pinecone.netlify.com

@cherylhjli
Copy link

Spacing is good.
For modal with input, can we try this copy?

H1: Save Search
Body: To save your search, please give it a name so you can identify it later.

Input field label: Name of saved search:

CTA:
Primary: Save
Secondary: Don’t save

@greatislander
Copy link
Collaborator Author

@cherylhjli Back to you for final review.

Cooperative Resource Library 1.0.0 automation moved this from In progress to Reviewer approved Feb 19, 2020
Pinecone 1.0.0 automation moved this from In progress to Reviewer approved Feb 19, 2020
@greatislander greatislander changed the title feat: add search results layout and dialog with input (resolves #207) feat: add search results and dialog with input (resolves #207) Feb 19, 2020
@greatislander greatislander merged commit fceb145 into dev Feb 19, 2020
src/assets/scripts/Pinecone/Dialog/index.js Show resolved Hide resolved
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}" />`;
Copy link
Contributor

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?

Copy link
Collaborator Author

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:

  1. 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).
  2. This guide doesn't mention adding a close button other than the cancel button: https://guide.inclusivedesign.ca/tools/AccessibleDevelopmentTools.html
  3. 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".

Cooperative Resource Library 1.0.0 automation moved this from Reviewer approved to Done Feb 19, 2020
Cooperative Resource Library 1.0.0 automation moved this from Done to Review in progress Feb 19, 2020
Pinecone 1.0.0 automation moved this from Reviewer approved to Done Feb 19, 2020
Pinecone 1.0.0 automation moved this from Done to Review in progress Feb 19, 2020
@greatislander greatislander deleted the add/search-results branch February 19, 2020 19:06
greatislander added a commit that referenced this pull request Feb 19, 2020
greatislander added a commit that referenced this pull request Feb 19, 2020
@greatislander greatislander moved this from Review in progress to Done in Pinecone 1.0.0 Feb 20, 2020
@greatislander greatislander moved this from Review in progress to Done in Cooperative Resource Library 1.0.0 Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Browse all page: When filters & search term is applied
3 participants