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

APM header changes #82870

Merged
merged 15 commits into from
Nov 12, 2020
Merged

APM header changes #82870

merged 15 commits into from
Nov 12, 2020

Conversation

smith
Copy link
Contributor

@smith smith commented Nov 6, 2020

  • Make APM and UX headers size medium instead of large
  • Remove margin around APM main container
  • Make APM tabs condensed
  • Switch environment filter and date picker positions
  • Move search bar (kuery + date picker) below the tabs
  • Wrap pages in EuiPage components
  • Set a minimum width on the enironment selector so it doesn't collapse when loading
  • Don't show search bar on service map

Fixes #81954. Fixes #81723.

Before

image
image

After

image
image

- Make APM and UX headers size medium instead of large
- Remove margin around APM main container
- Make APM tabs condensed
- Switch environment filter and date picker positions
- Move search bar (kuery + date picker) below the tabs
- Wrap pages in `EuiPage` components
- Set a minimum width on the enironment selector so it doesn't collapse when loading
- Don't show search bar on service map

Fixes elastic#81954.
@smith smith requested review from a team as code owners November 6, 2020 17:30
@botelastic botelastic bot added Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Nov 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@smith
Copy link
Contributor Author

smith commented Nov 9, 2020

@elasticmachine merge upstream

@smith
Copy link
Contributor Author

smith commented Nov 9, 2020

retest

@smith
Copy link
Contributor Author

smith commented Nov 10, 2020

@elasticmachine merge upstream

Copy link
Contributor

@formgeist formgeist left a comment

Choose a reason for hiding this comment

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

Minor suggestion to change the padding of the tabs.

// be the primary color.
const StyledTabs = styled(EuiTabs)`
padding: ${({ theme }) =>
`${theme.eui.gutterTypes.gutterMedium} ${theme.eui.gutterTypes.gutterLarge}`};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`${theme.eui.gutterTypes.gutterMedium} ${theme.eui.gutterTypes.gutterLarge}`};
`${theme.eui.gutterTypes.gutterMedium}`};

I reckon the padding shouldn't be larger on the sides to make it align down the page.

Before

Screenshot 2020-11-10 at 09 23 51

After

Screenshot 2020-11-10 at 09 23 33

@formgeist
Copy link
Contributor

Another issue, wasn't sure where to comment on this within the code, but there's some focus states on the tabs that don't work as expected. I think Logs and Metrics have a larger focus area on the tabs than what's in the current tabs.

APM

Kapture 2020-11-10 at 09 19 36

Logs

Kapture 2020-11-10 at 09 20 05

Lastly, the order of the selected service changed so now Metrics are at the end of the list. I'm assuming this was not intentional, just wanted to point it out.

Screenshot 2020-11-10 at 09 17 19

@smith
Copy link
Contributor Author

smith commented Nov 10, 2020

@formgeist

I reckon the padding shouldn't be larger on the sides to make it align down the page.

I can change this, but it makes the padding inconsistent with the tabs on the metrics, logs, security, and fleet pages.

there's some focus states on the tabs that don't work as expected.

I'll look into this.

Lastly, the order of the selected service changed so now Metrics are at the end of the list. I'm assuming this was not intentional, just wanted to point it out.

It was intentional, but I can move it back. Since the tab usually is rendered later I found it less jarring if it gets added at the end than if it gets added between tabs.

@smith
Copy link
Contributor Author

smith commented Nov 10, 2020

@formgeist

there's some focus states on the tabs that don't work as expected.

This is because we have <APMLink /> (or <ServiceMapLink /> or whatever) links inside of the tabs and are not specifying the href attribute on the tabs directly.

I left these as-is so I wouldn't have to rework all of these (the way it's set up it's easy to get a link element but harder to just get the href.)

The only difference I noticed before is that we had to override the link color so they weren't all blue, since this affects the focus I'll go ahead and fix this.

@smith
Copy link
Contributor Author

smith commented Nov 10, 2020

@formgeist all of your comments should be addressed now.

@sqren I had to go and implement useXHref hooks in the files for the XLink components since putting a link element inside of a tab messes up the focus, but using a straight href attribute does not.

@formgeist
Copy link
Contributor

I can change this, but it makes the padding inconsistent with the tabs on the metrics, logs, security, and fleet pages.

OK, I will follow up with @elastic/observability-design to make the padding in the header consistent.

It was intentional, but I can move it back. Since the tab usually is rendered later I found it less jarring if it gets added at the end than if it gets added between tabs.

Alright - would be great to have this called out in the PR next time otherwise it might have gone unnoticed. I understand that the Metrics tab will mostly load in late because of the agent check, but with RUM moving to the UX app (where we'd remove the option), would we be able to assume that the service navigation should always show Metrics, rather than wait for the check? I might even say we can disable the option for RUM rather than hide it. We can move this discussion and decision to an issue. Also in that discussion, we can talk about whether the horizontal list should be different. cc @nehaduggal @sqren

Thanks for addressing it - let's get this merged in and make polish changes in a later iteration.


function ServiceInventoryLink(props: APMLinkExtendProps) {
export function useServiceInventoryHref() {
Copy link
Member

Choose a reason for hiding this comment

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

Should the filename be changed to use_service_inventory_link.tsx?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I opened #83196 to look at this.

export function useServiceOverviewHref(serviceName: string) {
return useAPMHref(`/services/${serviceName}/overview`);
}

export function ServiceOverviewLink({
Copy link
Member

@sorenlouv sorenlouv Nov 11, 2020

Choose a reason for hiding this comment

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

Is this component still needed if we have the hook? I'm all for simplifying our link helpers and having one way to do it might be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I opened #83196 to look at this.

@smith
Copy link
Contributor Author

smith commented Nov 11, 2020

@formgeist

Alright - would be great to have this called out in the PR next time otherwise it might have gone unnoticed.

Sorry about that. I meant to put it in the description but missed it.

@smith
Copy link
Contributor Author

smith commented Nov 11, 2020

@elasticmachine merge upstream

@smith
Copy link
Contributor Author

smith commented Nov 11, 2020

retest

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1160 1161 +1

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 +2.0KB
observability 160.8KB 160.8KB -6.0B
total +2.0KB

History

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

@smith smith merged commit 452d4c8 into elastic:master Nov 12, 2020
@smith smith deleted the nls/header-layout branch November 12, 2020 22:26
smith added a commit to smith/kibana that referenced this pull request Nov 15, 2020
- Make APM and UX headers size medium instead of large
- Remove margin around APM main container
- Make APM tabs condensed
- Switch environment filter and date picker positions
- Move search bar (kuery + date picker) below the tabs
- Wrap pages in `EuiPage` components
- Set a minimum width on the enironment selector so it doesn't collapse when loading
- Don't show search bar on service map

Fixes elastic#81954.
smith added a commit that referenced this pull request Nov 16, 2020
- Make APM and UX headers size medium instead of large
- Remove margin around APM main container
- Make APM tabs condensed
- Switch environment filter and date picker positions
- Move search bar (kuery + date picker) below the tabs
- Wrap pages in `EuiPage` components
- Set a minimum width on the enironment selector so it doesn't collapse when loading
- Don't show search bar on service map

Fixes #81954.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 16, 2020
* master:
  [Security Solution][Detections] Adds framework for replacing API schemas (elastic#82462)
  [Enterprise Search] Share Loading component (elastic#83246)
  Consolidates Jest configuration files and scripts (elastic#82671)
  APM header changes (elastic#82870)
  [Security Solutions] Adds a default for indicator match custom query of *:* (elastic#81727)
  [Security Solution] Note 10k object paging limit on Endpoint list (elastic#82889)
  [packerCache] fix gulp usage, don't archive node_modules (elastic#83327)
  Upgrade Node.js to version 12 (elastic#61587)
  [Actions] Removing placeholders and updating validation messages on connector forms (elastic#82734)
  [Fleet] Rename ingest_manager_api_integration tests fleet_api_integration (elastic#83011)
  [DOCS] Updates Discover docs (elastic#82773)
  [ML] Data frame analytics: Adds map view (elastic#81666)
  enables actions scoped within the stack to register at Basic license (elastic#82931)
smith added a commit to smith/kibana that referenced this pull request Nov 20, 2020
This was supposed to be part of elastic#82870 but was missed.

Add the search bar, format the heading stats, and wrape the page contents in an `EuiPage`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Header layout changes [APM] Move query bar and date picker into tabs
5 participants