Skip to content

fix(explore): hide advanced analytics for non temporal xaxis#28312

Merged
michael-s-molina merged 6 commits into
apache:masterfrom
justinpark:fix--explore-hide-advanced-analytics-for-non-temporal-xaxis
May 8, 2024
Merged

fix(explore): hide advanced analytics for non temporal xaxis#28312
michael-s-molina merged 6 commits into
apache:masterfrom
justinpark:fix--explore-hide-advanced-analytics-for-non-temporal-xaxis

Conversation

@justinpark
Copy link
Copy Markdown
Member

SUMMARY

The superset feature allows users to choose a non-temporal column for the x-axis.
However, when a non-temporal column is selected, advanced analytics and forecast options are not compatible.

In order to address this, UI should dynamically hide these features when a non-temporal column is selected.
This commit introduces the visibility option in the ControlPanelSectionConfig, enabling the hiding of specific groups of controlSets.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

before--hide-non-temporal.mov

After:

after--hide-non-temporal.mov

TESTING INSTRUCTIONS

Choose non-temporal column in x-axis option
Verify that "Advanced analytics" and "Predictive Analytics" sections are hidden

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

@justinpark justinpark changed the title Fix explore hide advanced analytics for non temporal xaxis fix(explore): hide advanced analytics for non temporal xaxis May 2, 2024
Copy link
Copy Markdown
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @justinpark. I left some first-pass comments.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we rename this to showTimeRelatedControls?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@michael-s-molina to clarify and specify the functionality, i'm thinking of use displayWhenTimeRelatedControls.
What do you think?

Copy link
Copy Markdown
Member

@michael-s-molina michael-s-molina May 2, 2024

Choose a reason for hiding this comment

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

displayTimeRelatedControls (without when) works too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you avoid describe?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
description: t('Advanced analytical post processin'),
description: t('Advanced analytics post processing'),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You're also testing if the panel is displayed when the visibility is true.

Suggested change
test('hide ControlPanelSections when its visibility is false', async () => {
test('visibility of panels is correctly applied', async () => {

@michael-s-molina michael-s-molina requested a review from geido May 2, 2024 11:50
@justinpark justinpark force-pushed the fix--explore-hide-advanced-analytics-for-non-temporal-xaxis branch from d5e2c33 to 24da739 Compare May 2, 2024 17:16
@michael-s-molina
Copy link
Copy Markdown
Member

@justinpark Can you also make sure to ignore or remove the values from the form data in case a user starts with a temporal column, fills the advanced properties and later changes to a categorial x-axis?

@pull-request-size pull-request-size Bot added size/XL and removed size/L labels May 7, 2024
@justinpark justinpark force-pushed the fix--explore-hide-advanced-analytics-for-non-temporal-xaxis branch from 800e989 to f1278a8 Compare May 7, 2024 23:23
@justinpark
Copy link
Copy Markdown
Member Author

@justinpark Can you also make sure to ignore or remove the values from the form data in case a user starts with a temporal column, fills the advanced properties and later changes to a categorial x-axis?

Done

@justinpark justinpark force-pushed the fix--explore-hide-advanced-analytics-for-non-temporal-xaxis branch from f1278a8 to c213433 Compare May 8, 2024 16:25
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 8, 2024
@michael-s-molina michael-s-molina merged commit 07cd1d8 into apache:master May 8, 2024
@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label May 8, 2024
michael-s-molina pushed a commit that referenced this pull request May 8, 2024
...form_data,
...restoredField,
},
hiddenFormData,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A bit too late, but I guess there should be omit(hiddenFormData, fieldNames), otherwise it seems to break any field that was hidden once.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@Vovch thanks for catching up. I'll post the hotfix which will fix the #29331

@sfirke
Copy link
Copy Markdown
Member

sfirke commented Jun 21, 2024

@Vovch are you saying this introduced a bug? Based on your comment I am trying this out in 4.0.2rc1 and indeed experiencing something that might be a bug. I created a new issue #29331 for it and would appreciate if you can expand on whether this is what you were talking about.

@mistercrunch mistercrunch added 🍒 4.0.2 Cherry-picked to 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
@mistercrunch mistercrunch added the 🚢 4.1.0 First shipped in 4.1.0 label Nov 27, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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 lgtm This PR has been approved by a maintainer packages size/XL v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2 Cherry-picked to 4.0.2 🚢 4.1.0 First shipped in 4.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants