-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Remove additional "No data" message and re-ordering charts #75399
[APM] Remove additional "No data" message and re-ordering charts #75399
Conversation
Pinging @elastic/apm-ui (Team:apm) |
@cauemarcondes Do you think it's possible that we can include this issue in this PR as well? #74850 |
Yes, will do it. |
@cauemarcondes I'm not seeing the example that you shared. The "Time spent.." chart has no x-axis values and it's not aligned in the middle as the screenshot would indicate. I'm just picking a time range that I know has no data to return. |
That's weird, can you share the URL? Have you pulled to get the latest changes? |
OK, must've messed in my pull - now it looks as described 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@formgeist I have just pushed a new version with the charts re-ordered. |
Thanks - I noticed that the charts have been rearranged on the RUM services, which features an additional set of charts (map + page load distribution). I think we'd want to keep the original position of these at the bottom. Before Currently in this PR Proposed layout |
good catch. |
@cauemarcondes LGTM 👍 |
...lugins/apm/public/components/shared/TransactionBreakdown/TransactionBreakdownGraph/index.tsx
Outdated
Show resolved
Hide resolved
...lugins/apm/public/components/shared/TransactionBreakdown/TransactionBreakdownGraph/index.tsx
Outdated
Show resolved
Hide resolved
...lugins/apm/public/components/shared/TransactionBreakdown/TransactionBreakdownGraph/index.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we should check what happens when there is a large number of KPIs (e.g. >8)
...ck/plugins/apm/public/components/shared/TransactionBreakdown/TransactionBreakdownKpiList.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I look forward to hearing any feedback from users who might have found the large KPIs useful. I think the consistent look for the charts works much better with this layout.
Once this goes in, I would like to open a new issue to solve some of the responsive layout enhancements to allow for narrower screen sizes to be able to appropriately read the charts. I think we can solve this after the fact, if time permits. |
@elasticmachine merge upstream |
<TransactionBreakdownGraph | ||
timeseries={timeseries.map((serie) => ({ | ||
...serie, | ||
legendValue: asPercent(serie.legendValue, 1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for overwriting series here, and not where it's defined?
kibana/x-pack/plugins/apm/server/lib/transactions/breakdown/index.ts
Lines 211 to 217 in 63265b6
const timeseries = kpis.map((kpi) => ({ | |
title: kpi.name, | |
color: kpi.color, | |
type: 'areaStacked', | |
data: timeseriesPerSubtype[kpi.name], | |
hideLegend: true, | |
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asPercent
is defined in /public
and I think the server doesn't have to know how the UI is going to show the value, it should only provide the value. I have my concerns about color
, type
and hideLegend
, maybe they should all be removed from the server and be defined only in the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #70161 in the backlog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the server doesn't have to know how the UI is going to show the value, it should only provide the value.
It depends. Are there any drawbacks to defining it on the server? I see clear drawbacks in defining the chart config across multiple files.
That being said, if it's too much of a hassle because it'll require you to move asPercent
and its dependencies to the server I'm fine with leaving it as-is.
@smith Regarding #70161: I'd be surprised if we don't have a way to access the advanced settings from the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your input @sqren, the only drawback I can see here is that I'd have to move the asPercent
to a common place. But if it makes sense the server to send the value already formatted then I wouldn't think it as a drawback but as an improvement. My question is does it make sense sending the value already formatted from the server? For what I've seen we never send any formatted value from the server, we always leave this responsibility to the client.
FYI: I'm not against moving the asPercent
, I only want to keep consistency across all APIs we've got.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smith: why? (Other than it being the convention)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a technical level, some explanation is in #70161. If a users are using different themes and the API includes the colors of the lines the API would have to return different responses based on the theme.
If the presentational elements are coupled with the chart data, changing the presentation becomes more difficult.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For theming then it makes sense, although I can imagine that can be supported on the server as well. Personally I'm not swayed by "presentational data belongs on the client". IME, server-side code is more predictable and testable, and it's nice to have it in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, for now then I'll move the asPercent
to the common directory and return the value already formatted from the server. We can continue discussing on Nathan's issue #70161.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good @cauemarcondes 👍
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededBuild metricsasync chunks size
distributable file count
History
To update your PR or re-run it, just comment with: |
…stic#75399) * removing extra message * adding x-axis values when no data is available * reordering charts * fixing internationalization * fixing transaction RUM agent order * addressing PR comment * removing kpis list and show it in the chart legend instead * fixing API test * moving asPercent to the common directory * fixing api test * fixing unit test * removing unused prop * fixing unit test Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
) (#76364) * removing extra message * adding x-axis values when no data is available * reordering charts * fixing internationalization * fixing transaction RUM agent order * addressing PR comment * removing kpis list and show it in the chart legend instead * fixing API test * moving asPercent to the common directory * fixing api test * fixing unit test * removing unused prop * fixing unit test Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
closes #74834
closes #74850