New Dashboard Primitive - Headings (#30804)
* initial prototype commit * add default value for text cards * auto focus text/heading cards on creation * remove default value - use placeholders instead * fix inability to edit when there is no heading value * remove unnecessary comment * re-word heading & text tooltip * refactor and fix draggable area bug * fix border artifacts when combined with dragging styling * fix stroke width for hovering and focused - make them the same * display placeholder value in editing mode if content is empty for text and heading dash-cards * remove duplicate placeholders * allow pointer-events anywhere on the div (not just content) * refactor styling to apply no content borders * Fix heading overflow * refactor text dash-card button - remove unnecessary redux store usage * refactor border styling to one css format * rename class names to match syntax conventions * refactor auto-preview styling for dash-card root * refactor style name * remove comment * undo unnecessary re-formatting * refactor popover styling * remove comment that was previously addressed * refactor to typescript * remove comment * remove un-used code * fix TypeScript errors in text unit spec * update button key and event description * add e2e tests for text and heading dash-cards * add e2e tests * add small heading unit tests * fix typescript error * add aria-label removed by merging with master * fix broken test * fix broken tests * fix typescript errors * align edit text with preview text * change from hover editing to click editing * update tests for click editing - remove hover tests - change focus tests to click tests - remove top-level findByText() calls * refactor to use-focus hook * add "heading" to getSupportedCardsForSubscriptions * rename showVisualizationOptions to showDashcardVisualizationSettings * add aria label to buttons and query in tests by label * refactor E2E tests to make longer flows * add existing metabase types to Heading * refactor heading and text menu to use EntityMenu * fix aria-label * [skip ci] fix css syntax error from missing semi-colon * adjust styles and use rem value standards * [skip ci] prevent drag on click to edit surface area * tweak styles for mobile resolutions * fix react import lint error * fix E2E tests * refactor e2e helper to shorthand * refactor to use e2e helper * refactor to use saveDashboard() e2e helper * refactor e2e tests * rename styling variables * null coalesce minWidth * remove unnecessary anonymous function wrapping * refactor to useToggle * improve no content check * use object creation shorthand * simplify expression * refactor empty content styling * move text-edit-container styling into heading and text components * refactor resize handle styling and abstract condition into function * refactor to use CSS function for string styling * improve Heading unit tests * improve Text unit tests * update Heading and Text unit tests * update for new Icons * fix E2E tests * refactor E2E test assertions * refactor click events to use user-event library * fix tooltip positioning
Showing
- e2e/support/helpers/e2e-dashboard-helpers.js 31 additions, 3 deletionse2e/support/helpers/e2e-dashboard-helpers.js
- e2e/test/scenarios/dashboard/text-box.cy.spec.js 0 additions, 161 deletionse2e/test/scenarios/dashboard/text-box.cy.spec.js
- e2e/test/scenarios/dashboard/text-dashcards.cy.spec.js 214 additions, 0 deletionse2e/test/scenarios/dashboard/text-dashcards.cy.spec.js
- e2e/test/scenarios/dashboard/text-parameters.cy.spec.js 7 additions, 4 deletionse2e/test/scenarios/dashboard/text-parameters.cy.spec.js
- e2e/test/scenarios/sharing/subscriptions.cy.spec.js 3 additions, 12 deletionse2e/test/scenarios/sharing/subscriptions.cy.spec.js
- frontend/src/metabase/components/EntityMenu/EntityMenu.jsx 2 additions, 1 deletionfrontend/src/metabase/components/EntityMenu/EntityMenu.jsx
- frontend/src/metabase/css/dashboard.css 4 additions, 0 deletionsfrontend/src/metabase/css/dashboard.css
- frontend/src/metabase/dashboard/actions/cards.js 27 additions, 4 deletionsfrontend/src/metabase/dashboard/actions/cards.js
- frontend/src/metabase/dashboard/components/DashCard/DashCard.styled.tsx 9 additions, 0 deletions...etabase/dashboard/components/DashCard/DashCard.styled.tsx
- frontend/src/metabase/dashboard/components/DashCard/DashCard.tsx 15 additions, 0 deletions...d/src/metabase/dashboard/components/DashCard/DashCard.tsx
- frontend/src/metabase/dashboard/components/DashCard/DashCardActionButtons/ChartSettingsButton.tsx 4 additions, 1 deletion...ts/DashCard/DashCardActionButtons/ChartSettingsButton.tsx
- frontend/src/metabase/dashboard/components/DashCard/DashCardActionButtons/DashCardActionButtons.tsx 1 addition, 0 deletions.../DashCard/DashCardActionButtons/DashCardActionButtons.tsx
- frontend/src/metabase/dashboard/components/DashboardGrid.jsx 31 additions, 13 deletionsfrontend/src/metabase/dashboard/components/DashboardGrid.jsx
- frontend/src/metabase/dashboard/components/TextOptions/TextOptionsButton.styled.tsx 7 additions, 0 deletions...board/components/TextOptions/TextOptionsButton.styled.tsx
- frontend/src/metabase/dashboard/components/TextOptions/TextOptionsButton.tsx 46 additions, 0 deletions...se/dashboard/components/TextOptions/TextOptionsButton.tsx
- frontend/src/metabase/dashboard/containers/DashboardHeader.jsx 26 additions, 17 deletions...end/src/metabase/dashboard/containers/DashboardHeader.jsx
- frontend/src/metabase/sharing/components/SharingSidebar.jsx 1 addition, 1 deletionfrontend/src/metabase/sharing/components/SharingSidebar.jsx
- frontend/src/metabase/visualizations/register.js 3 additions, 1 deletionfrontend/src/metabase/visualizations/register.js
- frontend/src/metabase/visualizations/visualizations/Heading/Heading.styled.tsx 91 additions, 0 deletions.../visualizations/visualizations/Heading/Heading.styled.tsx
- frontend/src/metabase/visualizations/visualizations/Heading/Heading.tsx 86 additions, 0 deletions...etabase/visualizations/visualizations/Heading/Heading.tsx
Loading
Please register or sign in to comment