Skip to content
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

Open
wants to merge 6 commits into
base: v3.33
Choose a base branch
from
Open

Conversation

mjamescompton
Copy link
Contributor

Summary

References #7346

Changes

  • Update users store field mask
  • Update live view button stying
  • Add Live view tutorial

Testing

Steps

View a gateway or application
Live view tutorial should be visible
Click the x to close the tutorial
Opening 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
Screenshot 2024-12-04 at 14 17 26
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

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@mjamescompton mjamescompton self-assigned this Dec 4, 2024
@mjamescompton mjamescompton requested review from a team as code owners December 4, 2024 13:23
Copy link
Contributor

@ryaplots ryaplots left a 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.

pkg/webui/console/components/live-data-button/index.js Outdated Show resolved Hide resolved
pkg/webui/console/components/live-data-button/index.js Outdated Show resolved Hide resolved
pkg/webui/console/containers/event-split-frame/index.js Outdated Show resolved Hide resolved
pkg/webui/locales/en-duplicates.json Outdated Show resolved Hide resolved
@github-actions github-actions bot added c/identity server This is related to the Identity Server compat/db This could affect Database compatibility ui/web This is related to a web interface labels Dec 6, 2024
Copy link
Contributor

@pierrephz pierrephz left a 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":
Copy link
Contributor

@nicholaspcr nicholaspcr Jan 2, 2025

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.

Suggested change
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.

Copy link
Contributor Author

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?

Copy link
Contributor

@ryaplots ryaplots Jan 6, 2025

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.

Copy link
Contributor

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.

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/identity server This is related to the Identity Server compat/db This could affect Database compatibility ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants