-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add live data split view tutorial #7425
base: v3.33
Are you sure you want to change the base?
Conversation
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 think it makes sense that if the user opens the split view, the tutorial disappears forever, because it's basically the same action as "Try it".
See my comments below.
ded6ec1
to
5058220
Compare
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.
@mjamescompton here is my review regarding the design of that feature:
https://www.figma.com/design/7pBLWK4tsjoAbyJq2viMAQ/console?node-id=6608-16341&t=aXv5IH07ZWfRBo8g-1
DM me for any question
@@ -607,7 +607,7 @@ func (s *userStore) updateUserModel( //nolint:gocyclo | |||
case "console_preferences.sort_by": | |||
updateConsolePreferences = true | |||
consolePreferences.SortBy = pb.ConsolePreferences.GetSortBy() | |||
case "console_preferences.tutorials": | |||
case "console_preferences.tutorials.seen": |
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.
More or less the same comment left in this PR.
case "console_preferences.tutorials.seen": | |
case "console_preferences.tutorials": |
Wouldn't this be enough to update the Tutorial
subfield of ConsolePreferences
?
I'm writing this but I didn't validate how the fieldmask is created on the Console side of things.
It could be that it is too annoying to make it so every subfield has its fieldmask shortened to its parent's fieldmask, something like console_preferences.tutorials.seen
-> console_preferences.tutorials
.
If so then it might be worth it to adding the console_preferences.tutorials.seen
and the other fieldmasks on the referenced PR.
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.
@nicholaspcr see the last to commits for the required changes to shorten the field mask from the console side.
By default we don't set the field masks they are derived from the data sent by this function Marshaler.fieldMaskFromPatch
so thats why it can be confusing to know what field mask is expected without reading the go code when it is developer preference when not to use the default.
I'm leaning towards lets do this on the backend instead of the frontend @ryaplots what do you think?
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.
It could be that it is too annoying to make it so every subfield has its fieldmask shortened to its parent's fieldmask, something like console_preferences.tutorials.seen -> console_preferences.tutorials.
Like Michael said, we have this Marshaler.fieldMaskFromPatch
function that derives the fieldmasks from the patch. To make Nicholas' suggestion work we would need to refactor this function to default to the parent fieldmask, however, I get the impression that that would not work for every case, because I believe there are fields that expect a more specific fieldmask in the backend, so we would have to adapt this specific fieldmask, like the in the commits Michael mentioned. I think we shouldn't start adapting the fieldmasks for every case, they should be streamlined.
So, I agree with adding console_preferences.tutorials.seen
and solving this in the backend.
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 see.
Indeed it makes more sense to have it handled on the backend, specially since this is the standard and it is not hard to do it there.
The suggestion I would make regarding the backend changes would be to have the logic handled updates of subfields.
case "console_preferences.tutorials.seen": | |
case "console_preferences.tutorials": | |
updateConsolePreferences = true | |
consolePreferences.Tutorials = pb.ConsolePreferences.GetTutorials() | |
case "console_preferences.tutorials.seen": | |
updateConsolePreferences = true | |
consolePreferences.Tutorials.Seen = pb.ConsolePreferences.GetTutorials().GetSeen() |
@mjamescompton you let me know if you want to do this or if I should make a separate PR adding this to all UserConsolePreferences
fields.
Summary
References #7346
Changes
Testing
Steps
View a gateway or application
Live view tutorial should be visible
Click the
x
to close the tutorialOpening the page again will cause the tutorial to be visible again
Click either try it or got it to make the tutorial hide for ever.
Results
Screen.Recording.2024-12-04.at.14.18.16.mov
Regressions
...
Notes for Reviewers
Closing the tutorial, then opening and closes the live view causing the tutorial to show again. Show opening the live view make the tutorial hide for ever or should we wait until someone clicks got it or try it.
Checklist
README.md
for the chosen target branch.CHANGELOG.md
.CONTRIBUTING.md
, there are no fixup commits left.