-
Notifications
You must be signed in to change notification settings - Fork 890
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
[Feature Anywhere] Add view events flyout #3415
[Feature Anywhere] Add view events flyout #3415
Conversation
Details on error handling can be seen in this issue: #3580. We can include all of those details as part of the work for this PR since it will be needed to finish all rendering scenarios of the view events page. |
777038f
to
10dfac3
Compare
While the final items (custom chart functionality and error handling) are currently blocked, the bulk of this PR is ready and able to be reviewed. Please read PR description and corresponding for some more context, before starting review. |
Codecov Report
@@ Coverage Diff @@
## feature/feature-anywhere #3415 +/- ##
============================================================
- Coverage 66.44% 66.42% -0.02%
============================================================
Files 3247 3263 +16
Lines 62553 62812 +259
Branches 9659 9708 +49
============================================================
+ Hits 41563 41724 +161
- Misses 18676 18775 +99
+ Partials 2314 2313 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@lezzago Can you please provide the preliminary review on this issue? Thanks! |
@ohltyler I'll go ahead and review this, but looks like there are a few conflicts that will need to be resolved. |
Yes, I've had to prematurely pull some uncommitted changes from other PRs to ensure integration was working as expected, hence the weird conflicts. I will clean these up once the final dependent PR #4120 is merged. |
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.
A couple of minor questions to assist my understanding. I've gotten through changes to existing plugins - there's a lot of changes to vis_augmenter I haven't reviewed yet, but those are less critical because it's a brand new component that's much less likely to introduce regressions. I'll finish a quick review of those files in the morning.
src/plugins/ui_actions/public/triggers/external_action_trigger.ts
Outdated
Show resolved
Hide resolved
src/plugins/visualizations/public/embeddable/visualize_embeddable.ts
Outdated
Show resolved
Hide resolved
@joshuarrrr rebased without making any changes. Follow-up commits will be to address comments. |
Signed-off-by: Tyler Ohlsen <[email protected]>
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.
Overall this looks great and was clearly a ton of work. I mostly have some minor questions and comments, but no blockers.
src/plugins/vis_augmenter/public/view_events_flyout/actions/open_events_flyout_action.test.ts
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/view_events_flyout/components/utils.tsx
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/view_events_flyout/components/utils.tsx
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/view_events_flyout/components/view_events_flyout.tsx
Outdated
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/view_events_flyout/components/view_events_flyout.tsx
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/view_events_flyout/components/view_events_flyout.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
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 @ohltyler for all the fixes. I'm going to mark as approved, but I'll need to reapprove after we update the snapshots.
src/plugins/vis_augmenter/public/view_events_flyout/components/styles.scss
Show resolved
Hide resolved
Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler There are still some flyout unit test failures - maybe something got messed up in the revision commits: https://github.com/opensearch-project/OpenSearch-Dashboards/actions/runs/5085933677/jobs/9139910721?pr=3415 |
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
@manasvinibs We are still looking to get a review from @ashwin-pc who has more context on the PR - let's hold off on merging until that is done |
Discussed with @ashwin-pc - will look into the possibility of removing the dependency on the embeddables plugin as well as the added config to |
Will follow up in a separate PR for this. |
Signed-off-by: Tyler Ohlsen [email protected]
Currently this PR has many dependent ones that will need to be merged first. This includes:
augment-vis
saved object type #3109VisLayer
s in line chart render flow #3131VisLayer
data models #3374VisLayer
s #3145VisLayer
s #3267These all involve finalizing the rest of the chart render workflow, and the
VisLayer
design.When these have been merged, we can finish the following items for this flyout:
VisLayer
s to show the partitioned data correctlyVisLayer
s #3145, and (3) will mostly depend on [Feature Anywhere] Support clicking & custom tooltip functionality from vega charts #3317VisLayer
s which will be dependent on [Feature Anywhere] Support fine-grained error states fromVisLayer
s #3267What can be reviewed now
view_events_flyout/components/
vis_type_vega
pluginvis_type_vislib
pluginDescription
This PR adds the 'View events' flyout which will open via an event click on a chart with
VisLayer
s enabled, or in the vis options menu viaView events
button. It shows the base vis with the event annotations, and below it a breakdown of each set of events produced by each plugin resource. It is categorized by plugin resource type as well.Technical details, more information, and example mocks can be found in the related issue #3155
Validation
To test the feature:
Implementation details
Components
ViewEventsFlyout
- the base component where all embeddables are created from the source vis embeddable. Persists the event visualizations by type via a map mapping resource type -> list of embeddablesDateRangeItem
- contains the selected date range and refresh button. Hooks into thereload()
function defined inViewEventsFlyout
to reload all of the embeddables when clicked.BaseVisItem
- the re-created base vis embeddable containing all of the eventsEventsPanel
- the base component to show all of the event annotation charts. Contains a set ofPluginEventsPanel
sPluginEventsPanel
- contains a set ofEventVisItem
s for a particular plugin resource typeEventVisItem
- contains an event vis embeddable, including the resource name, url, and event countEventVisItemIcon
- contains the icon with the event count or the error icon with error message details, if applicable.TimelinePanel
- contains the empty embeddable. Used to re-create the timeline and is a static component on the bottom of the flyoutAll of the embeddables are using the
EmbeddablePanel
component, which takes care of individual component lifecycles for us, including the rendering, refreshing, and destroying. This is fetched from the embeddable service function'sgetEmbeddablePanel()
.The
VisAugmenterEmbeddableConfig
The flyout requires rendering essentially the same visualization, but with various visual changes and certain data filtered out; for example, showing only data from one
VisLayer
, showing just the x-axis, hiding the y axes, adding horizontal padding, etc. To account for these changes, we need to configure this at the top-level such that it is taken into account when generating the high-level vega-lite spec at the visualize_embeddable level, all the way down to the compiled vega spec and instantiated vega view. To do this, we add theVisAugmenterEmbeddableConfig
. This is a high-level interface (independent of charting libraries/details) that is used to specify these necessary configurations:visLayerResourceIds
- the list ofVisLayers
with particular plugin resource IDs we want to show on the chartinFlyout
- whether we are rendering this embeddable within the view events flyout or notflyoutContext
- whether we are rendering a base vis (the original vis), event vis (the individual VisLayer charts), or timeline vis (the bottom vis only showing the x-axis / timeline)leftValueAxisPadding
- whether we need to add padding to the left of the value axis for alignmentrightValueAxisPadding
- whether we need to add padding to the right of the value axis for alignmentDemo video:
demo-new.webm
Issues Resolved
Closes #3155
Closes #3580
Closes #3485
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr