-
Notifications
You must be signed in to change notification settings - Fork 316
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
Support user's console_preferences
storage
#6890
Conversation
@nicholaspcr: Please be aware that this PR should target the |
https://github.com/TheThingsIndustries/lorawan-stack/issues/4009 relates to the comment that I left explaining why I left the Previous comment disregarded as is not true due to the problem of |
|
Instead of even storing the
{
"dark_mode": true,
"dashboard_layouts": {
"application_layout": "name",
"gateway_layout": "name",
"organization_layout": "name"
},
"sort_orders": {
"application_field_order": "name",
"gateway_field_order": "name",
"organization_field_order": "name"
}
} I believe this doesn't change much of the implementation on the front-end side of things but it makes the process of adding a new field a bit more extensive as you need to manually add each new key to the struct definition. The benefit is that on the DB side of things we wouldn't be storing the keys to the map for each user. Additionally we can apply validation of an specific entity on the specific field, ensuring the something like @kschiffer with this in mind, the only thing missing is what are the initial fields that you would like to have for the ConsolePreferences. |
This looks mainly good to me. Some annotations:
Regarding the default values: these should be mostly empty where possible. The |
8f1fb12
to
bde1ade
Compare
bde1ade
to
fc4f044
Compare
77e9309
to
86548be
Compare
86548be
to
49bdec8
Compare
What's left here to merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left my comments in Enterprise.
49bdec8
to
aa9ce37
Compare
aa9ce37
to
c5dfbef
Compare
Summary
References #6483
Changes
console_preferences
Testing
Unit tests and manual testing, more details on test steps below.
Test Steps
Create an user and perform the requests listed below. The expected response is attached to each request example.
Regressions
This is the addition of a new field on
users
table, it should have no impact on the existing features.Notes for Reviewers
Changed this PR just to avoid having both features (console_preferences and bookmarks in the same PR), the reason for this is just to make it easier if the front-end team wants to check how the specific feature was introduced by inspecting this PR.
Checklist
README.md
for the chosen target branch.CHANGELOG.md
.CONTRIBUTING.md
, there are no fixup commits left.