Skip to content
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

Merged
merged 4 commits into from
Oct 4, 2021

Conversation

wmak
Copy link
Member

@wmak wmak commented Sep 29, 2021

  • 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

Preview

image

- 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
@wmak wmak requested review from a team September 29, 2021 00:12
@@ -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++) {
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

@shruthilayaj shruthilayaj left a 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++) {
Copy link
Member

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.

@shruthilayaj
Copy link
Member

Oh and should we add tests?

- Shrinking the width of dropdown
- Including 1
@wmak wmak merged commit 5ab454b into master Oct 4, 2021
@wmak wmak deleted the wmak/feat/top-events-choice branch October 4, 2021 17:03
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants