microsoft / powerapps-tools

Unsupported PowerApps Tools & Apps
MIT License
1.04k stars 432 forks source link

[BUG]: CoE Starter Kit Theme Editor refreshes on almost every keystroke, doesn't save values either #467

Open firemystdl opened 4 years ago

firemystdl commented 4 years ago

Describe the bug In the CoE Starter Kit "Theme Editor", whether using Google Chrome or Microsoft Edge browsers, whenever I want to change a color and type the value in the field, the browser redirects to the list of themes and doesn't save the value I entered.

For example, I click on "PrimaryColor3Value". In the "R" column the value of "2" is already there. So I click in the space, and type "3" to make it "23" for "R". The browser redirects and sends me back to the listing of all the themes created.

I click back on the theme, go to "PrimaryColor3Value", and in "R" I then try pasting "234" into the "R" field. Upon completion the browser again redirects to the listing of all the themes.

Component (please tell us which flow or app you are experiencing issues with):

To Reproduce Steps to reproduce the behavior:

  1. Go to Theme Editor
  2. Click on A theme to edit
  3. Click "PrimaryColor3Value"
  4. Of the RGB fields, pick any one.
  5. Type in "2".
  6. If nothing happens,in the exact same field without clicking anywhere, type "5".

The browser refreshes and redirects to the list of themes page.

Expected behavior The fields should stay open until I'm done typing. When I am done, I should have the option to manually close the settings for that color field, and then be able to edit other parts of the theme without the browser redirecting me to the list of themes.

Screenshots I have a screen capture video in mp4 format which clearly shows the issue. Here is the link for viewing on YouTube: https://youtu.be/AdTtVSiyVMM

Additional context Add any other context about the problem here.

williamtsoicenovus commented 4 years ago

I have the same issue. Whenever I tried to change the theme color, it just refreshes the whole app. It does this twice and then the browser just keeps loading and doesn't open the app.

JeneferM-MSFT commented 4 years ago

Hi thanks for the note. As a temporary workaround while I investigate, and if you have edit permissions to the theme editor, please hit play from within the editor instead:

image

image

RebekkaAalbers commented 3 years ago

There is a function in the OnChange property of the component that updates the color value in a collection, a whole bunch of variables, but also does an update in the backend. image Especially if you type the HEX or RGB code for a color it means this patch function is triggered multiple times.

I am not sure this is the root cause of this issue, but having a call to the backend to update a record on every key stroke is not good pattern. Also, it gives you very little time to actually put in a code, because as soon as the color changes the color picker control disappears. I think a Save button to save changes to a theme might be a good idea.

slaouist commented 3 years ago

hanks Rebekka for the above notes. Unfortunately, we are using a 3rd party control for the color picker which limits our ability to fix without a rewrite of that control. The workaround right now is to copy paste into the textinput of the colorpicker. The save button is a good idea but we wanted to give that real-time update of the theme as you edit.