azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Store and restore “developer settings” from user cookie

Open cforce opened this issue 1 year ago • 2 comments
trafficstars

Allow users to have their personal preference for developer settings but storing cfg to Cookie as persistent state each time it changes and restore on session start (login)

This shall be simply ui side implementation by some js magic - no backend api changes

cforce avatar Jul 07 '24 18:07 cforce

I think it might be even easier to do this with localStorage. Or at least, I personally prefer using localStorage over cookies, for browser-side preferences. You'd need to think about the situation where backend defaults change though, would the backend administrator want that to override user preferences? And could JS errors became a possibility if the settings types changed?

pamelafox avatar Jul 10 '24 20:07 pamelafox

Yes, local storage is even better. Defaults -by reset to default as an option clickable formally settings would leave control to the user. Downwards compatible api changes is alway a good pattern 😄

cforce avatar Jul 10 '24 23:07 cforce