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

Change request advanced search and filter #4544

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Aug 22, 2023

About the changes

Filtering and searching change requests.

filtering options:
Screenshot 2023-08-22 at 16 40 46

searching options:
Screenshot 2023-08-22 at 16 40 53

Important files

Discussion points

@vercel
Copy link

vercel bot commented Aug 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2023 2:40pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2023 2:40pm

@@ -9,12 +11,15 @@ const StyledContainer = styled('div')(({ theme }) => ({
}));

export const AvatarCell = ({ value }: any) => {
const { searchQuery } = useSearchHighlightContext();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added highlighter to all components that were missing it

suggestedOption:
filterOptions[randomRow] ?? `example-${column.filterName}`,
options[randomRow] ?? `example-${column.filterName}`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we want to suggest from the valid options after pre-processing. E.g. with quotes, with split new line

const options = [...new Set(filterOptions)]
.filter(Boolean)
.flatMap(item => item.split('\n'))
.filter(item => !item.includes('"') && !item.includes("'"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if your field value is using quotes (corner case) we filter it out to not mess with the search quotes

@@ -61,7 +61,7 @@ export const SearchDescription: VFC<ISearchDescriptionProps> = ({
{filter.values.join(',')}
</StyledCode>{' '}
in {filter.header}. Options:{' '}
{filter.options.join(', ')}
{filter.options.slice(0, 10).join(', ')}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't want to present more than 10 options. E.g. for feature names in change request list

Copy link
Contributor

@FredrikOseberg FredrikOseberg left a comment

Choose a reason for hiding this comment

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

LGTM

@kwasniew kwasniew merged commit 0e16236 into main Aug 23, 2023
15 checks passed
@kwasniew kwasniew deleted the change-request-advanced-search-and-filter branch August 23, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants