-
Notifications
You must be signed in to change notification settings - Fork 14
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
NETOBSERV-867 UI: Table Histogram help #295
Conversation
@andrew-ronaldson what do you think about this approach ? |
@@ -1291,6 +1295,7 @@ export const NetflowTraffic: React.FC<{ | |||
{slownessReason()} | |||
</Alert> | |||
)} | |||
<GuidedTourPopover id="netobserv" ref={guidedTourRef} /> |
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 guided tour is available for any components as soon as you provide guidedTourHandle
from guidedTourRef.current
as props
const [guidedTourDone, setGuidedTourDone] = useLocalStorage<boolean>(LOCAL_STORAGE_HISTOGRAM_GUIDED_TOUR_DONE_KEY); | ||
React.useEffect(() => { | ||
if (!guidedTourHandle) { | ||
return; | ||
} | ||
|
||
guidedTourHandle.updateTourItems([ | ||
{ | ||
title: t('Histogram'), | ||
description: t( | ||
// eslint-disable-next-line max-len | ||
'The following bar chart represent the number of logs across time. You can select a portion of it to drill down into the selected time range and filter the content below accordingly.' | ||
), | ||
assetName: 'histogram.gif', | ||
minWidth: '500px', | ||
ref: containerRef | ||
}, | ||
{ | ||
title: t('Zoom buttons'), | ||
description: zoomButtonTips(), | ||
assetName: 'histogram-zoom.gif', | ||
position: PopoverPosition.bottom, | ||
ref: zoomRef | ||
}, | ||
{ | ||
title: t('Arrow buttons'), | ||
description: arrowButtonTips(), | ||
ref: arrowRef | ||
}, | ||
{ | ||
title: t('Page buttons'), | ||
description: pageButtonTips(), | ||
assetName: 'histogram-pages.gif', | ||
minWidth: '500px', | ||
position: PopoverPosition.bottom, | ||
ref: pageRef | ||
} | ||
]); | ||
|
||
if (!guidedTourDone) { | ||
setGuidedTourDone(true); | ||
guidedTourHandle.startTour(); | ||
} |
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.
Every component using the guided tour can call updateTourItems
to define a tour (and keep refs updated even if the view is removed from the dom) and startTour
to open it from the begining using the guidedTourHandle
provided as prop.
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.
nice 👍
/ok-to-test |
New image: ["quay.io/netobserv/network-observability-console-plugin:c0900d0"]. It will expire after two weeks. |
@jpinsonneau For the first and the last tip, the images are quite small to see what is happening. Other than that the tips look good! |
Should I increase the size ? Or would it be better to use static images instead of animated |
Increasing the size would be helpful |
lgtm apart from the typo, and would defer to other folks for more reviews (also @andrew-ronaldson for UX ) |
/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.
LGTM, one suggestion and a few articles that need to be added for completeness/clarity
Codecov Report
@@ Coverage Diff @@
## main #295 +/- ##
==========================================
- Coverage 59.73% 58.79% -0.94%
==========================================
Files 118 147 +29
Lines 4704 6456 +1752
Branches 759 769 +10
==========================================
+ Hits 2810 3796 +986
- Misses 1769 2447 +678
- Partials 125 213 +88
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 28 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Co-authored-by: Joel Takvorian <joel.takvorian@qaraywa.net>
/ok-to-test |
New image: ["quay.io/netobserv/network-observability-console-plugin:e68d1e5"]. It will expire after two weeks. |
@Amoghrd I've just finished to address all the feedbacks
/ok-to-test |
New image: ["quay.io/netobserv/network-observability-console-plugin:918b565"]. It will expire after two weeks. |
/label qe-approved |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jpinsonneau The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
These changes brings a reusable guided tour and implements it for histogram.
It automatically shows up at first usage and be called again from the "?" button.
Screencast.from.2023-02-22.14-38-17.webm
Suggestions: