-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Logs+] Add timed feedback toast #167682
[Logs+] Add timed feedback toast #167682
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
df789c7
to
8ae5cd5
Compare
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
* 2.0. | ||
*/ | ||
|
||
export const DEFAULT_CONTEXT = undefined; |
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.
The machine is setup in a way that it could easily support future context so that we have parity with our other state machines.
ea35209
to
03e7517
Compare
c0088ed
to
f1869fe
Compare
I need to reduce the |
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.
Hey Kerry, I did a first review on the feature and works well, I left a couple of minor suggestion to align with the design.
Another thing I noticed is that it works only for custom logs, is that the expected behavior?
Don't we collect any feedback for the System logs onboarding?
I'll now start digging into the code 👌
...ns/observability_log_explorer/public/state_machines/origin_interpreter/src/notifications.tsx
Outdated
Show resolved
Hide resolved
...ns/observability_log_explorer/public/state_machines/origin_interpreter/src/notifications.tsx
Outdated
Show resolved
Hide resolved
...ns/observability_log_explorer/public/state_machines/origin_interpreter/src/notifications.tsx
Outdated
Show resolved
Hide resolved
Playing more with the feature I noticed a couple more things:
|
packages/deeplinks/observability/locators/observability_log_explorer.ts
Outdated
Show resolved
Hide resolved
...ins/observability_log_explorer/public/state_machines/origin_interpreter/src/state_machine.ts
Show resolved
Hide resolved
Left another couple of minor suggestions (non-blocking), code looks good 👏 |
Good point, I'd assumed this was for custom only. But reading back through the ACs I think it is for both. The Onboarding wizard also shows the feedback button for both. I'll add it for system logs too. |
…s/origin_interpreter/src/notifications.tsx Co-authored-by: Marco Antonio Ghiani <[email protected]>
…s/origin_interpreter/src/notifications.tsx Co-authored-by: Marco Antonio Ghiani <[email protected]>
Yeah, I agree with this. 30 seconds seems like a fair compromise for now. I think that's long enough to not feel harassed once landing on the new page.
Yeah, according to UX guidelines 3-5 seconds is around average for a two line toast. However, because we're requesting an action I'm inclined to agree. I think 10 minutes is a bit too long (even if they can dismiss it manually). I'll change it to 1 minute, compared to a few seconds this is still a long time. |
…kibana into 166968-add-timed-toast-message
@tonyghiani Thanks for the speedy review as always 🙌 All feedback has been responded to. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
To update your PR or re-run it, just comment with: cc @Kerry350 |
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.
note: There is a dynamic
utility in the log-explorer
plugin which allows, similarly to withSuspense
, to lazy load and wrap with suspense any component.
This is out of scope for this PR, but we could move it into the @kbn/shared-ux-utility package and use it here to since it starts to get duplicated (also implemented in the logs-shared plugin).
Just saying for reference in case you need it again, it would allow to skip creating this extra file :)
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.
Thanks 👌 Yeah, I considered the dynamic utility (it was still somewhat fresh in my mind from merging #164102), but like you say it wasn't in a convenient location yet. I didn't actually realise it'd hit the "rule of 3" with log explorer (not a strict rule by any means, just loosely something I've been using with so many recent PRs shifting packages around). I won't change it now in the interest of getting this merged, but could definitely be a followup.
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.
Code and functionalities LGTM, well done 👏
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.
LGTM.
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.
Observability onboarding changes LGTM!
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.
Obs Onboarding Plugin changes looks good 👍🏼
## Summary Closes elastic#166968 Adds a toast message asking for (optional) feedback when navigating from Observability Onboarding > Observability Log Explorer (via the Explore Logs button) after three minutes. The origin is attached to the history location state as part of the Locator. ## State machine A lightweight state machine handles the origin interpreting. We will very likely have more origins in the future. ![Screenshot 2023-10-02 at 17 33 41](https://github.com/elastic/kibana/assets/471693/b0f9ba81-b857-4185-a2dd-8049fae43932) ## Reviewer hints - Start the flow at `/app/observabilityOnboarding/customLogs`, continue to the last step of the wizard, click the "Explore logs" button to navigate to the Observability Log Explorer. - You can alter the `FEEDBACK_DELAY` constant for easier testing. - **Only** the onboarding origin should trigger the feedback toast. - Moves the feedback link to Observability shared to avoid cyclic dependency issues. ## Screenshot ![Screenshot 2023-10-03 at 14 45 21](https://github.com/elastic/kibana/assets/471693/8c5f0ac0-43a5-44f7-a361-4ea2f66e42b8) --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Marco Antonio Ghiani <[email protected]>
Summary
Closes #166968
Adds a toast message asking for (optional) feedback when navigating from Observability Onboarding > Observability Log Explorer (via the Explore Logs button) after three minutes. The origin is attached to the history location state as part of the Locator.
State machine
A lightweight state machine handles the origin interpreting. We will very likely have more origins in the future.
Reviewer hints
Start the flow at
/app/observabilityOnboarding/customLogs
, continue to the last step of the wizard, click the "Explore logs" button to navigate to the Observability Log Explorer.You can alter the
FEEDBACK_DELAY
constant for easier testing.Only the onboarding origin should trigger the feedback toast.
Moves the feedback link to Observability shared to avoid cyclic dependency issues.
Screenshot