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(gatsby-plugin-gatsby-cloud): enable preview status indicator and tooltip #31347

Merged
merged 24 commits into from
May 20, 2021

Conversation

DanielSLew
Copy link
Contributor

@DanielSLew DanielSLew commented May 10, 2021

Second iteration of the preview indicator.

See video of design/usage here:
https://user-images.githubusercontent.com/51924260/118557212-de414780-b732-11eb-8ede-3cbfa5518941.mov

The indicator now features 3 buttons

  • Gatsby - shows information about the build, leads to build logs on error and new build on success
  • Link - let's you copy the current URL path to share
  • Info - When you're on the most recent build it lets you know how long ago it was built.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 10, 2021
@wardpeet wardpeet force-pushed the 29047/preview-status-indicator-and-tooltip branch from 31e8bb3 to 7ebcdc6 Compare May 11, 2021 09:15
@wardpeet wardpeet added status: needs core review Currently awaiting review from Core team member and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 11, 2021
@DanielSLew DanielSLew force-pushed the 29047/preview-status-indicator-and-tooltip branch from 05d8238 to 1b8445e Compare May 14, 2021 14:57
@wardpeet wardpeet force-pushed the 29047/preview-status-indicator-and-tooltip branch from 9a3c678 to 60a965a Compare May 17, 2021 15:11
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

I've added some small remarks.

Do we still need all the svg files listed in the project?
For example packages/gatsby-plugin-gatsby-cloud/src/assets/successIcon.svg

@wardpeet wardpeet changed the title 29047/preview status indicator and tooltip feat(gatsby-plugin-gatsby-cloud): enable preview status indicator and tooltip May 19, 2021
wardpeet
wardpeet previously approved these changes May 20, 2021
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

Added a small follow up but looks great

@LekoArts
Copy link
Contributor

Taken from a project of mine using the current next of the cloud plugin:

image

Is the indicator actually something we want to ship even if I don't use it?

@wardpeet wardpeet added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label May 20, 2021
@wardpeet wardpeet merged commit 60a9898 into master May 20, 2021
@wardpeet wardpeet deleted the 29047/preview-status-indicator-and-tooltip branch May 20, 2021 15:28
@kelvindecosta
Copy link
Contributor

Taken from a project of mine using the current next of the cloud plugin:

image

Is the indicator actually something we want to ship even if I don't use it?

Hey @LekoArts, @wardpeet

The new update looks nice.
The preview indicator is a nice widget that provides some convenience when using the Gatsby Cloud dashboard.

However, the inclusion of the date-fns package, a newly added dependency of the Gatsby Cloud plugin, adds 83.3kB to the final parsed bundle (as detected by gatsby-plugin-webpack-bundle-analyser-v2).
While this utility is a nice QoL upgrade, I don't think it should be directly attached to the website build.
Ultimately, the sites are slower.

I might be completely wrong here and I would love for your thoughts about it.

Thanks again for your help

@LekoArts
Copy link
Contributor

This was addressed in a follow-up and was shipped with the release: #31506

@kelvindecosta
Copy link
Contributor

Hey @LekoArts

Thank you for the quick reply!

I opened an issue, #31597, which compares the bundle sizes between versions 2.5.0 and 2.6.0.
The date-fns package is included in the bundle when using the latter.

Do I have to explicitly opt out of using the indicator?
I have tried setting GATSBY_PREVIEW_INDICATOR_ENABLED to false, but that doesn't change the bundle.

Again, thanks for you help with this matter!
Any further feedback / advice is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes status: needs core review Currently awaiting review from Core team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants