console icon indicating copy to clipboard operation
console copied to clipboard

🐛 Bug Report: Appwrite interface, user preferences

Open mateo-meillon opened this issue 2 years ago • 12 comments

👟 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?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

mateo-meillon avatar Mar 27 '23 02:03 mateo-meillon

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 avatar Mar 28 '23 19:03 safwanyp

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.

safwanyp avatar Mar 28 '23 19:03 safwanyp

@Maettis thanks for raising this! 🙏🏼

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

stnguyen90 avatar Mar 28 '23 20:03 stnguyen90

@safwanyp looks like it hasn't. Assigned!

stnguyen90 avatar Mar 28 '23 20:03 stnguyen90

@stnguyen90 Great, thanks!

safwanyp avatar Mar 28 '23 20:03 safwanyp

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

safwanyp avatar Mar 29 '23 10:03 safwanyp

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

joeyouss avatar Mar 30 '23 19:03 joeyouss

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

ItzNotABug avatar Aug 13 '23 11:08 ItzNotABug

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

Vedsaga avatar Dec 14 '23 15:12 Vedsaga

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

wess avatar Dec 29 '23 16:12 wess

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

xuelink avatar May 08 '24 16:05 xuelink

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:

  • Booleans that you think you set to false is really set to "false" which is considered true in javascript
  • Numbers that you think you set to 10 is really set to "10" which might crash some calculation

#8989 #8989

Megamannen avatar Nov 19 '24 06:11 Megamannen