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

[Event annotations] Individual annotation editing from library #163346

Merged
merged 102 commits into from
Sep 20, 2023

Conversation

drewdaemon
Copy link
Contributor

@drewdaemon drewdaemon commented Aug 7, 2023

Summary

Resolve #158774
Part of #159053

Screenshot 2023-09-13 at 2 00 25 PM Screenshot 2023-09-13 at 2 00 09 PM Screenshot 2023-09-13 at 2 01 07 PM

Known issues

  • Responsive layout Proposal: don't optimize for mobile
  • Recovering embeddable from problematic data view state
  • margin around dimension buttons
  • Functional test coverage

Checklist

@drewdaemon drewdaemon force-pushed the add-individual-annotation-editing branch from 3ea8e3b to 36bc171 Compare August 11, 2023 20:37
@drewdaemon drewdaemon force-pushed the add-individual-annotation-editing branch from 0014cf0 to 8fe5a47 Compare September 14, 2023 16:49
@drewdaemon
Copy link
Contributor Author

New functional tests passed flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3134#_

});
});

describe.skip('data view switching', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails in CI but passes locally. I decided to address this as part of #159053

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much again, @drewdaemon. This looks wonderful. I've left you a few final comments below, but nothing worth holding up this PR further. Assuming you're able to review them, I'm approving now.

  • If all annotation dimension items are removed, there is some extra spacing at the top of the container, above the "Add annotation" button. This is appears due to the top margin of the button. Can you style it so that this extra space doesn't appear when dimension items are absent?

    CleanShot 2023-09-18 at 14 58 21

  • Can you remove the placeholder text for the color picker altogether? As we're now restoring the default hex value on blur of the field, this no longer needs to be there.

    CleanShot 2023-09-18 at 14 59 15

Comment on lines +134 to +135
<EuiTitle size="xs">
<h2 id={flyoutHeadingId}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, a subjective decision, but would it be better to wrap this EuiTitle component and h2 element around the title text only (rather than the title and the back button)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see where you're coming from, but I like it this way since we don't have to duplicate the elements between the two titles in the markup

@stratoula
Copy link
Contributor

I really like the improved UI 👏

I only found one bug. I have a query annotation created by sample data logs. I change the dataview to ecommerce. Then I see a time field error, I change the time field to order_date but still the dataset and the annotations are not loaded. As you see in the screenshot below I see a Missing field label indicating that something goes wrong with the time field.

image

@drewdaemon
Copy link
Contributor Author

@stratoula

I only found one bug. I have a query annotation created by sample data logs. I change the dataview to ecommerce. Then I see a time field error, I change the time field to order_date but still the dataset and the annotations are not loaded. As you see in the screenshot below I see a Missing field label indicating that something goes wrong with the time field.

Great find! This turned out to be a small oversight on my part (instead of an embeddable issue as I originally feared).

Fixed in 50ea86e

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fixed, tested again the basic scenarios, everything seems to work as expected 👏
LGTM, great job 💯

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #15 / serverless observability UI Observability Log Explorer Dataset Selector "before all" hook in "Dataset Selector"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
eventAnnotation 445 25 -420
eventAnnotationListing - 429 +429
lens 1129 1087 -42
total -33

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/event-annotation-components 65 52 -13
embeddable 442 434 -8
eventAnnotation 201 200 -1
eventAnnotationListing - 15 +15
lens 519 520 +1
total -6

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 354.1KB 354.1KB -12.0B
eventAnnotation 176.7KB 7.1KB -169.6KB
eventAnnotationListing - 197.1KB ⚠️ +197.1KB
filesManagement 89.5KB 89.4KB -12.0B
graph 387.5KB 387.5KB -12.0B
lens 1.4MB 1.3MB -4.3KB
maps 2.8MB 2.8MB -12.0B
visualizations 265.5KB 265.5KB -12.0B
total +23.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
embeddable 78.6KB 77.7KB -978.0B
eventAnnotation 21.4KB 19.7KB -1.7KB
eventAnnotationListing - 10.7KB +10.7KB
total +8.0KB
Unknown metric groups

API count

id before after diff
@kbn/event-annotation-components 65 52 -13
embeddable 542 534 -8
eventAnnotation 201 200 -1
eventAnnotationListing - 15 +15
lens 616 617 +1
total -6

async chunk count

id before after diff
eventAnnotation 6 1 -5
eventAnnotationListing - 5 +5
total -0

miscellaneous assets size

id before after diff
eventAnnotation 161.8KB 0.0B -161.8KB
eventAnnotationListing - 161.8KB +161.8KB
total -0.0B

References to deprecated APIs

id before after diff
@kbn/event-annotation-components 10 0 -10
eventAnnotation 7 5 -2
eventAnnotationListing - 12 +12
total -0

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@stratoula stratoula merged commit 172de68 into elastic:main Sep 20, 2023
@kibanamachine kibanamachine added v8.11.0 backport:skip This commit does not require backporting labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Embedding Embedding content via iFrame release_note:feature Makes this part of the condensed release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Event Annotations] individual annotation editing from library
10 participants