-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 - Default settings #472
Comments
@riccardoperra I updated the discussion here to have a shared todo. If you want to add something only edit it, I tag myself at the point where I'm working on |
I'd say also that we have to add this:
Also I'd like to push these with this feature:
Removing also solid-aria for dialogs/dropdown could be also good using snapshot of https://github.com/riccardoperra/codeui |
@hackpirodev the last remaining ticket is In the backend side we already added a We should add a validation also on the frontend side in order to limit the amount of presets for guest users. Then we have to add two new properties:
We should use the right environment value for guest and logged in users. If the users is exceeding the maximum number of presets, the button "Add new" and "Sync" (for logged in users) should be disabled. |
To be deployed in 1.4.0 |
Discussed in #466
Originally posted by riccardoperra February 16, 2023
Related to #451
cc @hackpirodev
Description
Settings default is a new feature of CodeImage that allows users to save their snippet configuration remotely. This issue can be related also to previous idea of #57, closed during the hackathon due to lack of time and no way to store remotely the data, since CodeImage had not backend at that time.
In the last minor update CodeImage also added the
randomize
feature which allows you to randomly select a configuration, but then it is difficult to save that configuration and reuse for other snippets.With
Default settings
feature, the idea is to have it in the UI, or in the actions of the actionbar a way to save your own themes and select from saved ones.CodeImage currently could be used from both guest and logged-in users.
In case you are a guest, all of these informations could be saved through indexedDB locally. In the end if you always use the same chrome and pc the settings should not be cleared.
In case the user is logged-in, we could opt for a new "metadata" table for users, to save all the additional information. A drawback of this could be the db usage. The more extensive use of the database costs money, but we don't expect to have that much data. Currently with 700 users, 1000+ projects and so one everything is ok.
Since we are using Auth0, we can try to check if it makes sense to save something at the user metadata level, even if I have read that it is not very recommended. Not having a service like supabase we are a bit limited from the auth side.
So, if we go for the db/api custom way, here's what we may have to do something like this:
Create a new field "presets" for users. There will be a one-to-many with a new Presets table which will contains an id, the name and the configuration saved as JSON type.
Create new api's for CRUD:
@riccardoperra I'm putting here some points as discussed in telegram:
The text was updated successfully, but these errors were encountered: