Skip to content

Landing page revamp - #3718

Merged
azz merged 48 commits into
prettier:masterfrom
azz:website-things
Feb 6, 2018
Merged

azz merged 48 commits into
prettier:masterfrom
azz:website-things

Conversation

@azz

@azz azz commented Jan 11, 2018 •

Copy link
Copy Markdown
Member

Started working on #3669. Lots to do still, but it is starting to take shape.

🌐Live Preview

image

cc. @orta @vjeux @sandhose

@orta

orta commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

I better get you some image assets then - this is looking 💯/💯

@azz

azz commented Jan 11, 2018

Copy link
Copy Markdown
Member Author

I wasn't sure which font you had in your designs, too. Is it a web font?

j-f1
j-f1 previously requested changes Jan 11, 2018

@j-f1 j-f1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great so far! There are a couple of image things we need to figure out, though.

Comment thread website/pages/en/index.js Outdated
</div>
);

const bash = string => `~~~bash\n${string}\n~~~`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How difficult would it be to make this a template tag? i.e.

bash`
$ foo
bar
baz
`

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Easy enough - pushed a commit that does that, does it add any value?

Comment thread website/pages/en/index.js Outdated
return (
<a key={i} href={user.infoLink}>
<img
src={user.image}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some of these images don’t look very good on a dark background; we should either switch to a light background or get inverted versions of the images.

Comment thread website/pages/en/index.js Outdated

const Editor = ({ content = "", image, name }) => (
<div style={{ display: "flex", width: "235px", padding: "20px" }}>
<img src={image} style={{ width: "100px", height: "100px" }} />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to find a white Markdown logo for this, since black on dark blue looks bad.

@azz

azz commented Jan 11, 2018

Copy link
Copy Markdown
Member Author

@j-f1 Those images are placeholder while @orta sends the assets from #3669

Comment thread website/data/editors.yml
content: >
[`prettier-atom`](https://github.com/prettier/prettier-atom),
content: |
[`prettier-atom`](https://github.com/prettier/prettier-atom)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@j-f1 This won't put them on their own lines, right? (Would need double line break)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The > on line 3 collapses single newlines, but changing it to a | preserves newlines.

@orta

orta commented Jan 11, 2018 •

Copy link
Copy Markdown
Contributor

Images: Prefer svg vs png? (if png, want @2x and @1x versions?)

Think only one of two are not SVG today, everything else is a vector. Should be easy to replace.

@azz

azz commented Jan 11, 2018

Copy link
Copy Markdown
Member Author

Probably svg? Bit more flexible with resizing.

@duailibe duailibe added the status:wip Pull requests that are a work in progress and should not be merged label Jan 11, 2018
@orta

orta commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

Cool, I’m mid meeting will maybe be ~2hr

@vjeux

vjeux commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

This is awesome! One super wishlist request: would be awesome to be able to click on the logo to toggle the animation on and off

@azz

azz commented Jan 11, 2018

Copy link
Copy Markdown
Member Author

@vjeux Done 😄

@orta

orta commented Jan 11, 2018 •

Copy link
Copy Markdown
Contributor

https://ortastuff.s3.amazonaws.com/prettier/prettier-hp.zip should be all the assets

I'd love (ideally before shipping) to get the logo to be closer to the center based design, the current version was built to be left aligned which is why it fits oddly

screen shot 2018-01-11 at 1 10 30 pm

I realize it's a bunch of faffing, but only gotta get it right once at this point :)

SVG is here

@orta

orta commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

I assume there's a docosaurus setting for the footer colour, any chance you can make that the same as the header?

@orta

orta commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

Font wise: I used AppleSDGothicNeo which I thought was a default for the macOS

e.g.

/* # What is prettier?: */
font-family: AppleSDGothicNeo-Bold;
font-size: 32px;
color: #FABE3F;
letter-spacing: 0;

But now that I think about it, I imagine probably can look like:

body {
  font-family: "Apple SD Gothic Neo", "AppleSDGothicNeo"  -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}

I'm not too sure of a similar feeling windows font yet, looking

})
)
);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why not use JSX here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For some reason docusaurus wasn't preprocessing jsx on it. Forgot to raise a bug.

@j-f1

j-f1 commented Jan 11, 2018

Copy link
Copy Markdown
Member

Font wise: I used AppleSDGothicNeo which I thought was a default for the macOS

Were you looking for the UI font or just a built-in font?

@orta

orta commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

Were you looking for the UI font or just a built-in font?

Initially I wanted the font currently used in the docs

which is..
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;

But after looking through the default fonts, I felt like AppleSDGothicNeo was a great option for kinda-code-y but not fixed-width and it comes with all mac/iOS' for the last few years. So I ended up using it everywhere aside from code.

@sandhose

Copy link
Copy Markdown
Contributor

Great job!

IMHO it would be better if the CSS file was generated from the JSON file, especially if we need to tweak the dashes as @orta suggested.

Also, I might try to change the transitions into CSS animations, so the animation would play even if there's no JS (or the JS isn't loaded).

As for what @vjeux suggested, maybe we could have a constant animation where all the lines "roll" all the way every X seconds. Btw this could be also done without any client-side JS. I don't have the time right now to do a quick PoC to demonstrate what I mean, but will definitely try something tomorrow :)

Comment thread website/pages/en/index.js Outdated
}
})}
</MarkdownBlock>
</li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd be really curious to know how many people use prettier as a pre-commit hook and how many instead use ESLint to run prettier. Personally I'm using ESLint because we were already using it and it was already integrated with our code review and CI system. Given the questions we get it seems I'm far from alone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This one I'll leave you to all you core devs to figure out, I opted for lint-staged as it's the one I've used everywhere and works in all environments

However, it's totally possible to play with this section to also let it support many options too

e.g. (60s mockup)

screen shot 2018-01-11 at 4 04 16 pm

@azz

azz commented Jan 12, 2018

Copy link
Copy Markdown
Member Author

@sandhose

IMHO it would be better if the CSS file was generated from the JSON file, especially if we need to tweak the dashes as @orta suggested.

Yeah, it's unfortunate we don't have any CSS preprocessing for the website. We'd have to have it as a pre-build step.

Also, I might try to change the transitions into CSS animations, so the animation would play even if there's no JS (or the JS isn't loaded).

That would be cool, but I really like the way you can play around by clicking it! Can we have it both ways?

* Use the static logo for the moment

* Fix the broken JS, from going static, and make overscroll the right color
Comment thread website/static/landing.js
var logoWrapper = document.querySelector(".animatedLogoWrapper");
// We don't have access to a unique body css attribute for just the homepage
// so instead it is set on load. It's only really visible on a vertical overscroll
document.body.style.backgroundColor = "rgb(24, 32, 37)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can’t you use body { ... } in the CSS to do this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The CSS is injected into every page I think, so I couldn't add it inside with the rest of the CSS - I guess a style could be inlined inside the HTML though?

Comment thread website/static/overrides.css Outdated
.getStartedSection ol li {
margin: 0 0 22px 0 !important;
min-height: 110px;
padding-left: 46;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should be 46px. Doesn't render well on windows Firefox otherwise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks.

@vjeux

vjeux commented Jan 24, 2018

Copy link
Copy Markdown
Contributor

This is looking awesome, I can't wait for it to ship <3

@sandhose

Copy link
Copy Markdown
Contributor

I just published the animated logo on npm and opened a pull request on @azz repo to use it on the landing page. It now uses CSS animations instead of transitions, which means it works without JS, and the animation doesn't have to wait the whole page to load before firing.

@azz

azz commented Jan 27, 2018

Copy link
Copy Markdown
Member Author

I originally set it to start animating on page load because otherwise it was really janky (heaps of dropped frames), does this fix the issue?

@orta

orta commented Jan 31, 2018

Copy link
Copy Markdown
Contributor

Any blockers I can help on?

@orta

orta commented Feb 4, 2018

Copy link
Copy Markdown
Contributor

Given @lipis' work in many other PRs we should try get this merged to master as-is, we've been blocked for 2 weeks on npm faffing which isn't really that important. The only difference is in the cool animating logo. I've sent a PR updating this to master ( azz#5 ) which should get the ball rolling again.

Comment thread website/pages/en/index.js
<img src="/images/github_grey.svg" style={{ height: "100px" }} />
</a>
<div style={{ marginLeft: ".7em", width: "260px" }}>
<p>More than 50,000 dependent repositories on GitHub</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

60,000 :)

@azz

azz commented Feb 5, 2018

Copy link
Copy Markdown
Member Author

Ok should be good to merge. Any last words?

@azz
azz merged commit 047363a into prettier:master Feb 6, 2018
@lipis

lipis commented Feb 6, 2018

Copy link
Copy Markdown
Member

Boom! 🎆

@azz

azz commented Feb 6, 2018

Copy link
Copy Markdown
Member Author

@lipis Feel free to PR the 60,000 you mentioned above.

@montogeek

Copy link
Copy Markdown
Contributor

I dont see the animation on Chrome Version 64.0.3282.140 (Official Build) beta (64-bit), neither latest Safari.

@lipis

lipis commented Feb 6, 2018

Copy link
Copy Markdown
Member

@azz @orta Great job guys!

@j-f1

j-f1 commented Feb 6, 2018

Copy link
Copy Markdown
Member

@montogeek We don’t quite have that ready to go yet. Hopefully, we’ll have it soon!

lipis added a commit that referenced this pull request Feb 6, 2018
* 'master' of github.com:prettier/prettier:
  60,000+ dependencies (#3901)
  Revamp landing page (#3718)
  Remove commented out code (#3886)
  feat: Add support for no-response-bot (#3873)
  refactor(printer-postcss): use `node` name and implement helper functions (#3893)
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.