Skip to content

[Unified observability] Refine typing for the data checks in the overview page#117994

Merged
afgomez merged 10 commits intoelastic:mainfrom
afgomez:117638-has-data-only-boolean
Nov 23, 2021
Merged

[Unified observability] Refine typing for the data checks in the overview page#117994
afgomez merged 10 commits intoelastic:mainfrom
afgomez:117638-has-data-only-boolean

Conversation

@afgomez
Copy link
Copy Markdown
Contributor

@afgomez afgomez commented Nov 9, 2021

Summary

Closes #117638.

The hasData check for the alert rule list was not aligned with the other checks. This was confusing sometimes. This PR fixes it

Checklist

Delete any items that are not applicable to this PR.

@afgomez afgomez added technical debt Improvement of the software architecture and operational architecture v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed Team:Unified observability labels Nov 9, 2021
@afgomez afgomez requested a review from a team November 10, 2021 12:15
Copy link
Copy Markdown
Contributor

@claudiopro claudiopro left a comment

Choose a reason for hiding this comment

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

Nice cleanup! The code is much easier to reason about now 😄

Please take a look at my inline comments and address before merging.

Comment on lines +82 to +84
title={i18n.translate('xpack.observability.overview.alert.errorTitle', {
defaultMessage: "We couldn't load the alert data",
})}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move to a translations module

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I understand. You mean to take this out to a separate file?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think he means to move it to this file, but I'm not sure if these strings should be moved there.

What are the benefits of keeping the translations in one single place? I usually find this type of file difficult to maintain and I like to keep the translations inside the component. Not saying that I'm against it, but I would be happy to hear the reasoning behind that decision 😊

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm also not sure about the benefit of it. I feel it adds an extra layer of indirection.

@claudiopro could you elaborate on this?

Copy link
Copy Markdown
Contributor

@claudiopro claudiopro Nov 22, 2021

Choose a reason for hiding this comment

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

Sure, sorry for the lack of context! In RAC we use a layout where translation strings live in a translations module and import them where needed as constants, e.g. import * as i18n from './translations';. Not sure if choice is project specific, so feel free to ignore if your project has a different approach. @mgiota can provide more background. After a deeper look, it seems this approach was introduced recently by @ersin-erdal , even though @Zacqary had some doubts about generalizing it to the whole project #117488 (comment) . Feel free to ignore my comment 👍

@elastic elastic deleted a comment from kibanamachine Nov 15, 2021
Copy link
Copy Markdown
Contributor

@estermv estermv left a comment

Choose a reason for hiding this comment

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

LGTM!

@afgomez
Copy link
Copy Markdown
Contributor Author

afgomez commented Nov 16, 2021

@elasticmachine merge upstream

@afgomez
Copy link
Copy Markdown
Contributor Author

afgomez commented Nov 22, 2021

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@claudiopro claudiopro left a comment

Choose a reason for hiding this comment

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

Looking good to me! Let's leave the opinionated parts out of the PR for the time being.

@afgomez afgomez enabled auto-merge (squash) November 22, 2021 12:15
@estermv estermv added v8.1.0 and removed v8.1.0 labels Nov 22, 2021
@afgomez afgomez added v8.1.0 and removed v8.1.0 labels Nov 23, 2021
@mistic

This comment has been minimized.

@afgomez afgomez merged commit ca73f17 into elastic:main Nov 23, 2021
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
observability 353.9KB 354.6KB +702.0B

History

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

@kibanamachine
Copy link
Copy Markdown
Contributor

The following labels were identified as gaps in your version labels and will be added automatically:

  • v8.1.0

If any of these should not be on your pull request, please manually remove them.

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Nov 23, 2021
…view page (elastic#117994)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 23, 2021
…view page (#117994) (#119472)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Alejandro Fernández Gómez <alejandro.fernandez@elastic.co>
@afgomez afgomez deleted the 117638-has-data-only-boolean branch November 23, 2021 19:42
dmlemeshko pushed a commit that referenced this pull request Nov 29, 2021
…view page (#117994)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
…view page (elastic#117994)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Unified observability technical debt Improvement of the software architecture and operational architecture v8.0.0 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Unified Observability] Refine the data presence checks for the overview page

6 participants