Chore: remove team folders toggle (#126551)

This commit is contained in:
Andrej Ocenas
2026-07-02 15:58:15 +02:00
committed by GitHub
parent dc1dc2722f
commit d1c52b2ee2
35 changed files with 134 additions and 206 deletions
@@ -54,6 +54,13 @@ jest.mock('../../../../types/store', () => {
};
});
// The folder mutations refresh the team folders tree as a side effect. listTeamFolders would error
// here because this test mocks the app dispatch, so stub it out.
jest.mock('app/features/browse-dashboards/api/services', () => ({
...jest.requireActual('app/features/browse-dashboards/api/services'),
listTeamFolders: jest.fn(async () => []),
}));
setBackendSrv(backendSrv);
setupMockServer();
@@ -1,6 +1,5 @@
import { generatedAPI } from '@grafana/api-clients/rtkq/folder/v1beta1';
import { invalidateQuotaUsage } from '@grafana/api-clients/rtkq/quotas/v0alpha1';
import { config } from '@grafana/runtime';
import { PAGE_SIZE } from 'app/features/browse-dashboards/api/constants';
import { TEAM_FOLDERS_UID } from 'app/features/search/constants';
import { dispatch } from 'app/store/store';
@@ -9,10 +8,6 @@ import { type DescendantCount } from 'app/types/folders';
import { getParsedCounts } from './utils';
async function refreshTeamFolders() {
if (!config.featureToggles.teamFolders) {
return;
}
// Lazy-imported to avoid a circular dependency: state/actions transitively imports
// browseDashboardsAPI, which imports this module via folder/v1beta1/hooks.
const { refetchChildren } = await import('app/features/browse-dashboards/state/actions');