-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add search bar in custom views #3529
Conversation
7ac05f0
to
d3626ed
Compare
ce890dc
to
c07b04b
Compare
…ustom-views' into feature/3212/add-search-bar-in-custom-views # Conflicts: # visualization/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigItemGroup.component.html # visualization/app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigItemGroup.component.ts
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.
One more thing that i noticed is that when the user manually opens for example the custom views in standard mode, then searches, then deletes the search term, the menu is gets closed. This might be a bit nitpicky but id prefer if we keep it open in that case (could use a boolean that tracks if the user manually opened it)
const lowerCasedSearchTerm = searchTerm.toLocaleLowerCase().trimEnd() | ||
return customConfigItems.filter(customConfigItem => { | ||
const isSearchTermIncludedInName = customConfigItem.name.toLocaleLowerCase().includes(lowerCasedSearchTerm) | ||
const isSearchTermInlcudedInMode = customConfigItem.mapSelectionMode.toLocaleLowerCase().includes(lowerCasedSearchTerm) |
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.
typo in isSearchTermInlcudedInMode -> it says "inlcuded"
export class FilterCustomConfigDataBySearchTermPipe implements PipeTransform { | ||
transform(customConfigItems: CustomConfigItem[], searchTerm: string) { | ||
const lowerCasedSearchTerm = searchTerm.toLocaleLowerCase().trimEnd() | ||
return customConfigItems.filter(customConfigItem => { |
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 think the filter should be its own private method here, better for readability
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.
LGTM!
Quality Gate passed for 'CodeCharta Visualization'Issues Measures |
Quality Gate passed for 'CodeCharta Analysis'Issues Measures |
Add search bar in custom views
Closes: #3212
Description
Definition of Done
A PR is only ready for merge once all the following acceptance criteria are fulfilled: