-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Update] Improve Sample Viewer search #228
Conversation
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.
Haven't finished the review yet, here are some initial comments.
Co-authored-by: Ting <tchen@esri.com>
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'll take a look at the bold text method after these suggestions are addressed.
Co-authored-by: Ting <tchen@esri.com>
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.
Please make the bold method an private extension. I'll add Phil to review as well.
[Fix] Remove the relevant APIs from the tags in the `Sample` struct
I'll assign this PR to myself and work on the feedback. |
Co-authored-by: Philip Ridgeway <pridgeway@esri.com>
Use `symbolVariant` instead of ternary operator. Co-authored-by: Philip Ridgeway <pridgeway@esri.com>
Only make the tags a set at the last step of code generation, so it keeps the order for the most part. Co-authored-by: Philip Ridgeway <pridgeway@esri.com>
To allow the compiler to synthesize the default initializer.
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.
Just the one suggestion
Thanks for all your suggestions! |
When I was closing the opened tabs, I found the |
Description
This PR updates the sample search bar in the Sample Viewer to include the searching of a sample's description and tags in addition to the name. Currently, the search bar performs a partial-text search on the names, a partial-text search on the descriptions, and a full-text search on the tags, in that order. The search results are divided into three sections, Name, Description, and Tags. Sections do not include samples that were found in a previous section, if any. Also, sections that have no results are hidden. If the search query is empty, a list of all the samples is displayed, sorted by name. Additionally, the query search text is bolded in the sample names and descriptions.
Linked Issue(s)
swift/issues/4230
How To Test
Screenshots
To Discuss
A couple things to think about:
AttributedString
)