Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@marians
Copy link
Member

@marians marians commented Mar 8, 2019

For https://github.com/giantswarm/giantswarm/issues/5410

This hides the Get Started button in the cluster overview if the cluster is older than 30 days.

Preview

image

@marians marians self-assigned this Mar 8, 2019
@marians marians requested review from oponder and pipo02mix March 8, 2019 14:24
@taylorbot
Copy link

Comparison of lighthouse reports:

MASTER THIS BRANCH DELTA
Performance 64 63 ❌ -1
- First Contentful Paint 35 34 ❌ -1
- First Meaningful Paint 35 34 ❌ -1
- Time to Interactive 79 78 ❌ -1
- Preconnect to required origins 75 74 ❌ -1
- Minimizes main-thread work 94 95 ✅ +1

@marians
Copy link
Member Author

marians commented Mar 11, 2019

Re-ping @oponder @pipo02mix

Copy link
Contributor

@oponder oponder left a comment

Choose a reason for hiding this comment

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

I think in terms of codestyle, I will be going towards a recommendation to not have extra logic in the render() function before the return that returns JSX.

I think we should a habit of moving that out into functions.

@marians
Copy link
Member Author

marians commented Mar 11, 2019

Very valid comment! Fix incoming...

@taylorbot
Copy link

Comparison of lighthouse reports:

MASTER THIS BRANCH DELTA
Performance 63 64 ✅ +1
- First Contentful Paint 34 35 ✅ +1
- First Meaningful Paint 34 35 ✅ +1
- Speed Index 68 69 ✅ +1
- Time to Interactive 78 79 ✅ +1
- Estimated Input Latency 98 100 ✅ +2
- Preconnect to required origins 74 75 ✅ +1
- JavaScript execution time 93 94 ✅ +1
- Minimizes main-thread work 95 96 ✅ +1

Copy link
Contributor

@pipo02mix pipo02mix left a comment

Choose a reason for hiding this comment

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

LGTM

.diff(moment().utc()) / 1000
);

return age < 30 * 24 * 60 * 60;
Copy link
Contributor

Choose a reason for hiding this comment

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

small perf improvement: calculate this in a class var as constant to avoid do the calculation every call :)

@marians marians merged commit 1f57f9d into master Mar 11, 2019
@marians marians deleted the hide-getting-started branch March 11, 2019 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants