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(explore): Convert buttons into context menu #81219

Merged

Conversation

narsaynorath
Copy link
Member

Convert the buttons for alerts and add to dashboards into a context menu. Shifts over a bunch of the code for both the alerts and dashboards buttons into a context menu component that's specific for explore charts.

I needed to extract the logic for getting the sort option to a helper function I could use in my callback. This is because visualizes is a list of items and we map over it for charts, meaning I can't use a hook to reference the correct chart at the point of instantiation, it needs to be used in a callback that's defined during that mapping.

Screen.Recording.2024-11-22.at.5.18.40.PM.mov

@narsaynorath narsaynorath requested a review from a team as a code owner November 22, 2024 22:24
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 22, 2024
Copy link

codecov bot commented Nov 22, 2024

Bundle Report

Changes will decrease total bundle size by 173 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 31.99MB 173 bytes (-0.0%) ⬇️

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 63.15789% with 21 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../app/views/explore/components/chartContextMenu.tsx 0.00% 19 Missing ⚠️
static/app/views/explore/hooks/useSorts.tsx 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #81219      +/-   ##
==========================================
+ Coverage   80.33%   80.36%   +0.02%     
==========================================
  Files        7225     7221       -4     
  Lines      320212   320142      -70     
  Branches    20781    20782       +1     
==========================================
+ Hits       257257   257284      +27     
+ Misses      62561    62464      -97     
  Partials      394      394              

@narsaynorath narsaynorath merged commit 614b5d8 into master Nov 25, 2024
44 checks passed
@narsaynorath narsaynorath deleted the nar/feat/dashboards-explore-turn-buttons-into-context-menu branch November 25, 2024 16:46
evanh pushed a commit that referenced this pull request Nov 25, 2024
Convert the buttons for alerts and add to dashboards into a context
menu. Shifts over a bunch of the code for both the alerts and dashboards
buttons into a context menu component that's specific for explore
charts.

I needed to extract the logic for getting the sort option to a helper
function I could use in my callback. This is because visualizes is a
list of items and we map over it for charts, meaning I can't use a hook
to reference the correct chart at the point of instantiation, it needs
to be used in a callback that's defined during that mapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants