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

feat: extend badge to be available for group links #995

Merged
merged 17 commits into from
Nov 1, 2023

Conversation

kevinzunigacuellar
Copy link
Member

@kevinzunigacuellar kevinzunigacuellar commented Oct 26, 2023

What kind of changes does this PR include?

  • Changes to Starlight code

Description

  • Extend badges to be available for group links.

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2023

🦋 Changeset detected

Latest commit: 856e430

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Oct 26, 2023

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 856e430
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/6542c4ac31cff90007bbb021
😎 Deploy Preview https://deploy-preview-995--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (🔴 down 8 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels Oct 26, 2023
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Oct 26, 2023

size-limit report 📦

Path Size
/index.html 5.13 KB (0%)
/_astro/*.js 19.27 KB (0%)
/_astro/*.css 9.7 KB (+0.14% 🔺)

Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

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

More badges 🎉 Amazing.

I left a few questions mostly regarding the documentation and I have some visual feedback as well.

I am not sure if this is expected or part of the initial design, but I think the gap between a label and a badge is different for a link and a group. I am not saying they should be the same, but I personally think the gap is too small for a group at least.

SCR-20231027-kcwl

I think there may be some wrapping behavior that is not handled yet compared to links:

SCR-20231027-kdpx

Last point, maybe we should also update a few tests to ensure in a snapshot we get badges for groups too?

Impatient to see this merged and add more badges to my documentations ^^

docs/src/content/docs/guides/sidebar.mdx Outdated Show resolved Hide resolved
docs/src/content/docs/guides/sidebar.mdx Outdated Show resolved Hide resolved
@kevinzunigacuellar
Copy link
Member Author

kevinzunigacuellar commented Oct 27, 2023

One last thing that I would like to get some input. I noticed that the spacing for multi line groups could get a bit wide. This gets more noticeable with a badge. Should we decrease the line height for groups? or does this looks good?

image

@HiDeoo
Copy link
Member

HiDeoo commented Oct 28, 2023

One last thing that I would like to get some input. I noticed that the spacing for multi line groups could get a bit wide. This gets more noticeable with a badge. Should we decrease the line height for groups? or does this looks good?

Indeed, this is something I noticed in the past, and I'm pretty sure we talked about this somewhere else but I cannot find where. I am no designer but for what it's worth, I personally think it could be slightly decreased. Not sure what others think though.

@delucis
Copy link
Member

delucis commented Oct 31, 2023

Should we decrease the line height for groups?

Good catch. I think we did discuss and adjust this for individual link items, but didn’t for group headings.

Compare the spacing here for example:

Sidebar groups showing wider vertical spacing in a heading group wrapped across lines compared to a link item wrapped across lines

The trick is to work out how to reduce the line-height and then add back some vertical padding so that the overall spacing for lines that don’t wrap stays the same. #419 did this for link items.

@delucis delucis added the 🌟 minor Change that triggers a minor release label Oct 31, 2023
@kevinzunigacuellar
Copy link
Member Author

Thanks for the suggestions and the reference PR @delucis . I gave it a try, taking a tags in the list items as reference I increase its line-height a little bit from 1.4 to 1.5. Looks better than before. Feel free to edit.

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Yay! I think this is in pretty good shape — thanks @kevinzunigacuellar.

Few more small details, to clean this up.

docs/src/content/docs/guides/sidebar.mdx Outdated Show resolved Hide resolved
packages/starlight/components/SidebarSublist.astro Outdated Show resolved Hide resolved
packages/starlight/components/SidebarSublist.astro Outdated Show resolved Hide resolved
packages/starlight/components/SidebarSublist.astro Outdated Show resolved Hide resolved
packages/starlight/components/SidebarSublist.astro Outdated Show resolved Hide resolved
kevinzunigacuellar and others added 2 commits October 31, 2023 18:11
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Really great work on this one @kevinzunigacuellar. Left one last note to polish up the changeset, but then LGTM! 🌟

.changeset/orange-pants-tell.md Outdated Show resolved Hide resolved
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
@kevinzunigacuellar
Copy link
Member Author

Thanks for all the feedback @HiDeoo and @delucis!

@kevinzunigacuellar kevinzunigacuellar merged commit 5bf4457 into main Nov 1, 2023
9 checks passed
@kevinzunigacuellar kevinzunigacuellar deleted the badge-ext branch November 1, 2023 21:41
@astrobot-houston astrobot-houston mentioned this pull request Nov 1, 2023
@delucis
Copy link
Member

delucis commented Nov 1, 2023

Oops, I guess we better cut a release then :-D

Usually we wait before merging changes like this because they immediately update docs even before we release them. I totally did not make that clear with my “LGTM” comment though, sorry 😅

Let me take a look through the open PRs to see if there’s some other stuff we can get out with this.

vasfvitor added a commit to vasfvitor/astro-starlight that referenced this pull request Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes 🌟 minor Change that triggers a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants