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

Multiple authors on a single post gatsbyjs.org/blog #3199

Closed
rdela opened this issue Dec 13, 2017 · 35 comments
Closed

Multiple authors on a single post gatsbyjs.org/blog #3199

rdela opened this issue Dec 13, 2017 · 35 comments

Comments

@rdela
Copy link
Contributor

rdela commented Dec 13, 2017

@fk @KyleAMathews said maybe you had considered how to approach multiple authors in a single post for the blog? Looks like we would need to update /blog and single post layouts? Any ideas code or visual before I take a crack?

@rdela
Copy link
Contributor Author

rdela commented Dec 14, 2017

mocked up horizontal and vertical versions cc @shannonbux (used Sketch, went very well!)

list horiz 1440 x 800

list vert 1194 x 800

post horiz 1440 x 800

post vert 1440 x 800

@fk
Copy link
Contributor

fk commented Dec 14, 2017

Hi @rdela! 👋 About to 💤, but real quick: I had thought of sth like the (inspiring ;-)) Segment Blog does:

image

@KyleAMathews
Copy link
Contributor

Was just chatting with @calcsam about this and he suggested that for multi-author posts we shrink what we're showing and then on hover show the full bio (while still letting people click through of course).

@rdela
Copy link
Contributor Author

rdela commented Dec 14, 2017

Excellent ideas, thanks all. Will PR an first draft implementation along with new post using it soon.

@rdela
Copy link
Contributor Author

rdela commented Dec 16, 2017

Hello Gatsby hive mind 🐝🧠 paging @calcsam @fk @KyleAMathews
So implementation wise, we want a comma separated list of authors in same author field or md style list like tags in https://github.com/Vagr9K/gatsby-material-starter/blob/master/gatsby-node.js#L111 / https://raw.githubusercontent.com/Vagr9K/gatsby-material-starter/master/content/sample-posts/Introducing-Gatsby-Material-Starter/index.md

@rdela
Copy link
Contributor Author

rdela commented Dec 16, 2017

Gonna go with comma separated author: "Author One, Author Two" for backwards compatibility with existing posts unless someone else interjects very soon

@KyleAMathews
Copy link
Contributor

Comma separated will break the graphql queries. Should switch to array.

@rdela
Copy link
Contributor Author

rdela commented Dec 16, 2017

So we should pass like…

authors: 
    - "Author One"
    - "Author Two"

or do not need to worry about whitespace and can do…

authors: 
    - Author One
    - Author Two

Is this even what you meant?

@KyleAMathews
Copy link
Contributor

@rdela
Copy link
Contributor Author

rdela commented Dec 16, 2017

oh good that is much better

@rdela
Copy link
Contributor Author

rdela commented Dec 17, 2017

@rdela
Copy link
Contributor Author

rdela commented Dec 20, 2017

@KyleAMathews should I just cook up something to replicate with lodash join and last (for length 2 and 2+ post author arrays), or should we bring in utils/toCommaSeparatedList.js from reactjs.org? Other than this question I have POC working on my local branch and I am ready to commit that then add UI ideas from @fk @calcsam for discussion and review

@rdela
Copy link
Contributor Author

rdela commented Dec 20, 2017

@KyleAMathews
Copy link
Contributor

The algorithm should be pretty simple — just have two components, one for a single author and the other for a multi-author post. Then check the length of the author array and pass the author array to one or the other component.

Let's focus on the design first though — the code won't be a problem. How about you post your screenshots for review?

@rdela
Copy link
Contributor Author

rdela commented Dec 20, 2017

Thanks, direction about structure is super helpful. Have to have working code to post screenshots.

So far most of my changes are in

  • www/src/components/blog-post-preview-item.js
  • www/src/templates/template-blog-post.js

Will check length of the author array and hand off to the new components from template-blog-post.js then work on new designs

@KyleAMathews
Copy link
Contributor

Good point :-)

Just have two components — one for posts with one author and another for posts with multiple authors. Check the length of the authors array and pass it to one or the other.

@fk
Copy link
Contributor

fk commented Dec 20, 2017

Was just chatting with @calcsam about this and he suggested that for multi-author posts we shrink what we're showing and then on hover show the full bio (while still letting people click through of course).

@calcsam I've been wondering what we would shrink that info down to:

  • Truncating the bio via CSS is the easiest, but also could cause some unfortunate results.
  • We could also add a "title" field to our YAML data and use that for posts with multiple authors.

Another thing to decide on for multiple author posts is where we move the date (and reading time).
I mocked up s/th real quick that incorporates the title field, slightly reduces author avatar image size and just moves the date next to the article title:

image

One more thing that'd be cool to take a look at @rdela is making the link to the author's contributor page (e.g. https://www.gatsbyjs.org/contributors/josh-weaver/) a bit more obvious, but without getting to "loud".

For the index page I'd suggest sticking to something close to the segment.com layout as it's a solution that holds up for more than two authors without cluttering/defragmenting the layout too much (the latter being an issue eventually on individual post pages to IMO, too).

@rdela
Copy link
Contributor Author

rdela commented Dec 20, 2017

Thanks Kyle! that is slightly different from what I was about to do and seems easier 😎

Same for blog-post-preview-item.js for blog index I suppose, check array length then hand off to two more new components to do full expanded (current) single-author preview or multi-author compressed version?

What I have now is not compressed for multi-author single posts, and as Sam and Florian predicted 4 authors takes up tons of space. And would no matter how we arrange with flexbox, just like it did in my sketch mockups. Makes tons of sense to separate GraphQL queries using separate post components as Kyle suggests, as beyond smaller avatar sizes for multi-author I think we may want to reorder things in both post index and single post view as Florian suggests:

as it's a solution that holds up for more than two authors without cluttering/defragmenting the layout too much (the latter being an issue eventually on individual post pages to IMO, too).

…a la excellent Segment example from @fk screenshot above and reactjs.org blog. Probably ditch bios as well (text-overflow: ellipsis is fun but agree with Florian about edge cases) and just focus on making the contributor links more obvious in all cases once we get multi-author posts and post index looking reasonable.

Attempt to draw more attention to the fact the names are links to contributor pages, single author version.

screen-shot-2017-12-19-at-175313

Florian since you took the time to mock it up (thanks!) here is what simple refactor to split date/reading time out with zero design TLC looks like. Repeat, this is not final and does not want design notes Your version with date/reading time closer to title already looks better I think.

screen-shot-2017-12-19-at-162908

Single and multi-author logic all in template-blog-post.js (splitting this out now to do new compressed design version, will post screenshot here as soon as I am satisfied with it).

@KyleAMathews
Copy link
Contributor

Also worth looking at other well designed blogs e.g. Ghost & Medium — how they handle single vs multi-author posts.

@rdela
Copy link
Contributor Author

rdela commented Dec 20, 2017

Good call will do a quick survey before I do anything new

@rdela
Copy link
Contributor Author

rdela commented Dec 23, 2017

Survey results:

Think I like Airbnb Design approach best.

Example:
Designing for Access – Creating new features for guests with disabilities.
https://airbnb.design/designing-for-access/

Comma-separated length-conscious list of authors at the top of the post, avatars and bios below the post. Even more reason for separate single/multi-author post components, good call @KyleAMathews

Other examples:

Segment Blog
Allocation Efficiency in High-Performance Go Services
https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/

Avatars grouped left and list of authors before post.

Facebook Engineering Blog
ONNX V1 released
https://code.facebook.com/posts/172769176791141/onnx-v1-released/

Avatar and author name as individual inline-table cells grouped left.

So remaining questions, supposing eveyone agrees with me are:

@rdela
Copy link
Contributor Author

rdela commented Jan 2, 2018

@KyleAMathews You cool with me implementing Airbnb Design approach for review?

@KyleAMathews
Copy link
Contributor

Yeah, let's try Airbnb's design but with the avatars still like Segment (and like our blog post preview component https://www.gatsbyjs.org/blog/)

@fk
Copy link
Contributor

fk commented Jan 4, 2018

Had my 5 cents sitting around in a tab for a while but didn't manage to post – sorry 🙄:

Airbnb Design approach […] avatars and bios below the post

+1 for bio below the post for multiple authors. I remember chatting about this with @KyleAMathews a while ago and as I remember he disliked moving that information down so far; however I think this is a good solution for multiple authors as it saves us a few UI headaches and adding another field to the author meta to work around potential truncation issues.

Do anyone have other ideas to draw attention to these links?

Yeah those are a bit tricky. Not sure if we maybe should try underlines? Those would help on the index page, too; but I think for a first shot just adding color/matching the index page is 👍:

image

Paging @shannonbux – did you get any feedback regarding contributor pages being hard to find yet? :-D

Another thing: I forgot linking the author avatar pics. Would be cool @rdela if you could get that in along this, too! 🙏

@shannonbux
Copy link
Contributor

shannonbux commented Jan 4, 2018 via email

@fk
Copy link
Contributor

fk commented Jan 29, 2018

(Still catching up apparently :-/) …
@shannonbux Yes, that's a contributor page … and your answer is 💯 worst case scenario.
Let's fix this!

@rdela You got a PR going for this already?

@rdela
Copy link
Contributor Author

rdela commented Jan 29, 2018

@fk I have a local branch with the multi-author post added, let me catch up to master and I will open the PR. Beyond linking avatar pics the idea is to add color to contributor page links, but not increase font-weight, in both the post and index views?
Maybe the underline or background-color appears on hover?

@fk
Copy link
Contributor

fk commented Jan 30, 2018

@rdela 👍 🙏

As for the links: I'm personally leaning towards always showing the underline at the moment, that should be as clear as it can get – IMO – but I probably should not have the final word on this. 😉

I also thought about adding some kind of icon, but I think an avatar icon + an arrow pointing up-right might be mistaken as a link to the author's website (external). Another thing would be to add some more copy – "Contributor page", "All articles", "Info", "More Info" … meh. Maybe adding that info below the article is another thing to think about.

Then again, looking at a random article on medium.com … we might overthink this … but I guess on Medium the audience's expectations are a little different.

@rdela
Copy link
Contributor Author

rdela commented Jan 30, 2018

@fk I have avatars all linking to contrib. pages. Glad you linked to Medium, I was wondering where the Author above title style came from. This is the only example of this I can find, our other inspirations: Airbnb, Segment, and Facebook Engineering all go with the more expected and obvious (IMHO) title up top. Matches blog post preview component as well. In this mock with a couple options I have swapped them.

blog-post-links

Happy to revert if people are attached to avatar up top post design.

Also may make sense to break PR into 2 phases? Style updates in first one then multi-author in second? Cc @KyleAMathews

@shannonbux
Copy link
Contributor

shannonbux commented Jan 30, 2018 via email

@rdela
Copy link
Contributor Author

rdela commented Jan 30, 2018

@shannonbux I will try to save you the scroll-back!

as far as the multi-author view

Kyle:

have two components, one for a single author and the other for a multi-author post. Then check the length of the author array and pass the author array to one or the other component.

…assuming same approach for blog index / blog-post-preview-item.js

We would add:
www/src/components/blog-post-preview-item-multi.js
and
/www/src/templates/template-blog-post-multi.js

Kyle:

try Airbnb's design but with the avatars still like Segment (and like our blog post preview component https://www.gatsbyjs.org/blog/)

Segment example

Whether or not we decide to lift the title above author avatar/bio/timeToRead/date in post view or not, idea for new multi-author post template and index preview multi-author component is to group avatars to the left and then list authors to the right of avatars. Then, at bottom of multi-author post have avatars again with name + bio a la Airbnb Design example.

@fk
Copy link
Contributor

fk commented Jan 30, 2018

@rdela Thank you for the mockups! 🤗

My initial reaction was 👍 to #2 from #3199 (comment). Gave it 5 minutes to simmer and it holds up.

@shannonbux
Copy link
Contributor

shannonbux commented Jan 30, 2018 via email

@rdela
Copy link
Contributor Author

rdela commented Mar 4, 2018

Phase 1 PR is up and looks OK to me! #4354

Edit 2: this may get down split further

Edit 3: Updated June 8 Phase 1 PR: #5813

m-allanson pushed a commit that referenced this issue Jun 27, 2018
…ws (#5813)

* Increase author link visibility and link avatars in blog posts + previews

Increase author link visibility and link avatar
- `www/src/components/blog-post-preview-item.js`
- `www/src/templates/template-blog-post.js`

Ref #3199 #4354 #5396

Confirmed addition of
`transform: translateZ(0)`
in  blog-post-preview-item.js prevents image twitch in Chrome
when hovering the card, way to go @fk

* lose font-size increase and bold

* lose font-size increase and bold for post too

* move keys that require !important to the && selector

...which glamor offers to increase specifity
(ref. https://github.com/threepointone/glamor/blob/master/docs/selectors.md)
via @fk review
`src/components/blog-post-preview-item.js`

* remove !important from blog preview and post layout
@KyleAMathews
Copy link
Contributor

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

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

No branches or pull requests

5 participants