refactor DashboardControls (#44558)
* WIP PublicOrCustomEmbedDashboardPage without using dashboard controls * add usePublicDashboardEndpoints instead of WithPublicDashboardEndpoints * fix type error by setting null as default value for hide_parameters and hide_download_button * use usePublicDashboardEndpoints inside WithPublicDashboardEndpoints * also migrate embed * i don't think we need useDashboardNav public/static embed * SetTitle component to use instead of the `title` hoc * wrap setEmbedDashboardEndpoints/setPublicDashboardEndpoints in useEffect as per PR comment * after the fix for metabase#38640 we don't need the public routes in the main app * renamed test file * change tests to use PublicOrEmbeddedDashboardPage * remove PublicOrEmbeddedDashboardControlled and change imports for PublicOrEmbeddedDashboardPage * remove debug prop left by mistake
Showing
- frontend/src/metabase/hoc/Title.jsx 14 additions, 0 deletionsfrontend/src/metabase/hoc/Title.jsx
- frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard/PublicOrEmbeddedDashboard.tsx 3 additions, 16 deletions...s/PublicOrEmbeddedDashboard/PublicOrEmbeddedDashboard.tsx
- frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard/PublicOrEmbeddedDashboardPage.tsx 71 additions, 0 deletions...blicOrEmbeddedDashboard/PublicOrEmbeddedDashboardPage.tsx
- frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard/PublicOrEmbeddedDashboardPage.unit.spec.tsx 3 additions, 3 deletions...ddedDashboard/PublicOrEmbeddedDashboardPage.unit.spec.tsx
- frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard/WithPublicDashboardEndpoints.tsx 18 additions, 14 deletions...ublicOrEmbeddedDashboard/WithPublicDashboardEndpoints.tsx
- frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard/index.ts 1 addition, 1 deletion...base/public/containers/PublicOrEmbeddedDashboard/index.ts
- frontend/src/metabase/routes-embed.jsx 3 additions, 2 deletionsfrontend/src/metabase/routes-embed.jsx
- frontend/src/metabase/routes-public.jsx 2 additions, 2 deletionsfrontend/src/metabase/routes-public.jsx
- frontend/src/metabase/routes.jsx 0 additions, 11 deletionsfrontend/src/metabase/routes.jsx
Please register or sign in to comment