Skip to content

Conversation

@nicolethoen
Copy link
Contributor

Closes #4521

@patternfly-build
Copy link
Collaborator

patternfly-build commented Jul 20, 2020

Copy link
Member

@mcarrano mcarrano left a comment

Choose a reason for hiding this comment

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

This looks great @nicolethoen . My only question is about what the proper keyboard interaction should be for the third example with the navigation buttons. @jessiehuff can you take a look at this and let us know what you think?

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

I think that the 3rd example is a little confusing without context to show the whole interaction (like the document you are searching).

/** Value of the search input */
value?: string;
/** The count of returned search results */
results?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm, I wonder if the name is misleading. To me it does not imply it is a count.

@nicolethoen
Copy link
Contributor Author

I think that the 3rd example is a little confusing without context to show the whole interaction (like the document you are searching).

@tlabaj but adding more context, wouldn't that break our typical documentation and example practices?
Could I leave this example out or move it to a demo instead?

@mcarrano

@mcarrano
Copy link
Member

We could add a demo in the future, but I'd still be in favor of leaving the example in. This is one of the reasons it would be helpful to have example descriptions. Maybe if we changed the name of the example to something like, "Find input with multiple matches?" That would better describe the use case this is intended for. @nicolethoen @tlabaj what do you think?

@nicolethoen
Copy link
Contributor Author

nicolethoen commented Jul 28, 2020

We could add a demo in the future, but I'd still be in favor of leaving the example in. This is one of the reasons it would be helpful to have example descriptions. Maybe if we changed the name of the example to something like, "Find input with multiple matches?" That would better describe the use case this is intended for. @nicolethoen @tlabaj what do you think?

I used the same example name that was used in Core. That doesn't necessarily make it the best name, but the component is called Search Input and it already has an example with multiple matches. The example up for debate is the example with navigable options. I think navigable is the key word...

kmcfaul
kmcfaul previously approved these changes Jul 29, 2020
Copy link
Contributor

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

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

LGTM, I think the third example is explained enough with the 'with navigable options' description. Adding a full demo with the search input and results pages to the demo's section can be done later on.

value?: string;
/** The number of search results returned. Either a total number of results,
* or a string representing the current result over the total number of results. i.e. "1 / 5" */
numberOfResults?: number | string;
Copy link
Member

Choose a reason for hiding this comment

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

The numberOfResults name implies number is the type. Perhaps this be something more like "resultsCount", "resultsTotal", or "resultsText"?

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Looks great! Only thing I see is that when you reach the beginning or end of the navigable result list, the appropriate nav button should be disabled.

@tlabaj
Copy link
Contributor

tlabaj commented Aug 3, 2020

Looks great! Only thing I see is that when you reach the beginning or end of the navigable result list, the appropriate nav button should be disabled.

@mcoker that functionality will be defined my the consumer. They very well could have the button enabled and when clicked, search from the beginning. In that case the results string should be updated to 1/3.
So, my question here is which interaction do we want to show @mcarrano .

@mcarrano
Copy link
Member

mcarrano commented Aug 3, 2020

@mcoker that functionality will be defined my the consumer. They very well could have the button enabled and when clicked, search from the beginning. In that case the results string should be updated to 1/3.
So, my question here is which interaction do we want to show @mcarrano .

Not sure exactly what you mean here @tlabaj . Are you saying that clicking "^" if you are already on the first item would re-invoke the search? I think that disabling the first and last buttons would be the right thing to do in most cases, but don't feel strongly about this.

@mcarrano
Copy link
Member

mcarrano commented Aug 3, 2020

@jessiehuff are you good with the keyboard interaction on this? I wasn't sure what to expect.

Copy link
Contributor

@jessiehuff jessiehuff left a comment

Choose a reason for hiding this comment

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

LGTM! All functionality is keyboard accessible with the tab and enter/space keys which I think makes sense. It sounds good with VO as well. 🙂 Nice job!

@tlabaj tlabaj merged commit bca4005 into patternfly:master Aug 3, 2020
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • @patternfly/react-catalog-view-extension@4.7.2
  • @patternfly/react-core@4.38.0
  • @patternfly/react-docs@5.7.2
  • @patternfly/react-inline-edit-extension@4.5.54
  • demo-app-ts@4.28.0
  • @patternfly/react-integration@4.28.0
  • @patternfly/react-table@4.14.2
  • @patternfly/react-topology@4.4.56
  • @patternfly/react-virtualized-extension@4.5.44

Thanks for your contribution! 🎉

@nicolethoen nicolethoen deleted the search_input_component branch February 8, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add search input component

8 participants