-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(www): tagline on plugin library landing page #12530
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! It looks a bit janky to me so I'm thinking of making the widths of the dynamic parts fixed so you get some extra spacing if it's smaller but it won't jump around. Another option which takes a bit more time is to use translates to move the text in front. I can do that in a followup.
The second one is more subtle as it has only 1 moving part but unsure if it's clear enough. I'll let the pros decide 😄
I love the design, it makes it more interactive!
www/src/components/rotater.js
Outdated
}) | ||
} | ||
componentDidMount() { | ||
const intervalId = setInterval(() => this.incrementItem(), 5000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should work with onAnimationEnd event instead of an interval? If we keep an interval I would suggest to use setTimeout instead as setInterval might not be 5s over time and setTimeout always will be.
One thing I'm wondering is if there's a way to introduce a stop button so the rotating text doesn't distract people. We could use prefers-reduced-motion in CSS or JS to respect user preferences in supported browsers...but an additional icon button would help, too. |
these seem like good ideas! right now clicking the arrows will stop the rotation. @fk offered to take this over to prettify this and get it merged in! |
💯, https://github.com/braposo/react-text-loop/tree/master/ -like behavior would be great.
or something? 💯 to everything that @marcysutton said, too — maybe if we don't want to invest in play/pause just hide the whole thing if the user |
We could go for react-text-loop to get this one going. I'm not the biggest fan as it's quite big https://bundlephobia.com/result?p=react-text-loop@2.0.1 |
Whatever we do end up using, I'd love to review it for accessibility prior to shipping as rotating things usually need a little help. |
First measures to get an initial version ready to ship:
|
# Conflicts: # www/src/pages/plugins.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fk awesome job on this. Left some nit-picky React comments (which I'm happy to make the changes!) but otherwise this looks so nice.
@fk I like the minimal--presuming that's the one without a background and a slight grey border? But they both look great 💜 |
www/src/components/rotator.js
Outdated
<Slider | ||
items={[text]} | ||
color={`#000`} | ||
getSize={size => this.setState({ size })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh! Thanks for catching that @wardpeet! 🙏
@wardpeet and myself (with the help of @DSchau 🙏) settled on the "minimal" variant, and think it's good to ship as a first version: Summing up, we modified @calcsam's first shot to
We didn't look into disabling the slider if there's anything in the search bar because we didn't find it too distracting. /cc @calcsam |
Holy smokes, this looks beautiful @fk! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does indeed look beautiful.
Nicely done everyone! Pulling it down and taking a look; will merge in a bit!
Just leaving this to mention that this looks so beautiful! Love it. Great work Flo! |
Heads up - this broke SSR because we weren't guarding window with a |
## Description Fixes a tiny regression re: SSR rendering introduced in #12530 Validated this by: 1. Ensuring rotater animates (by default!) in built version 1. Ensuring rotater _does not_ animate when reduced motion is enabled in System Preferences - Accessibility 1. Ensuring site can build with `gatsby build` & `gatsby serve`
🙏 @DSchau! (and @sid, and @calcsam, and @marcysutton, and @wardpeet!) |
Ugh my bad sorry 🙏 |
This is an idea for a tagline for the plugin page to illustrate how versatile the Gatsby plugin ecosystem is.
What do y'all think? @KyleAMathews @fk @marcysutton @amberleyromo?
If we want to ship this we should: