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

Refactor: Use uiSettings directly from services prop #174170

Merged
merged 7 commits into from
Jan 4, 2024

Conversation

mgiota
Copy link
Contributor

@mgiota mgiota commented Jan 3, 2024

Refactors according to this comment

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@mgiota mgiota marked this pull request as ready for review January 4, 2024 08:25
@mgiota mgiota requested a review from a team as a code owner January 4, 2024 08:25
@mgiota mgiota self-assigned this Jan 4, 2024
@mgiota mgiota added the Team:obs-ux-management Observability Management User Experience Team label Jan 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@mgiota mgiota added v8.13.0 release_note:skip Skip the PR/issue when compiling release notes labels Jan 4, 2024
@mgiota
Copy link
Contributor Author

mgiota commented Jan 4, 2024

@maryam-saeidi Could you take a look at this one?

Copy link
Contributor

@fkanout fkanout left a comment

Choose a reason for hiding this comment

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

I'm getting an error
Property 'uiSettings' does not exist on type 'Services'.ts

services should have uiSettings in its type

export interface Services {
  timeFilterService: TimefilterContract;
  AlertsSearchBar: (props: AlertsSearchBarProps) => ReactElement<AlertsSearchBarProps>;
  useToasts: () => ToastsStart;
}

@mgiota
Copy link
Contributor Author

mgiota commented Jan 4, 2024

I'm getting an error Property 'uiSettings' does not exist on type 'Services'.ts

services should have uiSettings in its type

export interface Services {
  timeFilterService: TimefilterContract;
  AlertsSearchBar: (props: AlertsSearchBarProps) => ReactElement<AlertsSearchBarProps>;
  useToasts: () => ToastsStart;
}

I am running it locally now. Will take a look. Thanks for checking it out!

@mgiota mgiota requested a review from fkanout January 4, 2024 08:40
@mgiota
Copy link
Contributor Author

mgiota commented Jan 4, 2024

@fkanout I made the change. Could you take a look?

@mgiota
Copy link
Contributor Author

mgiota commented Jan 4, 2024

@fkanout I am putting it back to Draft, since I am getting this error.

Screenshot 2024-01-04 at 09 44 11

@mgiota mgiota marked this pull request as draft January 4, 2024 08:46
@fkanout
Copy link
Contributor

fkanout commented Jan 4, 2024

@fkanout I am putting it back to Draft, since I am getting this error.

Screenshot 2024-01-04 at 09 44 11

That is where it would be challenging. I think the services should be injected in the plugin initialization phase.
Thank you, @mgiota, for doing this!

Copy link
Contributor

@fkanout fkanout left a comment

Choose a reason for hiding this comment

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

I mean even if you add the type, the service aka uiSettings should be provided.

@mgiota
Copy link
Contributor Author

mgiota commented Jan 4, 2024

@fkanout I pushed a fix. Above problem is fixed now. I might need to do a few more changes, since ObservabilityAlertSearchBar is used in more places. Checking it now, if more changes are indeed needed

@mgiota
Copy link
Contributor Author

mgiota commented Jan 4, 2024

I applied all changes, so PR is again ready for review.

I verify that original issue still works as expected.

Screen.Recording.2024-01-04.at.10.24.10.mov

@mgiota mgiota marked this pull request as ready for review January 4, 2024 09:28
@mgiota mgiota requested a review from a team as a code owner January 4, 2024 09:28
Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

Obs UX LGTM

@botelastic botelastic bot added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Jan 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

Copy link
Contributor

@fkanout fkanout left a comment

Choose a reason for hiding this comment

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

LGTM. I tested the Alert table on both the Alert and Rule details pages, and it works as expected.
Screenshot 2024-01-04 at 10 35 00
Screenshot 2024-01-04 at 10 38 02

@mgiota
Copy link
Contributor Author

mgiota commented Jan 4, 2024

@elasticmachine merge upstream

@mgiota mgiota enabled auto-merge (squash) January 4, 2024 11:16
@mgiota mgiota merged commit aa372f4 into elastic:main Jan 4, 2024
20 checks passed
@kibana-ci
Copy link
Collaborator

💚 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
apm 3.1MB 3.1MB +26.0B
observability 592.4KB 592.4KB -14.0B
total +12.0B

History

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

cc @mgiota

@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 4, 2024
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 Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants