elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.61k stars 8.22k forks source link

[APM] EuiEmptyPrompt horizontal layout is not working #188200

Closed kpatticha closed 3 months ago

kpatticha commented 3 months ago

The issue appears in APM, while in infra it renders as expected https://eui.elastic.co/#/display/empty-prompt#layout

Current

image

Expected

image

While it should be https://eui.elastic.co/#/display/empty-prompt#layout


Found in
apm • public/components/app/infra_overview/infra_tabs/empty_prompt.tsx:
  40        icon={<NoResultsIllustration />}
  41:       layout="horizontal"
  42        title={

apm • public/components/app/service_dashboards/empty_dashboards.tsx:
  38          }
  39:         layout="horizontal"
  40          color="plain"

apm • public/components/app/service_inventory/multi_signal_inventory/table/no_entities_empty_state.tsx:
  54              }
  55:             layout="horizontal"
  56              color="plain"
elasticmachine commented 3 months ago

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

smith commented 3 months ago

FYI this seems to be working correctly when it's enabled in hosts: CleanShot 2024-07-15 at 14 50 23@2x

(I don't think it's the same code, but it displays correctly.)

kpatticha commented 3 months ago

@smith yes, I mentioned that in the description. The horizontal layout seems to be broken only in APM for some reason.

kpatticha commented 3 months ago

I'm going to tackle this one first as the root problem for https://github.com/elastic/observability-dev/issues/3779

kpatticha commented 3 months ago

This one is currently blocked as it's a issue in the EUI.

I talked with them and they will fix it. In the meantime, I'm moving this to backlog.

Why is happening only in APM? EUI defines breakpoints xs, s, m, l, xl as default theme but APM on Kibana uses an additional breakpoint xxl (file) breaking the media rule which is refined here

ex

@media only screen and (min-width: 992px) and (max-width: 1599px) {
    .css-nuy00t-euiEmptyPrompt__main-horizontal-l-l {
        flex-direction: row-reverse;
    }
}

The functionality of euiBreakpoint in EUI needs to updated on handle breakpoints

smith commented 3 months ago

Thanks @kpatticha! I'll unassign you for now.

kpatticha commented 3 months ago

The fix has been already merged https://github.com/elastic/eui/pull/7935 and I verified the fix locally image closing it