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

[Observability Onboarding] Add customizable header for quickstart flows #188340

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Jul 15, 2024

Summary

Resolves #186397.

Adds a new customizable header for onboarding quickstart flows.

To add a new header, one must specify a logo type or EuiIconType, along with headlineCopy and descriptionCopy, and put a new entry in the headerContent record, and a corresponding case in the customHeaderProps helper function I have defined. When routes that require custom headers are defined, the function will pick up the necessary props and return them to the HeaderSection component where they're used to render a CustomHeaderSection. Otherwise, the component will render the default header.

If the consuming code specifies a SupportedLogo type, it's rendered as an EuiIcon. Otherwise, if an EuiIconType is specified, it renders as an avatar, per the design.

Code is WIP.

Adds new headers for quickstart flows

Kubernetes

image

OpenTelemetry

image

Autodetect

image

@justinkambic justinkambic added release_note:enhancement Team:obs-ux-logs Observability Logs User Experience Team v8.16.0 labels Jul 15, 2024
@justinkambic justinkambic self-assigned this Jul 15, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@justinkambic justinkambic force-pushed the 186397/kubernetes-setup-header branch from d129791 to fbcb8ba Compare July 16, 2024 15:20
@justinkambic justinkambic marked this pull request as ready for review July 16, 2024 15:27
@justinkambic justinkambic requested review from a team as code owners July 16, 2024 15:27
@elasticmachine
Copy link
Contributor

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

@justinkambic justinkambic changed the title [Observability Onboarding] [WIP] Add dedicated header for Kubernetes quickstart flow [Observability Onboarding] Add dedicated header for Kubernetes quickstart flow Jul 16, 2024
@justinkambic justinkambic force-pushed the 186397/kubernetes-setup-header branch from 4b0a833 to 1505c58 Compare July 16, 2024 16:42
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Jul 16, 2024
@flash1293
Copy link
Contributor

Just tested and this doesn't work when answering the first question, then clicking the tile - I think it's because it's checking the path for kubernetes, not kubernetes/?category=infra.

In general, it's not explicitly stated in the issue (sorry for that), but by my understanding the idea was to have that header for all the flows, is that right @sileschristian ?

@justinkambic
Copy link
Contributor Author

this doesn't work when answering the first question, then clicking the tile

Sorry I overlooked this. I should've marked this as a draft, I am adding some unit tests that have not been pushed yet. I was hoping to have that available by now but I am doing SDH for infra services this week so I am delayed on everything else I was doing. Thanks for uncovering the issue, I will address it and re-ping when it's ready.

@sileschristian
Copy link

In general, it's not explicitly stated in the issue (sorry for that), but by my understanding the idea was to have that header for all the flows, is that right @sileschristian ?

Yes. To be consistent that was the idea. Since we were working on the K8s, I opened just an issue for this one. But this should be for the rest (Otel, Firehose, Auto-detect, etc)

@justinkambic
Copy link
Contributor Author

But this should be for the rest (Otel, Firehose, Auto-detect, etc)

Ok, let's merge this as a first step and then I will follow up and refactor this header to be general. Do we have copy for the other flows? Or should it keep the generic description text and just change the "Setting up {FLOW}", and have the logo update for whichever flow is covered?

@justinkambic justinkambic force-pushed the 186397/kubernetes-setup-header branch from e37f192 to 5f45981 Compare July 19, 2024 15:10
@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 19, 2024

⏳ Build in-progress

History

cc @justinkambic

@flash1293
Copy link
Contributor

Hi @justinkambic , the header is way too high for me, is there something missing?

Screenshot 2024-07-22 at 16 04 55

Also @sileschristian confirmed this should be done for all flows, are you planning to roll it out to the others on separate PRs? Mostly asking as it might make things easier to not have a special case for it.

@justinkambic
Copy link
Contributor Author

the header is way too high for me, is there something missing?

This is quite strange, I have screenshots I saved while developing this that do not show the header doing this, but now I am seeing it as well. I will fix it 👍

this should be done for all flows, are you planning to roll it out to the others on separate PRs? Mostly asking as it might make things easier to not have a special case for it.

My plan was to go ahead and merge this and then do a separate refactor to update it. I am fine with doing all of the work on this branch though, if that's preferred. As I understand it, we need a separate codepath for this header regardless as we are overriding the existing default header for all of these cases. The way the app is structured, the header was previously independent of the routes and thus we need to override it for routes like /kubernetes that require a specialized header.

@justinkambic justinkambic changed the title [Observability Onboarding] Add dedicated header for Kubernetes quickstart flow [Observability Onboarding] Add customizable header for quickstart flows Jul 24, 2024
@justinkambic justinkambic force-pushed the 186397/kubernetes-setup-header branch from 3a9ee5f to 3a0c019 Compare July 24, 2024 20:14
@kibana-ci
Copy link
Collaborator

kibana-ci commented Jul 24, 2024

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observabilityOnboarding 225 228 +3

Async chunks

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

id before after diff
observabilityOnboarding 243.5KB 246.3KB +2.8KB

History

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

cc @justinkambic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:project-deploy-observability Create an Observability project release_note:enhancement Team:obs-ux-logs Observability Logs User Experience Team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Observability Onboarding] Add K8s page header to the quick start flow
6 participants