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

Add explore control tabOverride at the section level #9495

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Apr 9, 2020

CATEGORY

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

#9440 unintentionally moved the "Options" section for Big Number chart to the "Customize" tab.

This is because ControlPanelsContainer checks whether a section needs to display in the Data tab by checking whether any of the control in that section must trigger new queries when updated (renderTrigger: false) or has tabOverride = data. But it uses the config in the shared controls file, and assumes the control configs passed along are names of the shared controls, and could be used to look up the shared control from controls.jsx. However, when these controls are refactored into custom configs, they become objects and ControlPanelsContainer then fails to find the shared control, hence the renderTrigger and tabOverride info.

Ideally this tabOverride option should probably be at the section level.

A bigger refactor is need to let ControlPanelsContainer always read from parsed control configs (instead of the control keys). This PR is just a quick fix.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

The "Options" section is displayed in the "Customize" tab.
Snip20200408_63

After

The "Options" section is displayed in the "Data" tab like before.

image

TEST PLAN

  • Check any big number chart with trendlines.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@rusackas @michellethomas

if (
section.tabOverride === 'data' ||
Copy link
Contributor

@michellethomas michellethomas Apr 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lines 208-210 below should be changed to account for control potentially being a string or an object, right? I wouldn't block this PR on that change since we want to get the fix in, just making a note because it might cause this issue again in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should preprocess the configs at some point and avoid accounting for two types. I'll see what I can do later.

@michellethomas
Copy link
Contributor

Thanks for fixing this!

@kristw kristw merged commit 5565895 into apache:master Apr 9, 2020
@rusackas
Copy link
Member

rusackas commented Apr 9, 2020

Thanks for catching this AND for fixing it! I'll keep an eye out for this in the future.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants