appwrite / console

The Console that makes Appwrite tick from the browser 🖥
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
331 stars 144 forks source link

🐛 Bug Report: Appwrite interface, user preferences #1468

Open mateo-meillon opened 1 year ago

mateo-meillon commented 1 year ago

👟 Reproduction steps

When I go to a authed user-> /console//auth/user- and remove an remove an preference, the update button does not become active and I cannot save the changed, but when adding one and deleting another, then saving -> it works. I only tested it by deleting 1/1 preference

👍 Expected behavior

It should delete the preference for the user

👎 Actual Behavior

It did nothing -> proof when reloading

🎲 Appwrite version

Version 1.2.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

safwanyp commented 1 year ago

Seems like there's a few other bugs with regards to updating user preferences.

  1. If there's more than 1 preference in the console for a user, the all preferences except the first one can be deleted as expected.
  2. If there's exactly 1 preference in the console for a user, that preference cannot be deleted as the Update button stays disabled.
  3. If there's more than 1 preference in the console for a user, clicking the X icon for the first preference gets rid of all the preferences for that user (only in the UI), and the Update button stays disabled in this case as well.

I've tried attaching screen caps to demonstrate this.

P.S. GitHub video previews have always been weird for me. If it seems like nothing is happening in the videos, just scroll back to the start and it'll work.

Case 1

Even though I deleted them from bottom to top in this preview, it doesn't have to be done that way in this case.

https://user-images.githubusercontent.com/19154530/228349252-82c0b497-ae14-4449-badb-cf1a53e2d17b.mp4

Case 2

https://user-images.githubusercontent.com/19154530/228349207-de5aed1e-e612-4567-9bdb-198a8588dbef.mp4

Case 3

https://user-images.githubusercontent.com/19154530/228349031-e5cd288e-363e-4d5c-bd45-19071280d370.mp4

safwanyp commented 1 year ago

I'd love to work on this issue and create a PR. Let me know if possible!

It seems like a really simple fix to be honest.

stnguyen90 commented 1 year ago

@Maettis thanks for raising this! 🙏🏼

@safwanyp this might have been fixed already, but let me double check with the team.

stnguyen90 commented 1 year ago

@safwanyp looks like it hasn't. Assigned!

safwanyp commented 1 year ago

@stnguyen90 Great, thanks!

safwanyp commented 1 year ago

@stnguyen90 pinging to inform you that i just made the PR.

joeyouss commented 1 year ago

Thank you, our team will review your PR as soon as possible.

ItzNotABug commented 1 year ago

Update: There seems to be also the case for whitespaces. Using " " (spaces) for both key and value allows saving the preferences.

https://github.com/appwrite/appwrite/assets/20625965/2a894283-8b18-4904-aa4c-8041759d32c9

Vedsaga commented 11 months ago

Not sure, why we can not update the preference via console... may be this might be related to this itself?

wess commented 11 months ago

PR: https://github.com/appwrite/console/pull/696

xuelink commented 6 months ago

https://github.com/appwrite/appwrite/assets/3280475/9b993314-ca43-4e3c-8180-1f5eb3b9089f

Megamannen commented 1 week ago

Preferences are typed internally, but using the console to change them converters them all to strings. Type-column in the table is needed, it's not a case of "if the comment get enough votes". This can break stuff!

Dangrous stuff:

#8989

8989