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(discover): Previous period on charts #29211

Merged
merged 8 commits into from
Oct 8, 2021

Conversation

shruthilayaj
Copy link
Member

@shruthilayaj shruthilayaj commented Oct 8, 2021

Add support for previous period on unfurls.

Screenshots
Screen Shot 2021-10-08 at 12 45 40 PM

Screen Shot 2021-10-08 at 12 27 21 PM

Chart debug:
Screen Shot 2021-10-08 at 12 26 38 PM

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2021

size-limit report

Path Base Size (97da517) Current Size Change
src/sentry/static/sentry/dist/entrypoints/app.js 52.7 KB 52.7 KB +0.01% 🔺
src/sentry/static/sentry/dist/entrypoints/sentry.css 70.9 KB 70.9 KB 0%

Comment on lines +200 to +210

const RGB_LIGHTEN_VALUE = 30;
export const lightenHexToRgb = (colors: string[]) =>
colors.map(hex => {
const rgb = [
Math.min(parseInt(hex.slice(1, 3), 16) + RGB_LIGHTEN_VALUE, 255),
Math.min(parseInt(hex.slice(3, 5), 16) + RGB_LIGHTEN_VALUE, 255),
Math.min(parseInt(hex.slice(5, 7), 16) + RGB_LIGHTEN_VALUE, 255),
];
return `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`;
});
Copy link
Member Author

Choose a reason for hiding this comment

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

Reusing what @edwardgou-sentry has here

@shruthilayaj shruthilayaj marked this pull request as ready for review October 8, 2021 16:45
@shruthilayaj shruthilayaj requested a review from a team as a code owner October 8, 2021 16:45
@shruthilayaj shruthilayaj requested review from a team and removed request for a team October 8, 2021 16:45
@edwardgou-sentry
Copy link
Contributor

Looks good to me! just one question about the line series stacking

Copy link
Contributor

@edwardgou-sentry edwardgou-sentry left a comment

Choose a reason for hiding this comment

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

LGTM

@shruthilayaj shruthilayaj merged commit d68dbde into master Oct 8, 2021
@shruthilayaj shruthilayaj deleted the feat/add-previous-period-unfurls branch October 8, 2021 19:32
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 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.

2 participants