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: Deprecates FilterBox #23784

Merged
merged 2 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RESOURCES/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ These features flags are **safe for production**. They have been tested and will
- ALLOW_ADHOC_SUBQUERY
- DASHBOARD_CROSS_FILTERS
- DASHBOARD_RBAC [(docs)](https://superset.apache.org/docs/creating-charts-dashboards/first-dashboard#manage-access-to-dashboards)
- DASHBOARD_NATIVE_FILTERS
- DATAPANEL_CLOSED_BY_DEFAULT
- DISABLE_LEGACY_DATASOURCE_EDITOR
- DRUID_JOINS
Expand All @@ -98,4 +97,5 @@ These features flags currently default to True and **will be removed in a future

[//]: # "PLEASE KEEP THE LIST SORTED ALPHABETICALLY"

- DASHBOARD_NATIVE_FILTERS
- GENERIC_CHART_AXES
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test('renders the appropriate dropdown in Message Content section', async () =>

expect(await screen.findByRole('radio', { name: /chart/i })).toBeChecked();
expect(
screen.getByRole('radio', {
await screen.findByRole('radio', {
name: /dashboard/i,
}),
).not.toBeChecked();
Expand Down
3 changes: 3 additions & 0 deletions superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ const StyledFilterContainer = styled.div`
`}
`;

/**
* @deprecated in version 3.0.
*/
class FilterBox extends React.PureComponent {
constructor(props) {
super(props);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ import controlPanel from './controlPanel';

const metadata = new ChartMetadata({
category: t('Tools'),
name: t('Filter box'),
name: t('Filter box (deprecated)'),
description:
t(`Chart component that lets you add a custom filter UI in your dashboard. When added to dashboard, a filter box lets users specify specific values or ranges to filter charts by. The charts that each filter box is applied to can be fine tuned as well in the dashboard view.

Note that this plugin is being replaced with the new Filters feature that lives in the dashboard view itself. It's easier to use and has more capabilities!`),
exampleGallery: [{ url: example1 }, { url: example2 }],
thumbnail,
useLegacyApi: true,
tags: [t('Legacy'), t('Deprecated')],
});

/**
* @deprecated in version 3.0.
*/
export default class FilterBoxChartPlugin extends ChartPlugin {
constructor() {
super({
Expand Down
2 changes: 2 additions & 0 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import polyline
import simplejson as json
from dateutil import relativedelta as rdelta
from deprecation import deprecated
from flask import request
from flask_babel import gettext as __, lazy_gettext as _
from geopy.point import Point
Expand Down Expand Up @@ -2134,6 +2135,7 @@ def get_data(self, df: pd.DataFrame) -> VizData:
return data


@deprecated(deprecated_in="3.0")
class FilterBoxViz(BaseViz):

"""A multi filter, multi-choice filter box to make dashboards interactive"""
Expand Down