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

Try WordPress logo animation for preview #10896

Merged
merged 3 commits into from
Oct 23, 2018
Merged

Conversation

jasmussen
Copy link
Contributor

This adds a WordPress logo that paints itself when you click preview.

Labelled "Try" because it still needs a few thoughts. We might need to speed up the animation because most previews are super fast and you barely see the animation.

Does it fix #7922?

@jasmussen jasmussen added the [Type] Enhancement A suggestion for improvement. label Oct 22, 2018
@jasmussen jasmussen self-assigned this Oct 22, 2018
@jasmussen jasmussen requested a review from a team October 22, 2018 12:04
@mtias
Copy link
Member

mtias commented Oct 22, 2018

+1 to speeding it up a tiny bit. This looks like a good base.

@youknowriad
Copy link
Contributor

Can you add a CHANGELOG entry to the modified package? :)

<path class="outer" d="M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36" fill="none" />
<path class="inner" d="M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z" fill="none" />
</svg>
<p>Generating preview...</p>
Copy link
Member

Choose a reason for hiding this comment

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

This should be translatable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, but I think that's blocked on #7725.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jasmussen
Copy link
Contributor Author

Can you add a CHANGELOG entry to the modified package? :)

Things are moving so fast, I can't even keep up. Can you point me to information on how to do that, then I will?

@youknowriad
Copy link
Contributor

@jasmussen
Copy link
Contributor Author

I sped up the animation a bit. You can see it in https://codepen.io/joen/pen/jepZrB. Any faster and it feels stressful. It's now 1.5s instaed of 3s.

@@ -1,3 +1,7 @@
## 5.0.1 (Unreleased)

- Add animated logo to preview interstitial screen.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd just add a title for this. Hesitating between ## New Features which means we'd probably have to pick 5.1.0 as a version of just ## Polish where we'd keep 5.0.1

@jasmussen
Copy link
Contributor Author

I wouldn't call it a new feature, it's such a small thing.

@jasmussen
Copy link
Contributor Author

Reminds me I probably need to add the vendor prefixes for animation manually since this isn't postcssed.

This adds a WordPress logo that paints itself when you click preview.

Labelled "Try" because it still needs a few thoughts. We might need to speed up the animation because most previews are super fast and you barely see the animation.
@jasmussen
Copy link
Contributor Author

Polished things up. How are we looking?

@jasmussen jasmussen added this to the 4.2 milestone Oct 23, 2018
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM 👍 We can fix the i18n in the corresponding PR #10880

@jasmussen
Copy link
Contributor Author

Awesome, thank you. Merging when the checks pass.

@jasmussen jasmussen merged commit 68b454c into master Oct 23, 2018
@jasmussen jasmussen deleted the try/preview-animation branch October 23, 2018 09:20
@mtias
Copy link
Member

mtias commented Oct 23, 2018

Thanks for the quick work on this one.

@ocean90
Copy link
Member

ocean90 commented Oct 23, 2018

@jasmussen Looks like the changelog entry got wrong during the merge because 5.0.1 is already released.

@jasmussen
Copy link
Contributor Author

Thanks @ocean90, and ack! What's the best way for me to find the latest version of these packages in the future? I was busy elsewhere when things were all packaged up and published.

@ocean90
Copy link
Member

ocean90 commented Oct 23, 2018

Good question, probably in the npm directory directly: https://www.npmjs.com/package/@wordpress/editor

But I guess also when the version has already a date assigned. The conflict should have looked like this:
pr-merge-conflict

Do you want submit a quick PR for this? #10880 and #10861 are kinda depending on this.

@jasmussen
Copy link
Contributor Author

@ocean90 sorry for the delay, was helping the toddler with her homework. Submitted #10953 which I hope addresses the issue. Let me know if not.

@noisysocks
Copy link
Member

This is really pretty! 😍

@youknowriad youknowriad modified the milestones: 4.2, 4.1 - UI freeze Oct 24, 2018
youknowriad pushed a commit that referenced this pull request Oct 24, 2018
* Try WordPress logo animation for preview

This adds a WordPress logo that paints itself when you click preview.

Labelled "Try" because it still needs a few thoughts. We might need to speed up the animation because most previews are super fast and you barely see the animation.

* Clean up CSS, add vendor prefixes

* Tweak the changelog
antpb pushed a commit to antpb/gutenberg that referenced this pull request Oct 26, 2018
* Try WordPress logo animation for preview

This adds a WordPress logo that paints itself when you click preview.

Labelled "Try" because it still needs a few thoughts. We might need to speed up the animation because most previews are super fast and you barely see the animation.

* Clean up CSS, add vendor prefixes

* Tweak the changelog
@StaggerLeee
Copy link

StaggerLeee commented Nov 6, 2018

It will be one of the most popular filters to change/remove this logo. If filter will be possible.
The same as Logo visible on backend login screen.

@miscs
Copy link

miscs commented Nov 21, 2018

Is a filter planned to remove/change this animation? Would be much appreciated.

@noisysocks
Copy link
Member

@StaggerLeee @miscs: No filter for changing the animation is currently planned. It sounds like something we could do in a future release, though, if you'd like to open a new issue with the suggestion 🙂

@StaggerLeee
Copy link

StaggerLeee commented Nov 22, 2018

I can hide it with CSS and ! declaration. Or somehow with JS.
Will not opet single one issue here. You just close it.

@ducngyn
Copy link

ducngyn commented Nov 22, 2018

Is there a way to change the animation or remove it with a hook or something like that?
Or can I access the CSS properties without altering the Gutenberg core code?

@noisysocks
Copy link
Member

I've written a proposal for a filter which would let one customise this UI in #12238.

@miscs
Copy link

miscs commented Nov 23, 2018

Cool, thank you!

@ducngyn
Copy link

ducngyn commented Nov 23, 2018

Thanks a lot!
Is there a way to work around this before the filter is released?
I can't access the .editor-post-preview-button__interstitial-message class from any css-file and !important is also not working.

@StaggerLeee
Copy link

Thanks @noisysocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve post preview load state
8 participants