-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Adds contributors to docs #6900
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
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 is cool 😄 Left a couple comments on the implementation in the code, but overall I think it's nice 👏🏼
Now, on your discussion points:
-
I think the design is fine. It feels a bit wonky in that if you have a job title, then that pushes your username up etc., but it's not a big deal. If you want some design input, how about talking to Fredrik?
-
Hard coding the Unleash members. I .. don't love it, but I think it's fine if we think that it's good for visibility. I guess we could fetch that data from github somehow too, but not sure it's worth the complexity. I'm not convinced we should do titles, though. How about just showing a small Unleash logo next to Unleash members or something? Not a show stopper, but just an idea. However, if you do go ahead: those titles aren't correct, and I don't think we should use titles that aren't.
More importantly: the SDK overview doesn't work anymore: https://unleash-docs-git-alvin-docs-contributors-unleash-team.vercel.app/reference/sdks, so I think there's some cases you're not catching in the code 👀
}, []); | ||
|
||
if (!contributors.length) { | ||
return <h3>Fetching contributors...</h3>; |
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.
Instead of change the header, could we have the header "Contributors" regardless, and instead using this as content? Feels like this should have a p
tag instead of a header tag.
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.
The problem is then I have to nest everything else in an if. I'm not sure it justifies the UX benefits
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.
Huh? Not sure I understand what you mean here. You could just do this instead, right?
<div className={styles.contributors}>
<h3>Contributors</h3>
<p>Fetching contributors ...</p>
</div>
That feels more semantically correct to me. Changing headers dynamically seems a bit strange to me due to landmark navigation.
I suspect that using just the avatars will be enough. It's also consistent with how we (and many other people) do it on github, for instance |
Oh, and we should also find a way to deal with SDK pages (such as https://unleash-docs-git-alvin-docs-contributors-unleash-team.vercel.app/reference/sdks/flutter). They currently only show the header and never find the right data: This is because these docs aren't hosted in the Unleash repo itself, but on the various SDKs/Edge/Proxy repos. These docs are essentially just the readme for those repos. However, the edit page link still works and takes you to the right repo. You can find more information about this in the const { sdks } = require('./remote-content/sdks');
const { docs: edgeAndProxy } = require('./remote-content/edge-proxy'); Those files contain all the SDK links, where they get sourced from, etc. |
Hah, you reviewed before I could comment, so to address the initial points:
Re: the SDKs, I should be able to retrieve the contributors for these too, I just need to tweak the code a bit. |
I think the easiest path forward is to only display avatars and to display more information on hover/focus. The key to keep it looking good and consistent is to make sure everything has the same size, so when we include user input this quickly gets hard to manage because titles and names will differ in size leading to the perceived disorganized layout. This is similar to how for example github does it: |
What about adding a logo for Unleash team members? Kinda like a verified tag? |
I like that, yeah. Had the same idea 🙋🏼 |
Sounds good! I like it. |
24.April.2024.-.Brave-Browser---SDK-overview--Unleash---24-April-2024.mp4Here's what it looks like now with icons and more info on hover |
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.
Nice, yeah, that looks pretty cool!
A few things we could fix (though not urgent, so happy to have that done in a follow-up:
-
The keyboard focus. The outline looks misaligned (I'm guessing that's because you set border radius on the image rather than the link) and there's no effect when you focus it (though whether we want it to pop up on keyboard focus or not is a decision to make).
-
It's subtle, but the focus outline doesn't match the shape of the avatar when it zooms in. Notice the white edge on the lower right area of this avatar:
I think I've addressed everything, but to come back:
|
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.
👍 lgtm
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.
Nice, yeah! I'm happy for this to go in now, but I think there's a few things we should update (but please, make it another PR, so we can get this in):
- I'm still not convinced we should have titles for Unleash people, especially not when they're not correct titles. I'd just go with "Unleash employee" or something (maybe grab a special one for Ivar who can never not be the founder 💁🏼 )
- The keyboard focus styles are still weird. I'd be happy to look into this after you've merged if you want? It also acts differently for Unleash people than it does for outside contributors:
Dynamically updating a header still feels iffy to me. Feels like it'll be bad for accessibility in terms of navigation etc, but I can't point to anything specific, so I might just be overly worried. I also think it'd make more sense to update the content than the header, but .. eh, it's not the end of the world.
console.log(commits); | ||
const contributors = getContributors(commits); | ||
console.log(contributors); |
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.
Oh, we probably wanna remove these logs, though:
console.log(commits); | |
const contributors = getContributors(commits); | |
console.log(contributors); | |
const contributors = getContributors(commits); |
Thanks again, so
|
Hello!
We wanted to make the docs less impersonal, so we decided to add contributors. Now each doc page that has an
editUrl
(i.e, isn't generated) shows a list of everyone that contributed to it.This list is generated by:
swizzle
on theDocItem/Footer
in Docusaurus.Here's the command I ran, for posterity
npm run swizzle @docusaurus/theme-classic DocItem/Footer -- --wrap
Discussion points