-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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(discover): Allow more options for the topEvents #28926
Conversation
- This allows up to 10 top events on the discover frontend - This changes the display *text* to `Top Daily` and `Top Display` and adds a new dropdown for the limit
@@ -45,6 +50,10 @@ export default function ChartFooter({ | |||
<SectionValue key="total-value">{total.toLocaleString()}</SectionValue> | |||
) | |||
); | |||
const topEventOptions: SelectValue<string>[] = []; | |||
for (let i = 2; i <= 10; i++) { |
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.
Not sure if there's an argument for allowing top-1?
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 people could conceivably want to look at "top event"? I don't have strong opinions on this other than it looks less odd if we just allow 1-10.
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.
👍 Good point, i'll update this to include 1 just so its more aesthetically pleasing
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.
Aside from the dropdown possibly being a bit wonky, LGTM. We will need to update chartcuterie to just the topEvents value from the URL params instead of defaulting to 5 as a follow up too.
@@ -45,6 +50,10 @@ export default function ChartFooter({ | |||
<SectionValue key="total-value">{total.toLocaleString()}</SectionValue> | |||
) | |||
); | |||
const topEventOptions: SelectValue<string>[] = []; | |||
for (let i = 2; i <= 10; i++) { |
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 people could conceivably want to look at "top event"? I don't have strong opinions on this other than it looks less odd if we just allow 1-10.
Oh and should we add tests? |
- Shrinking the width of dropdown - Including 1
Top Daily
andTop Display
andadds a new dropdown for the limit
Preview