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

[Tech debt] Reorder Overview page #152802

Conversation

CoenWarmer
Copy link
Contributor

@CoenWarmer CoenWarmer commented Mar 7, 2023

Resolves #152787

Summary

This PR updates the Overview Page to follow the newly agreed upon structure for the Observability app.

This PR is part of a larger effort to have all pages in the Observability app follow the same structure so they are more consistent with each other. More details in the epic: #152783

It also cleans up dead and unused components where found.

All design and functionality should be exactly the same as before.

Checklist

  • Rename page component <to_name_of_page.tsx>
  • Remove /container subfolder if available
  • Try to inline translations in translations.ts
  • Try to move re-used components to /app_root/components/feature
  • Try to move components that are only used in Page to /page/<name_of_page>/components/<component_name>.tsx

@CoenWarmer CoenWarmer changed the title [Tech debt] Reorder [Tech debt] Reorder Overview page Mar 7, 2023
@CoenWarmer
Copy link
Contributor Author

@elasticmachine merge upstream

@CoenWarmer CoenWarmer marked this pull request as ready for review March 7, 2023 20:38
@CoenWarmer CoenWarmer requested review from a team as code owners March 7, 2023 20:38
@CoenWarmer CoenWarmer added the release_note:skip Skip the PR/issue when compiling release notes label Mar 7, 2023
Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

LGTM, just one nit and a question regarding hooks defined for specific pages.

@@ -13,7 +13,7 @@ import { MetricsSection } from '../../../components/app/section/metrics';
import { UptimeSection } from '../../../components/app/section/uptime';
import { UXSection } from '../../../components/app/section/ux';
import { HasDataMap } from '../../../context/has_data_context';
import { BucketSize } from '../containers';
import { BucketSize } from '../helpers/calculate_bucket_size';
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be consistent with the other identical import of this type

Suggested change
import { BucketSize } from '../helpers/calculate_bucket_size';
import type { BucketSize } from '../helpers/calculate_bucket_size';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice. Agree

import { useUiTracker } from '../../../hooks/use_track_metric';
import { ObservabilityAppServices } from '../../../application/types';

const CAPABILITIES_KEYS = ['logs', 'infrastructure', 'apm', 'uptime'];

export const useOverviewMetrics = ({ hasAnyData }: { hasAnyData: boolean | undefined }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we place hooks used only in one page, into pages/<page_name>/hooks ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, agree. This particular hook however will be refactored (most likely it will go away), which is why I left it for now. Will be revisited!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 549 542 -7

Async chunks

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

id before after diff
observability 1.1MB 1.1MB +715.0B

Page load bundle

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

id before after diff
observability 89.8KB 88.9KB -961.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 431 433 +2

Total ESLint disabled count

id before after diff
securitySolution 508 510 +2

History

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

@CoenWarmer CoenWarmer enabled auto-merge (squash) March 8, 2023 17:43
@CoenWarmer CoenWarmer merged commit 91ef765 into elastic:main Mar 8, 2023
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Mar 8, 2023
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this pull request Mar 10, 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 release_note:skip Skip the PR/issue when compiling release notes v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust folder structure in Overview page
5 participants