Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Shifan-Gu
Copy link
Contributor

@Shifan-Gu Shifan-Gu commented Jan 3, 2024

Relates to: #7268

Description:

Introduces a feature flag to let dashboard filters override the chart filter if they have the same target field.

dashboard.filter.override.-.Lightdash.-.4.April.2024.mp4

Reviewer actions

  • I have manually tested the changes in the preview environment
  • I have reviewed the code
  • I understand that "request changes" will block this PR from merging

@netlify
Copy link

netlify bot commented Jan 3, 2024

👷 Deploy request for peaceful-bassi-cbf284 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 561552b

@ZeRego
Copy link
Collaborator

ZeRego commented Jan 3, 2024

Dashboard filters not overriding chart filters is intentional behaviour.
Replacing filter values without context is dangerous.

eg: Big number chart "Revenue total" that has the filter order_status=completed.

If the Dashboard has a filter order_status=pending it will override the chart and provide wrong data to the user.

Ideally, charts used in dashboards should be as generic as possible and only have filters that make sure the data is current. eg: instead of Total revenue for USA with filter order_country=USA it could be named Total revenue without a country filter.

@ZeRego
Copy link
Collaborator

ZeRego commented Jan 3, 2024

Closing this PR for now.

Looks like there is an open ticket for this feature #7268
I left a more detailed comment there.

@ZeRego ZeRego closed this Jan 3, 2024
@ZeRego ZeRego reopened this Apr 3, 2024
@ZeRego ZeRego marked this pull request as draft April 3, 2024 15:14
@ZeRego ZeRego self-assigned this Apr 3, 2024
@ZeRego ZeRego self-requested a review April 3, 2024 15:14
@ZeRego ZeRego changed the title fix: override chart filters with dashboard filters feat: override chart filters with dashboard filters Apr 3, 2024
@ZeRego ZeRego force-pushed the fix/override-chart-filters branch from 5a1debc to 561552b Compare April 4, 2024 10:35
Copy link
Collaborator

@ZeRego ZeRego left a comment

Choose a reason for hiding this comment

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

LGTM

Note that this PR allows dashboard filters to override chart filters but is behind a Posthog feature flag.
The feature flag is going to be removed and available to everyone when we close the ticket: #7268

@owlas owlas requested a deployment to duplicate_fix/override-chart-filters - jaffle_db_pg_13 PR #9640 April 4, 2024 10:45 — with Render Abandoned
@owlas owlas temporarily deployed to duplicate_fix/override-chart-filters - headless-browser PR #9640 April 4, 2024 10:45 — with Render Destroyed
@ZeRego ZeRego marked this pull request as ready for review April 4, 2024 10:45
@owlas owlas temporarily deployed to duplicate_fix/override-chart-filters - lightdash PR #9640 April 4, 2024 10:46 — with Render Destroyed
@ZeRego ZeRego merged commit 354b37c into lightdash:main Apr 4, 2024
lightdash-bot pushed a commit that referenced this pull request Apr 4, 2024
# [0.1057.0](0.1056.0...0.1057.0) (2024-04-04)

### Features

* override chart filters with dashboard filters ([#8461](#8461)) ([354b37c](354b37c))
@lightdash-bot
Copy link
Collaborator

🎉 This PR is included in version 0.1057.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants