Skip to content

[Feature Request] Allow re-ordering of socialLinks in MinimalFooter #968

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

Open
simurai opened this issue Apr 9, 2025 · 2 comments
Open
Labels

Comments

@simurai
Copy link
Contributor

simurai commented Apr 9, 2025

Problem

Currently when trying to customize the <MinimalFooter> by adding socialLinks, the order has no effect and seems predefined.

<MinimalFooter
    socialLinks={['linkedin', 'instagram', 'youtube', 'x', 'tiktok', 'twitch', 'github']}
>
Image

Suggestion

It would be nice if the order in the socialLinks array would honor the order how the icons appear. So that for example it could match the order of https://github.com/home

Image

This came up in https://github.com/github/githubuniverse.com/issues/2176 (internal)

@joshfarrant
Copy link
Contributor

This makes sense to me. The only question I'd have is what would happen if you didn't pass a particular link? Eg if you didn't pass TikTok — would it just be omitted?

That approach could cause problems if we were to add another social link in the future as it would then be omitted from any page which explicitly specifies the socialLinks prop.

In that case, we'd probably be better off appending any links which aren't explicitly listed in the socialLinks array to the end of list, so any new links will just be added to the end even if they're not explicitly listed.

@simurai
Copy link
Contributor Author

simurai commented Apr 9, 2025

@joshfarrant Eg if you didn't pass TikTok — would it just be omitted?

Yes. I think that's how it already works now. E.g. in the above example, Facebook is omitted and doesn't show up.

That approach could cause problems if we were to add another social link in the future as it would then be omitted from any page which explicitly specifies the socialLinks prop.

Hmm.. good point. 🤔 If this is a concern, we kinda need two props? Like..

  • socialLinksOrder Here you can set the order of the icons
  • socialLinksExcluded Here you can omit any icons you don't want to show up.

Then if an icon is not part of either prop, it will just be appended at the end.

But not sure.. if that complicates everything. The "what happens to future additions" might be low priority? And PM/designers will tell us if something is missing.

@rezrah rezrah added the brand label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants