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

chore: Enable suppressing default chart context menu #30613

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kgabryje
Copy link
Member

SUMMARY

Add a config option to chart metadata to allow suppressing the default chart context menu on the dashboard (the one with the default cross filter and drill to detail menu items)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Tests should pass
  2. The dashboard context menu should work like before

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the change:frontend Requires changing the frontend label Oct 15, 2024
@github-actions github-actions bot added packages and removed change:frontend Requires changing the frontend labels Oct 15, 2024
@michael-s-molina
Copy link
Member

@kgabryje Can you explain a little bit more about the intention of this PR? Currently, disabled options are greyed out by default but you're trying to completely suppress the menu, which might lead to users asking why right click is not working. Could you explain what's the use case you're trying to solve?

@michael-s-molina michael-s-molina added the review:checkpoint Last PR reviewed during the daily review standup label Oct 15, 2024
@kgabryje
Copy link
Member Author

@kgabryje Can you explain a little bit more about the intention of this PR? Currently, disabled options are greyed out by default but you're trying to completely suppress the menu, which might lead to users asking why right click is not working. Could you explain what's the use case you're trying to solve?

The intention is so that a viz plugin can define it's own, fully custom context menu. For example, the viz plugin could have a context menu with more actions, specific to this plugin.
This option is not intended to be used with any of our currently existing plugins

@michael-s-molina
Copy link
Member

michael-s-molina commented Oct 15, 2024

This option is not intended to be used with any of our currently existing plugins

I recommend adding a comment to the property explaining the use as it can be easily removed. This also raises the question if this shouldn't be an extension to be more explicit.

@sadpandajoe sadpandajoe removed the review:checkpoint Last PR reviewed during the daily review standup label Oct 16, 2024
@kgabryje
Copy link
Member Author

@michael-s-molina Added a comment. I believe this change fits in Superset - for instance, it would be useful if in the future we wanted to improve the table viz plugin by adding more table-related actions to the context menu. Currently it's not possible as we are limited by the context menu defined in ChartRenderer which is the same for every plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants