-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
fix: show label for filters in filter box in explore #10412
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10412 +/- ##
==========================================
- Coverage 70.26% 65.42% -4.84%
==========================================
Files 605 605
Lines 32425 32424 -1
Branches 3295 3295
==========================================
- Hits 22784 21214 -1570
- Misses 9532 11025 +1493
- Partials 109 185 +76
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
In the case of a bugfix, adding an assertion to the test would be ideal. But this looks simple enough to me to approve.
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 quickly tested this, and it appears that the change adds Filters
as the default label for new filters. It appears to be passed down from the FilterBox control panel, where label actually refers to label of the filter section. So I don't believe this is intended behavior. I'd also propose to add an assertion to the test like @rusackas hinted at.
const TEST_LABEL = 'some label'; | ||
const defaultProps = { | ||
label: TEST_LABEL, |
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.
As TEST_LABEL
isn't being used anywhere else, I don't see a reason create a const
for it.
const TEST_LABEL = 'some label'; | |
const defaultProps = { | |
label: TEST_LABEL, | |
const defaultProps = { | |
label: 'some label', |
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.
fixed
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.
The propTypes
for label needs to be added, apart from that LGTM.
@villebro added |
* fix: show label for filters in filter box in explore * test: add test for label in filter box * test: add test / fix lint * fix: fix CR notes * refactor: add label propType to FilterBoxItemControl.jsx
* fix: show label for filters in filter box in explore * test: add test for label in filter box * test: add test / fix lint * fix: fix CR notes * refactor: add label propType to FilterBoxItemControl.jsx
Bug: Doesn't show label in filters for FilterBox
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TEST PLAN
Added test for Filter box label
ADDITIONAL INFORMATION