Skip to content

Commit a43f10d

Browse files
authored
chore(dashboards): Remove table view feature flag (#94958)
Remove the feature flag checks from the frontend because this feature has been fully GA'd for a while now.
1 parent 9b4f209 commit a43f10d

File tree

3 files changed

+31
-53
lines changed

3 files changed

+31
-53
lines changed

static/app/views/dashboards/manage/dashboardTable.spec.tsx

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@ describe('Dashboards - DashboardTable', function () {
2222
let dashboardUpdateMock: jest.Mock;
2323
let createMock: jest.Mock;
2424
const organization = OrganizationFixture({
25-
features: [
26-
'global-views',
27-
'dashboards-basic',
28-
'dashboards-edit',
29-
'discover-query',
30-
'dashboards-table-view',
31-
],
25+
features: ['global-views', 'dashboards-basic', 'dashboards-edit', 'discover-query'],
3226
});
3327

3428
const {router} = initializeOrg();
@@ -286,13 +280,7 @@ describe('Dashboards - DashboardTable', function () {
286280

287281
it('renders access column', async function () {
288282
const organizationWithEditAccess = OrganizationFixture({
289-
features: [
290-
'global-views',
291-
'dashboards-basic',
292-
'dashboards-edit',
293-
'discover-query',
294-
'dashboards-table-view',
295-
],
283+
features: ['global-views', 'dashboards-basic', 'dashboards-edit', 'discover-query'],
296284
});
297285

298286
render(
@@ -318,13 +306,7 @@ describe('Dashboards - DashboardTable', function () {
318306
});
319307

320308
const organizationWithFavorite = OrganizationFixture({
321-
features: [
322-
'global-views',
323-
'dashboards-basic',
324-
'dashboards-edit',
325-
'discover-query',
326-
'dashboards-table-view',
327-
],
309+
features: ['global-views', 'dashboards-basic', 'dashboards-edit', 'discover-query'],
328310
});
329311

330312
render(

static/app/views/dashboards/manage/index.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ describe('Dashboards > Detail', function () {
226226
...RouteComponentPropsFixture(),
227227
organization: {
228228
...mockAuthorizedOrg,
229-
features: [...FEATURES, 'dashboards-table-view'],
230229
},
231230
});
232231

static/app/views/dashboards/manage/index.tsx

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -255,40 +255,38 @@ function ManageDashboards() {
255255
function renderActions() {
256256
const activeSort = getActiveSort();
257257
return (
258-
<StyledActions listView={organization.features.includes('dashboards-table-view')}>
258+
<StyledActions>
259259
<SearchBar
260260
defaultQuery=""
261261
query={getQuery()}
262262
placeholder={t('Search Dashboards')}
263263
onSearch={query => handleSearch(query)}
264264
/>
265-
<Feature features={'organizations:dashboards-table-view'}>
266-
<SegmentedControl<DashboardsLayout>
267-
onChange={newValue => {
268-
setDashboardsLayout(newValue);
269-
trackAnalytics('dashboards_manage.change_view_type', {
270-
organization,
271-
view_type: newValue,
272-
});
273-
}}
274-
size="md"
275-
value={dashboardsLayout}
276-
aria-label={t('Layout Control')}
277-
>
278-
<SegmentedControl.Item
279-
key="grid"
280-
textValue="grid"
281-
aria-label={t('Grid View')}
282-
icon={<IconGrid />}
283-
/>
284-
<SegmentedControl.Item
285-
key="list"
286-
textValue="list"
287-
aria-label={t('List View')}
288-
icon={<IconList />}
289-
/>
290-
</SegmentedControl>
291-
</Feature>
265+
<SegmentedControl<DashboardsLayout>
266+
onChange={newValue => {
267+
setDashboardsLayout(newValue);
268+
trackAnalytics('dashboards_manage.change_view_type', {
269+
organization,
270+
view_type: newValue,
271+
});
272+
}}
273+
size="md"
274+
value={dashboardsLayout}
275+
aria-label={t('Layout Control')}
276+
>
277+
<SegmentedControl.Item
278+
key="grid"
279+
textValue="grid"
280+
aria-label={t('Grid View')}
281+
icon={<IconGrid />}
282+
/>
283+
<SegmentedControl.Item
284+
key="list"
285+
textValue="list"
286+
aria-label={t('List View')}
287+
icon={<IconList />}
288+
/>
289+
</SegmentedControl>
292290
<CompactSelect
293291
triggerProps={{prefix: t('Sort By')}}
294292
value={activeSort!.value}
@@ -506,10 +504,9 @@ function ManageDashboards() {
506504
);
507505
}
508506

509-
const StyledActions = styled('div')<{listView: boolean}>`
507+
const StyledActions = styled('div')`
510508
display: grid;
511-
grid-template-columns: ${p =>
512-
p.listView ? 'auto max-content max-content' : 'auto max-content'};
509+
grid-template-columns: auto max-content max-content;
513510
gap: ${space(2)};
514511
margin-bottom: ${space(2)};
515512

0 commit comments

Comments
 (0)