-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
feat: Implement breadcrumbs in Drill By modal #23664
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23664 +/- ##
==========================================
+ Coverage 68.02% 68.09% +0.07%
==========================================
Files 1919 1922 +3
Lines 73932 74039 +107
Branches 8067 8101 +34
==========================================
+ Hits 50291 50417 +126
+ Misses 21574 21551 -23
- Partials 2067 2071 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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 and feels very intuitive! Code looks solid, so once the tests are in this is ready to 🚢 . And a thought for post 3.0: we should standardize on the adhoc filter and groupby controls so that we always know for certain that they're drillable.
const [currentColumn, setCurrentColumn] = useState(column); | ||
// currentColumn can be an array when the original chart is grouped by multiple | ||
// columns and user navigates back to the original chart by clicking the first | ||
// breadcrumb | ||
const [currentColumn, setCurrentColumn] = useState< | ||
Column | Column[] | undefined | ||
>(column); |
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 a thought - would it potentially simplify the code, if we'd do something like this (we'd also do something similar in those other similar code blocks):
const [currentColumns, setCurrentColumns] = useState(ensureIsArray(column));
Then we wouldn't have to jump between currentColumn
and currentColumns
or worry about it potentially being undefined
.
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. Agreed with @villebro on the setCurrentColumns
nit
@villebro @lilykuang Thanks for comments. I decided to do a bit of refactoring so that |
@@ -127,7 +127,6 @@ export default function DrillByModal({ | |||
}: DrillByModalProps) { | |||
const theme = useTheme(); | |||
|
|||
console.log('DUPA', formData); |
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.
SUMMARY
This PR implements breadcrumbs component in the Drill By modal in order to:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2023-04-12.at.16.59.57.mov
TESTING INSTRUCTIONS
DRILL_BY
feature flaggroupby1 (filter1) / groupby2 (filter2) / current_groupby
ADDITIONAL INFORMATION
DRILL_BY
CC @kasiazjc