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: Removing DASHBOARD_CROSS_FILTERS flag and all that comes with it. #31794

Merged
merged 9 commits into from
Jan 28, 2025

Conversation

rusackas
Copy link
Member

SUMMARY

Approved 5.0 change. The feature is now ready for prime time!

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@rusackas rusackas added the risk:breaking-change Issues or PRs that will introduce breaking changes label Jan 10, 2025
@dosubot dosubot bot added the dashboard:cross-filters Related to the Dashboard cross filters label Jan 10, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Fix Detected
Functionality Cross Filters Default Behavior Changed ▹ view
Files scanned
File Path Reviewed
superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts
superset-frontend/src/dashboard/util/crossFilters.ts
superset-frontend/src/dashboard/components/nativeFilters/utils.ts
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx
superset-frontend/src/dataMask/reducer.ts
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBarSettings/index.tsx
superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx
superset-frontend/src/dashboard/components/Dashboard.jsx
superset-frontend/src/dashboard/actions/hydrate.js
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx
superset-frontend/src/components/Chart/ChartRenderer.jsx
superset-frontend/src/dashboard/components/nativeFilters/selectors.ts
superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
superset-frontend/src/dashboard/actions/dashboardState.js
superset/config.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Current Korbit Configuration

General Settings
Setting Value
Review Schedule Automatic excluding drafts
Max Issue Count 10
Automatic PR Descriptions
Issue Categories
Category Enabled
Naming
Database Operations
Documentation
Logging
Error Handling
Systems and Environment
Objects and Data Structures
Readability and Maintainability
Asynchronous Processing
Design Patterns
Third-Party Libraries
Performance
Security
Functionality

Feedback and Support

Note

Korbit Pro is free for open source projects 🎉

Looking to add Korbit to your team? Get started with a free 2 week trial here

@@ -475,8 +472,7 @@ const DashboardBuilder = () => {
ELEMENT_ON_SCREEN_OPTIONS,
);

const showFilterBar =
(crossFiltersEnabled || nativeFiltersEnabled) && !editMode;
Copy link
Member

Choose a reason for hiding this comment

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

was nativeFiltersEnabled already cleaned up?

Copy link
Member Author

@rusackas rusackas Jan 13, 2025

Choose a reason for hiding this comment

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

Not sure, actually, but it's part of an OR statement, so with crossFiltersEnabled always being true, it doesn't actually matter, so the whole parenthetical will be true, and then showFilterBar can be replaced by !editMode

@@ -104,44 +104,14 @@ test('Dropdown trigger does not render without dashboard edit permissions', asyn
expect(screen.queryByRole('img', { name: 'gear' })).not.toBeInTheDocument();
});

test('Dropdown trigger renders with FF DASHBOARD_CROSS_FILTERS on', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Did you want to update this test as just "Dropdown trigger renders"?

Copy link
Member Author

Choose a reason for hiding this comment

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

The dropdown trigger is clicked in other tests so I wasn't worried about keeping it as a separate one. Those other tests would fail if it didn't render.

Copy link
Member

@sadpandajoe sadpandajoe left a comment

Choose a reason for hiding this comment

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

LGTM

@rusackas rusackas force-pushed the removing-DASHBOARD_CROSS_FILTERS-flag branch 2 times, most recently from 7d2eff9 to ab07447 Compare January 27, 2025 17:43
@@ -90,10 +88,7 @@ class ChartRenderer extends Component {
)?.suppressContextMenu;
this.state = {
showContextMenu:
props.source === ChartSource.Dashboard &&
!suppressContextMenu &&
(isFeatureEnabled(FeatureFlag.DrillToDetail) ||
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 we should keep the check for drill to detail here

Copy link
Member

Choose a reason for hiding this comment

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

+1

@kgabryje
Copy link
Member

@rusackas I think the tests should pass now

@kgabryje kgabryje force-pushed the removing-DASHBOARD_CROSS_FILTERS-flag branch from c2a5df2 to 524753b Compare January 28, 2025 16:07
@kgabryje kgabryje merged commit 962fd4c into master Jan 28, 2025
48 checks passed
@kgabryje kgabryje deleted the removing-DASHBOARD_CROSS_FILTERS-flag branch January 28, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:cross-filters Related to the Dashboard cross filters packages risk:breaking-change Issues or PRs that will introduce breaking changes size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants