User settings
See original GitHub issueUser Settings
Editor Settings
We’ve added a number of editor-related changes recently, and I think it would be beneficial for users to be able to modify certain editor settings and it be persistent in the application. A super easy solution there would be to have them stored in local storage and loaded when the editor is loaded.
These could be in an object
type editorSettings
value on the user schema. This would allow for a more gentle-handed approach to its schema as new settings are added.
As some examples of things that we might want to include in the editor settings, we could include the following:
- enable/disable active line highlighting
- enable/disable code folding
- enable/disable line numbers?
- change tab size
- option to indent with tabs vs spaces
- enable/disable auto-closing html/curly brace tags
- enable/disable showing trailing spaces
- editor theme?
Any other options/ideas people have are welcome!
Issue Analytics
- State:
- Created 2 years ago
- Comments:30 (7 by maintainers)
Top Results From Across the Web
User settings and account details - Optimize Resource Hub
User settings allow you to configure your language and email preferences, and account details allow you to control your data-sharing settings. User settings....
Read more >Change User settings on Mac - Apple Support
To change these settings, choose Apple menu > System Settings, then click Users & Groups in the sidebar. (You may need to scroll...
Read more >User and Workspace Settings - Visual Studio Code
In this article, we'll first describe user settings as these are your personal settings for customizing VS Code. Later we'll cover Workspace settings, ......
Read more >User Settings designs, themes, templates and ... - Dribbble
Discover 85 User Settings designs on Dribbble. Your resource to discover and connect with designers worldwide.
Read more >Configure User Settings - IBM
You can access a user's settings and activity logs by clicking Edit for the user you wish to configure. View a list of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think MongoDB Atlas places each Database on a separate physical server. We would need two collections in the same Database to make them share hardware.
However, with option 1 I don’t think there is any need to cross-reference between databases anyway. The user logs in at NaturalCrit and gets a JWT token from it. Then we just get the username from that token when it comes time to look up any preferences in the Homebrewery database. We never need to go back and update anything in the Naturalcrit side unless we are actually on the login page.
How do we want to handle users who do not have accounts? Do we want editor options to persist between browser sessions? (i.e., do we want to use LocalStorage as a fallback still?)
In any case, we do have two separate databases currently in use, and I think resolving the following is going to be the starting point for everything else here: We have 1) NaturalCrit (usernames and passwords for login) and 2) Homebrewery (brew documents).
The original intent of the two separate databases, was that “NaturalCrit” would be home to a suite of separate apps, with the NaturalCrit database holding a central log-in service for all apps, and then the Homebrewery for instance having its own database holding documents created via that app.
If we are going to be storing Homebrewery-specific user settings, we need to clear up in which database that belongs. I see a few approaches, and I think we need to settle on one before moving on:
Leave the Naturalcrit Database as is, and add a second collection to the Homebrewery database which simply stores username as an index, and then a list of their preferred settings specific to the Homebrewery. There is no need, I think, to store password hashes in this “preferences” collection if it is solely for looking up user preferences. The NaturalCrit Database is only ever accessed on login, and then does not need to be touched during use of the Homebrewery app.
Convert the Naturalcrit Database into a collection within the Homebrewery database, and delete the NaturalCrit database. User logins as well as preferences for the Homebrewery would be centralized in one location. However, this muddies the possibility of developing future apps under the NaturalCrit account system which would all end up sharing the database.
Leave the Homebrewery Database as is, and include all of the user preferences in the existing NaturalCrit Database. This also centralizes all user info in one location, but makes access a little trickier; we would need to set up Mongoose to simultaneously connect to both NaturalCrit and Homebrewery to pull data from both databases at once.
I may be missing something here, but personally option 1 seems the easiest and “best” way to do this. Yes, we would have two separate “user” collections, but they don’t need to hold anything in common other than the username as an id. This way future apps could also have their own user settings specific to that app without worry of one app’s settings treading over the other. I think this is also closer to @G-Ambatte 's original vision?
Once this is decided, I think we can select the main essential elements of the UserPreferences schema, perhaps limiting ourselves to “editorPrefs” for now, and implement that to resolve this issue. If that is successful, we can break out the other proposed features (user snippets, etc.) into their own issues to be worked on, since we will now have a framework to build on.