Skip to content

Commit

Permalink
chore(dashboards): Remove releases on widget charts ff (#81317)
Browse files Browse the repository at this point in the history
<!-- Describe your PR here. -->
removing all instances of the `dashboards-releases-on-charts` ff because
it has been fully rolled out.
  • Loading branch information
nikkikapadia authored Nov 26, 2024
1 parent 95cba0c commit d66e44f
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ describe('add to dashboard modal', () => {
body: testDashboard,
});

MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});

eventsStatsMock = MockApiClient.addMockResponse({
url: '/organizations/org-slug/events-stats/',
body: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ function AddToDashboardModal({
widgetLegendState={widgetLegendState}
onLegendSelectChanged={() => {}}
legendOptions={
organization.features.includes('dashboards-releases-on-charts') &&
widgetLegendState.widgetRequiresLegendUnselection(widget)
? {selected: unselectedReleasesForCharts}
: undefined
Expand Down
5 changes: 5 additions & 0 deletions static/app/components/modals/widgetViewerModal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ describe('Modals -> WidgetViewerModal', function () {
body: [],
});

MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});

eventsMetaMock = MockApiClient.addMockResponse({
url: '/organizations/org-slug/events-meta/',
body: {count: 33323612},
Expand Down
4 changes: 4 additions & 0 deletions static/app/views/dashboards/dashboard.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ describe('Dashboards > Dashboard', () => {
method: 'POST',
body: [],
});
MockApiClient.addMockResponse({
url: `/organizations/org-slug/releases/stats/`,
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/events-stats/',
method: 'GET',
Expand Down
8 changes: 8 additions & 0 deletions static/app/views/dashboards/detail.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ describe('Dashboards > Detail', function () {
url: '/organizations/org-slug/releases/',
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/metrics/meta/',
body: [],
Expand Down Expand Up @@ -368,6 +372,10 @@ describe('Dashboards > Detail', function () {
url: '/organizations/org-slug/releases/',
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/sdk-updates/',
body: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ export function VisualizationStep({
shouldResize={false}
onLegendSelectChanged={() => {}}
legendOptions={
organization.features.includes('dashboards-releases-on-charts') &&
widgetLegendState.widgetRequiresLegendUnselection(widget)
? {selected: unselectedReleasesForCharts}
: undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ describe('WidgetBuilder', function () {
url: '/organizations/org-slug/releases/',
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});
MockApiClient.addMockResponse({
url: `/organizations/org-slug/spans/fields/`,
body: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ describe('WidgetBuilder', function () {
url: '/organizations/org-slug/releases/',
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});
MockApiClient.addMockResponse({
url: `/organizations/org-slug/spans/fields/`,
body: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ describe('WidgetBuilder', function () {
url: '/organizations/org-slug/releases/',
body: [],
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});
MockApiClient.addMockResponse({
url: `/organizations/org-slug/spans/fields/`,
body: [],
Expand Down
4 changes: 1 addition & 3 deletions static/app/views/dashboards/widgetCard/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ class WidgetCardChart extends Component<WidgetCardChartProps> {
chartZoomOptions,
timeseriesResultsTypes,
shouldResize,
organization,
} = this.props;

if (widget.displayType === 'table') {
Expand Down Expand Up @@ -524,8 +523,7 @@ class WidgetCardChart extends Component<WidgetCardChartProps> {

const forwardedRef = this.props.chartGroup ? this.handleRef : undefined;

return organization.features.includes('dashboards-releases-on-charts') &&
widgetLegendState.widgetRequiresLegendUnselection(widget) ? (
return widgetLegendState.widgetRequiresLegendUnselection(widget) ? (
<ReleaseSeries
end={end}
start={start}
Expand Down
4 changes: 4 additions & 0 deletions static/app/views/dashboards/widgetCard/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ describe('Dashboards > WidgetCard', function () {
data: [{title: 'title'}],
},
});
MockApiClient.addMockResponse({
url: '/organizations/org-slug/releases/stats/',
body: [],
});
});

afterEach(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ describe('WidgetLegend functions util', () => {
};
organization = {
...OrganizationFixture(),
features: ['dashboards-releases-on-charts'],
};

dashboard = {
Expand Down
6 changes: 2 additions & 4 deletions static/app/views/dashboards/widgetLegendSelectionState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ class WidgetLegendSelectionState {

return location.query.unselectedSeries
? this.decodeLegendQueryParam(widget)
: this.widgetRequiresLegendUnselection(widget) &&
this.organization.features.includes('dashboards-releases-on-charts')
: this.widgetRequiresLegendUnselection(widget)
? {
[WidgetLegendNameEncoderDecoder.encodeSeriesNameForLegend(
'Releases',
Expand All @@ -148,8 +147,7 @@ class WidgetLegendSelectionState {
}

formatLegendDefaultQuery(widget: Widget) {
return this.organization.features.includes('dashboards-releases-on-charts') &&
this.widgetRequiresLegendUnselection(widget)
return this.widgetRequiresLegendUnselection(widget)
? `${widget.id}${WIDGET_ID_DELIMITER}Releases`
: undefined;
}
Expand Down

0 comments on commit d66e44f

Please sign in to comment.