ROX-33147: Add SearchFieldLabel as frontend counterpart to backend#19002
ROX-33147: Add SearchFieldLabel as frontend counterpart to backend#19002pedrottimark merged 1 commit intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19002 +/- ##
==========================================
- Coverage 49.52% 49.52% -0.01%
==========================================
Files 2666 2666
Lines 201181 201181
==========================================
- Hits 99633 99627 -6
- Misses 94112 94116 +4
- Partials 7436 7438 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0a56997 to
4c0cc83
Compare
dvail
left a comment
There was a problem hiding this comment.
Nice!
The pattern lately has been to declare all of these client side and then add additional metadata when setting up the search filters (inputType, filterChipLabel, etc.)
I know previously we would query the backend for a list of search fields. Do you think the ability to prevent the lists from getting out of sync would make it worthwhile to define inputType etc as part of an API and delegate a lot of the attribute setup to the backend? Or is the flexibility of keeping these client side worth the small chance that we miss something when adding new searches?
|
Images are ready for the commit at 4c0cc83. To use with deploy scripts, first |
The search field labels from request for Risk and global Search do not look like what I would expect as usable without an explicit search filter configuration as elsewhere. TypeScript helps us to add in string enumeration when needed. Human risk is add without double checking backend source of truth. I will add to office hours. |
Description
Minority of leftovers after majority of search filter simplifications during previous release.
Although backend seems to use case insensitive match for search field label, define string enumeration type to prevent typos (pardon pun).
Residue
'SEVERITY''FIXABLE''CLUSTER CVE FIXABLE''SCANNABLE'User-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run tscin ui/apps/platform folder.npm run lint:fast-devin ui/apps/platform folder.