[M1] Metabase illustration settings (#40219)
* Add login page illustration (#39299) * Move Metabot setting to a new place * Add setting for login page illustration * fix UI styling * Fix not able to upload the same file twice * Update the admin > appearance > conceal metabase copy * Prepare the component for tests * Add some unit tests * Prevent settings not saved sometimes After setting the value to/from `custom` one of the setting could be failed to save, I suspect this happens because the race condition from trying to save the setting values relatively at the same time. * Make unit tests easier to read * Add all unit test test cases * Add basic E2E test * Show fallback icon for broken images * Make use of the proper component * Update the comment to affect the reality * Add an error message when file size is over 2MB * Show an error message when the file size > 2MB * Add the error message tests * Preserve the preview image aspect-ratio * Detect corrupted images * Fix failing unit tests * Address feedback: Type * Feedback: Create meaningful variables * Feedback: Make selector API more sensible * Prevent race condition Makes sure we save the settings completely before making other actions that also change settings otherwise, there could be race conditions. * Feedback: tighten up a type * Feedback: Fix inconsistency callback calls * 2. Add the rest 3 illustration settings (#40487) * Add the rest 3 illustration settings * Don't make the X icon feel lonely * Fix illustration widget saving * Fix type error * 3. Update the select UX to match new design (#40491) * Update the select UX to match new design * Move info dot next to file upload button * Simplify IllustrationWidget API * Update setting title copy * Clean up test comments * Feedback: Clarify `any` type * Feedback: Use shorthand object creation Co-authored-by:Denis Berezin <denis.berezin@metabase.com> * Feedback: Use global CSS glass instead of inlining values Co-authored-by:
Denis Berezin <denis.berezin@metabase.com> * Feedback: Remove unnecessary curly brackets in JSX Co-authored-by:
Denis Berezin <denis.berezin@metabase.com> --------- Co-authored-by:
Denis Berezin <denis.berezin@metabase.com> * 4. Connect illustrations to new setting values (#40139) * Wire landing page illustration to the setting value * Wire the unsubscribe page to the setting value * Prepare no rows error to be wired to the setting value * Wire no question results illustration to the setting value * Wire no search results illustration to setting value * Fix error from fixing conflict * Fix required unnecsseary prop on Image * Use Image component * Link dashboard card no results image to the setting value * Move the no data results to more a generic directory * Link collection picker no results image to the setting value * Make illustrations more accessible * Fix failed tests * Test unscribe page illustration + test no illustration * Add landing page tests * Simplify Cypress selectors * Refactor: Rename settings to match the new requirements No question data -> No Data No search results -> No object These changes are made so, these 2 settings are generic enough to include other illustrations later on. * Add no data illustration test * Add no object illustration tests * Fix unsubscribe page background style * Fix not able to build static viz * 5. Follow-up on milestone 1 (#40710) * Update custom background illustration scale behavior * Remove the need to put an SVG file in static folder * Fix test from rebasing off master with @testing-library/user-event upgrade --------- Co-authored-by:
Denis Berezin <denis.berezin@metabase.com>
Showing
- e2e/test/scenarios/admin-2/whitelabel.cy.spec.js 423 additions, 59 deletionse2e/test/scenarios/admin-2/whitelabel.cy.spec.js
- enterprise/frontend/src/metabase-enterprise/settings/selectors.ts 95 additions, 1 deletion...se/frontend/src/metabase-enterprise/settings/selectors.ts
- enterprise/frontend/src/metabase-enterprise/settings/types.ts 12 additions, 0 deletions...rprise/frontend/src/metabase-enterprise/settings/types.ts
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/IllustrationTitle.tsx 25 additions, 0 deletions...se-enterprise/whitelabel/components/IllustrationTitle.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/IllustrationWidget/IllustrationWidget.styled.tsx 48 additions, 0 deletions...mponents/IllustrationWidget/IllustrationWidget.styled.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/IllustrationWidget/IllustrationWidget.tsx 252 additions, 0 deletions...abel/components/IllustrationWidget/IllustrationWidget.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/IllustrationWidget/IllustrationWidget.unit.spec.tsx 270 additions, 0 deletions...nents/IllustrationWidget/IllustrationWidget.unit.spec.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/IllustrationWidget/index.ts 1 addition, 0 deletions...erprise/whitelabel/components/IllustrationWidget/index.ts
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/ImageToggle/ImageToggle.tsx 5 additions, 9 deletions...erprise/whitelabel/components/ImageToggle/ImageToggle.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/ImageToggle/index.ts 1 addition, 2 deletions...ase-enterprise/whitelabel/components/ImageToggle/index.ts
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/ImageUploadInfoDot.tsx 51 additions, 0 deletions...e-enterprise/whitelabel/components/ImageUploadInfoDot.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/LighthouseToggleWidget/LighthouseToggleWidget.tsx 1 addition, 1 deletion...ponents/LighthouseToggleWidget/LighthouseToggleWidget.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/MetabotToggleWidget/MetabotToggleWidget.tsx 2 additions, 5 deletions...el/components/MetabotToggleWidget/MetabotToggleWidget.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/MetabotToggleWidget/MetabotToggleWidget.unit.spec.tsx 1 addition, 1 deletion...nts/MetabotToggleWidget/MetabotToggleWidget.unit.spec.tsx
- enterprise/frontend/src/metabase-enterprise/whitelabel/components/MetabotToggleWidget/index.ts 1 addition, 2 deletions...rprise/whitelabel/components/MetabotToggleWidget/index.ts
- enterprise/frontend/src/metabase-enterprise/whitelabel/index.js 107 additions, 33 deletions...rise/frontend/src/metabase-enterprise/whitelabel/index.js
- frontend/src/metabase/auth/components/AuthLayout/AuthLayout.styled.tsx 10 additions, 4 deletions...metabase/auth/components/AuthLayout/AuthLayout.styled.tsx
- frontend/src/metabase/auth/components/AuthLayout/AuthLayout.tsx 9 additions, 4 deletions...nd/src/metabase/auth/components/AuthLayout/AuthLayout.tsx
- frontend/src/metabase/common/components/EntityPicker/components/EntityPickerSearch/EntityPickerSearch.tsx 2 additions, 6 deletions...cker/components/EntityPickerSearch/EntityPickerSearch.tsx
- frontend/src/metabase/common/components/EntityPicker/components/ItemList/ItemList.tsx 2 additions, 6 deletions.../components/EntityPicker/components/ItemList/ItemList.tsx
Loading
Please register or sign in to comment