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

Overview heights and loading states #83360

Merged
merged 5 commits into from
Nov 17, 2020
Merged

Conversation

smith
Copy link
Contributor

@smith smith commented Nov 13, 2020

  • Set the chart height to fill the whole container
  • Remove the initial loading spinner for the tables and always show the progress bar
  • Make the last seen column on the errors table a bit wider so it doesn't wrap
  • Make a ServiceOverviewTable component that pins the pagination to the bottom of the panel
  • Show the loading spinner on charts when doing updates

CleanShot 2020-11-15 at 19 55 53

* Set the chart height to fill the whole container
* Remove the initial loading spinner for the tables and always show the progress bar
* Make the last seen column on the errors table a bit wider so it doesn't wrap
* Make a `ServiceOverviewTable` component that pins the pagination to the bottom of the panel
* Show the loading spinner on charts when doing updates
@smith smith force-pushed the nls/overview-heights branch from 5db1a2d to 49d060e Compare November 16, 2020 02:06
@smith smith changed the title Fixes for overview page chart and table heights Overview heights and loading states Nov 16, 2020
@smith smith added release_note:skip Skip the PR/issue when compiling release notes v7.11.0 v8.0.0 labels Nov 16, 2020
@smith smith marked this pull request as ready for review November 16, 2020 02:12
@smith smith requested a review from a team as a code owner November 16, 2020 02:12
@smith smith requested a review from formgeist November 16, 2020 02:13
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Nov 16, 2020
@elasticmachine
Copy link
Contributor

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

@@ -211,11 +211,7 @@ export function TransactionDistribution({
/>
</h5>
</EuiTitle>
<ChartContainer
height={unit * 10}
hasData={!!(distribution && !distribution.noHits)}
Copy link
Member

@sorenlouv sorenlouv Nov 16, 2020

Choose a reason for hiding this comment

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

Thanks for getting rid of hasData 👍

* The height for a table on the overview page. Is the height of a 5-row basic
* table.
*/
const tableHeight = 298;
Copy link
Member

@sorenlouv sorenlouv Nov 16, 2020

Choose a reason for hiding this comment

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

This will cause problems as soon as Eui changes anything related to the height of the row (padding, margin, border etc), right. Would be great if we ca make it dynamic eg:

Suggested change
const tableHeight = 298;
const tableHeight = 5 * EuiTable.rowHeight;

Probably not a variable that's exposed to but might be worth asking for.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The row doesn't have a height set explicitly, the actual table height is calculated by:

s = height of the sparkline chart (the tallest element in the row) = 24px
c = the table cell padding = 8px * 2
b = the table row borders and padding = 2px * 2
n = the number of rows = 5
h = height of the heading = 34px
p = height of the pagination = 40px

So it's ((s + c + b) * 5) + h + p = 298px

If we or EUI were to change any of these it would just make it so there's a bit of extra whitespace at the bottom of the chart or the table, so I think it's safe to leave it for now.

@smith
Copy link
Contributor Author

smith commented Nov 16, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1161 1162 +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 +410.0B

History

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

@smith smith merged commit 6ea1940 into elastic:master Nov 17, 2020
@smith smith deleted the nls/overview-heights branch November 17, 2020 00:55
smith added a commit to smith/kibana that referenced this pull request Nov 17, 2020
* Overview heights and loading states
* Set the chart height to fill the whole container
* Remove the initial loading spinner for the tables and always show the progress bar
* Make the last seen column on the errors table a bit wider so it doesn't wrap
* Make a `ServiceOverviewTable` component that pins the pagination to the bottom of the panel
* Show the loading spinner on charts when doing updates
smith added a commit that referenced this pull request Nov 17, 2020
* Set the chart height to fill the whole container
* Remove the initial loading spinner for the tables and always show the progress bar
* Make the last seen column on the errors table a bit wider so it doesn't wrap
* Make a `ServiceOverviewTable` component that pins the pagination to the bottom of the panel
* Show the loading spinner on charts when doing updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants