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

feat(perf): Add trends widgets for landing page v3 #29461

Merged
merged 3 commits into from
Oct 21, 2021

Conversation

k-fish
Copy link
Member

@k-fish k-fish commented Oct 20, 2021

Summary

This adds trends widgets in the new generic performance widget format. Clicking on the transaction will bring you to the trends page scope to that transaction, which should help discovery of trends as a feature. Made some modifications to the trends chart and query to support alternate use, and moved a few shared functions.

Other:

  • Did some light fixes for multi-breakpoints, will need to do more still since it's not great between wide screen and phone size.

This adds trends widgets in the new generic performance widget format. Clicking on the transaction will bring you to the trends page scope to that transaction, which should help discovery of trends as a feature. Made some modifications to the trends chart and query to support alternate use, and moved a few shared functions.

Other:
- Did some light fixes for multi-breakpoints, will need to do more still since it's not great between wide screen and phone size.
@k-fish k-fish requested a review from a team October 20, 2021 22:05
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2021

size-limit report

Path Base Size (3da26da) Current Size Change
src/sentry/static/sentry/dist/entrypoints/app.js 52.77 KB 52.75 KB -0.03% 🔽
src/sentry/static/sentry/dist/entrypoints/sentry.css 70.89 KB 70.89 KB 0%

@@ -59,9 +64,9 @@ export function getTrendsRequestPayload(props: RequestProps) {
function TrendsDiscoverQuery(props: Props) {
return (
<GenericDiscoverQuery<TrendsData, TrendsRequest>
{...props}
Copy link
Member

Choose a reason for hiding this comment

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

Was there a reason for this change? Seems unlikely that this changed the behaviour of anything but just want to be sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

In general, I'd say spreads should always be first so hardcoded settings are applied with precedence, unless there is a specific thing that props will override. In this specific instance it's been a couple week since I actually wrote that line but I believe there was a bug with props containing extra keys and it causing an issue.

field: 'trend_percentage()',
},
];
const rest = {eventView, ...omit(props, 'eventView')};
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This can be done without the use of omit right?

Suggested change
const rest = {eventView, ...omit(props, 'eventView')};
const rest = {...props, eventView};

@k-fish k-fish enabled auto-merge (squash) October 21, 2021 15:06
@k-fish k-fish merged commit 22bd442 into master Oct 21, 2021
@k-fish k-fish deleted the feat/perf-landing-widgets-trends branch October 21, 2021 18:13
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants