material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
362 stars 28 forks source link

Unable to add wallpaper #125

Closed ewaldc closed 1 year ago

ewaldc commented 1 year ago

Describe the bug Adding a wallpaper via wallpaper (URL) link or local file does not work in dynamic color mode for m3 theme builder

To Reproduce Steps to reproduce the behavior:

  1. Select upload button
  2. Click on either "Add Wallpaper" or "Wallpaper Link"
  3. Select local JPEG file or provide URL to JPEG wallpaper image
  4. Nothing happens (wallpaper has not been added to the wallpaper list) Tried JPEG files in all sizes, horizontal/vertical, nothing works

Expected behavior The uploaded wallpaper appears next the 4 preloaded wallpapers

Screenshots Not relevant since no error is displayed and nothing changes compared to the initial theme builder screen

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Looked at the issue Chrome Developer tools, but nothing obvious stands out.

At start-up of the theme builder page there is an error: Uncaught SyntaxError: Identifier '_customElementsDefine' has already been declared When using the upload function: Component needs Analytics mappings. See analytics.ts event @ main-es2015.ed2a3c6558a1c37b3715.js:1 recordEvent @ main-es2015.ed2a3c6558a1c37b3715.js:55 onClick @ main-es2015.ed2a3c6558a1c37b3715.js:55 d_click_HostBindingHandler @ ɵdir.js:0 Al @ main-es2015.ed2a3c6558a1c37b3715.js:88 r @ main-es2015.ed2a3c6558a1c37b3715.js:88 (anonymous) @ main-es2015.ed2a3c6558a1c37b3715.js:88 invokeTask @ polyfills-es2015.f33b512c3e4a095959b3.js:1 onInvokeTask @ main-es2015.ed2a3c6558a1c37b3715.js:88 invokeTask @ polyfills-es2015.f33b512c3e4a095959b3.js:1 runTask @ polyfills-es2015.f33b512c3e4a095959b3.js:1 invokeTask @ polyfills-es2015.f33b512c3e4a095959b3.js:1 m @ polyfills-es2015.f33b512c3e4a095959b3.js:1 k @ polyfills-es2015.f33b512c3e4a095959b3.js:1

EDIT: added test on two Android phones --> same problem

snimavat commented 1 year ago

Doesnt work on osx either, tried in browser and figma.

jwill commented 1 year ago

Works (somewhat) as intended, the wallpaper isn't supposed to be added to the panel. Colors will in the app views and the header bar do shift if the primary seed is different from the previous one. Looks like the focus ring isn't activating as with other selections.

Will look into ways to make that more apparent that an addition has been made.

ewaldc commented 1 year ago

Ah, if I understand it correctly: the colours will change (depending on the picture selected) but there is no visual feedback that your background was actually loaded/considered.
The item that was (for me at least) the most misleading is the text "Add background". In my (simple) mind, that let me to believe that several background images could be added, which in turn sets the expectation that those backgrounds would appear and one can iterate between them to pick the best one.

Hence, my suggestions would be:

  1. Change text to "Select background"
  2. Set the background of the upload button to the selected background as a way to provide visual feedback

PS. there is also an issue with the "add background" menu that seems to hang around longer than needed