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

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

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

@rusackas rusackas force-pushed the removing-DASHBOARD_CROSS_FILTERS-flag branch from 9b50bf9 to dbf8a3c Compare January 13, 2025 21:55
@@ -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

UPDATING.md Outdated Show resolved Hide resolved
@@ -45,6 +45,12 @@ describe('nativeFilterGate', () => {
});

it('should return false for native filter chart with cross filter support', () => {
isFeatureEnabledMock.mockImplementation(feature => {
if (feature === FeatureFlag.DASHBOARD_CROSS_FILTERS) return false;
Copy link
Member

Choose a reason for hiding this comment

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

I believe FeatureFlag.DASHBOARD_CROSS_FILTERS will not exist anymore given that we are removing the feature flag. We need to remove all references of it.

Copy link
Member Author

@rusackas rusackas Jan 14, 2025

Choose a reason for hiding this comment

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

Yeah, I did, and then I tried using Cursor to get tests to pass, and it brought it right back! Ugh.

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
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/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants