-
Notifications
You must be signed in to change notification settings - Fork 147
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: Allows for splitting stats' distinct values into a different element that shows in modal #960
Conversation
6d52e68
to
84c09cc
Compare
4ef78e6
to
1f856c4
Compare
Code looks good to me but referencing back to the design isn't the modal supposed to be less wide? |
👍 |
Yeah, I changed it already, that's an old screenshot. |
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!
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.
Overall looks pretty good. Left some comments to help with readability.
@@ -41,8 +42,9 @@ const ColumnStats: React.FC<ColumnStatsProps> = ({ | |||
if (stats.length === 0) { | |||
return null; | |||
} | |||
const startEpoch = Math.min(...stats.map(getStart)); | |||
const endEpoch = Math.max(...stats.map(getEnd)); | |||
const filteredStats = filterOutUniqueValues(stats); |
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 nit about readability: We're using the both distinct (distinctStatTypeName
) and unique (uniqueValues
) somewhat interchangeably. I think it would be better to use either distinct
or unique
consistently for both the configs and util functions.
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 was using the unique values name until I found they call them distinct on the backend.
you are right, I will rename the configuration.
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
d5281cc
to
86605b1
Compare
…ement that shows in modal (#960) * Summary of values Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Tested ExpandableUniqueValues and consolidated helpers related to stats Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Plugging the modal, not tested on app yet Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Tweaking link and comma separated list Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Modal showing with right sizes and tweaking spacing on summary Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Add tooltip to see all button Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Moved hardcoded distinct values key into the configuration Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Updatind docs Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Removing naming convention betterer checks Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Updating proptypes rule, simplifying stats logic Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com> * Renaming distinct to unique values all over Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
Summary of Changes
This is part of the work around table stats
Splits distinct values from the regular stats table
Consolidates stats utils in one file
Adds a configuration option to add the distinct values stat name to the configuration
Tests
Added tests for new components
Tested utils
Screenshots
Documentation
Soon
CheckList
Make sure you have checked all steps below to ensure a timely review.