Bookmarks: Lazy loading page (#96455)

This commit is contained in:
Joao Silva 2024-11-14 14:24:03 +00:00 committed by GitHub
parent 09fa80a7cb
commit b820fc0111
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

1
.github/CODEOWNERS vendored
View File

@ -472,6 +472,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
/public/app/features/users/ @grafana/access-squad
/public/app/features/variables/ @grafana/dashboards-squad
/public/app/features/preferences/ @grafana/grafana-frontend-platform
/public/app/features/bookmarks/ @grafana/grafana-frontend-platform
/public/app/plugins/panel/alertlist/ @grafana/alerting-frontend
/public/app/plugins/panel/annolist/ @grafana/grafana-frontend-platform
/public/app/plugins/panel/barchart/ @grafana/dataviz-squad

View File

@ -2,14 +2,13 @@ import { css } from '@emotion/css';
import { GrafanaTheme2, NavModelItem } from '@grafana/data';
import { EmptyState, useStyles2 } from '@grafana/ui';
import { usePinnedItems } from 'app/core/components/AppChrome/MegaMenu/hooks';
import { findByUrl } from 'app/core/components/AppChrome/MegaMenu/utils';
import { NavLandingPageCard } from 'app/core/components/NavLandingPage/NavLandingPageCard';
import { Page } from 'app/core/components/Page/Page';
import { t, Trans } from 'app/core/internationalization';
import { useSelector } from 'app/types';
import { usePinnedItems } from '../AppChrome/MegaMenu/hooks';
import { findByUrl } from '../AppChrome/MegaMenu/utils';
import { NavLandingPageCard } from '../NavLandingPage/NavLandingPageCard';
export function BookmarksPage() {
const styles = useStyles2(getStyles);
const pinnedItems = usePinnedItems();
@ -63,3 +62,5 @@ const getStyles = (theme: GrafanaTheme2) => ({
padding: theme.spacing(2, 0),
}),
});
export default BookmarksPage;

View File

@ -19,7 +19,6 @@ import { getAppPluginRoutes } from 'app/features/plugins/routes';
import { getProfileRoutes } from 'app/features/profile/routes';
import { AccessControlAction, DashboardRoutes } from 'app/types';
import { BookmarksPage } from '../core/components/Bookmarks/BookmarksPage';
import { SafeDynamicImport } from '../core/components/DynamicImports/SafeDynamicImport';
import { RouteDescriptor } from '../core/navigation/types';
import { getPublicDashboardRoutes } from '../features/dashboard/routes';
@ -530,7 +529,9 @@ export function getAppRoutes(): RouteDescriptor[] {
},
{
path: '/bookmarks',
component: () => <BookmarksPage />,
component: SafeDynamicImport(
() => import(/* webpackChunkName: "BookmarksPage"*/ 'app/features/bookmarks/BookmarksPage')
),
},
...getPluginCatalogRoutes(),
...getSupportBundleRoutes(),