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

Sidebar Reorganization Implementation #8197

Merged
merged 22 commits into from
Jul 18, 2024
Merged

Conversation

SatanshuMishra
Copy link
Contributor

@SatanshuMishra SatanshuMishra commented May 7, 2024

Description (required)

This PR aims to implement the changes proposed in #6845. The changes made include:

  1. Contribute Section was removed from the RightSideBar.
  2. The Translate option was moved beside the Edit Page option at the bottom of the page above the Pagination.
  3. A new References component was created to hold the links to the Contribute, Give Feedback, and Community pages.
  4. A custom Footer component created to override the default Starlight Footer. The Pagination, EditLinks, & References components were added to this component (as before). The LastUpdated component was also added (commented out) for possible future development.
  5. Added custom icons for Give Feedback and Community options.

Related issues & labels (optional)

Preview of changed:
Current Implementation:
image

Proposed Changes:
image

Special thanks to @delucis for coming up with the design and guidance throughout this implementation.

Removed Contribute Section from RightSideBar and Added Translate Page beside Edit Page.
- Added dedicated footer component to override default footer generated by Starlight.
- Added Pagination, EditLink and References component to file. Added LastUpdated (commented) for possible future development.
- Removed Contribute section completely from TableOfContents.
- Updated FeedbackButton and Feedback Form to have accurate styling.
- Added Footer to astro.config.ts.

This comment was marked as outdated.

Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

Hey @SatanshuMishra, awesome job thanks for tackling this. I believe we can remove this unused import.

src/components/starlight/Footer.astro Outdated Show resolved Hide resolved
src/components/starlight/Footer.astro Outdated Show resolved Hide resolved
@delucis delucis added the site improvement Some thing that improves the website functionality - ask @delucis for help! label May 7, 2024
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.

Thank you for putting this together @SatanshuMishra! Really appreciate you picking it up. I’ve left some initial feedback.

There are probably also two details to discuss:

  • Are we happy with this also being added to the homepage? (My gut instinct is yes, it’s nice.)

    footer of docs homepage in preview deployment showing the added footer links to “Contribute”, “Give us feedback”, and “Community”
  • Whether we want any extra space between the pagination links and the new footer links. Curious what others think on this one.

src/components/tutorial/FeedbackButton.astro Outdated Show resolved Hide resolved
src/components/tutorial/FeedbackButton.astro Outdated Show resolved Hide resolved
src/components/tutorial/FeedbackButton.astro Outdated Show resolved Hide resolved
src/components/tutorial/FeedbackButton.astro Show resolved Hide resolved
@@ -368,6 +395,8 @@ const instanceId = Math.round(Math.random() * 10e9).toString(36);
height: 100%;
font-size: var(--sl-text-2xl);
cursor: pointer;
text-decoration: none;
color: white;
Copy link
Member

Choose a reason for hiding this comment

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

Same here for the colours — white text is not visible in light mode.

Comment on lines 409 to 418
text-decoration: none;
background-color: var(--sl-color-gray-5);
}

.select-buttons h2 {
font-size: var(--sl-text-h5);
font-weight: 600;
line-height: var(--sl-line-height-headings);
margin-bottom: 0.5rem;
text-decoration: none;
Copy link
Member

Choose a reason for hiding this comment

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

I’m not quite clear what the changes inside the feedback modal are doing? Comparing the preview and the live site, the live site’s styles seem correct, so I think we should aim to match them (which is maybe as simple as not changing anything?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I discovered that moving the FeedbackButton outside the RightSideBar made some scoped CSS in-accessible. This made the formatting for the title in correct. The above fixes this. It is the same style as before (take directly from inspect). I'm not sure if there is some other way to keep the formatting.

src/components/References.astro Outdated Show resolved Hide resolved
src/components/References.astro Outdated Show resolved Hide resolved
src/components/References.astro Outdated Show resolved Hide resolved
SatanshuMishra and others added 2 commits May 7, 2024 18:31
Remove un-used component mention.

Co-authored-by: Paul Valladares <[email protected]>
Remove un-used component import.

Co-authored-by: Paul Valladares <[email protected]>
@SatanshuMishra
Copy link
Contributor Author

SatanshuMishra commented May 8, 2024

Thank you for putting this together @SatanshuMishra! Really appreciate you picking it up. I’ve left some initial feedback.

There are probably also two details to discuss:

  • Are we happy with this also being added to the homepage? (My gut instinct is yes, it’s nice.)
    footer of docs homepage in preview deployment showing the added footer links to “Contribute”, “Give us feedback”, and “Community”
  • Whether we want any extra space between the pagination links and the new footer links. Curious what others think on this one.

I think this looks good too @delucis! Certainly nice to give people to learn about how to contribute, give us feedback or see the amazing community page we have.

- Changed References to FooterLinks
- Changed color consistency for Footer and FeedbackButton.
Copy link
Member

@TheOtterlord TheOtterlord left a comment

Choose a reason for hiding this comment

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

Here's the translation snippets for the untranslated strings

src/components/starlight/EditLink.astro Outdated Show resolved Hide resolved
src/components/FooterLinks.astro Outdated Show resolved Hide resolved
src/components/FooterLinks.astro Outdated Show resolved Hide resolved
@adaliszk
Copy link
Sponsor Contributor

Overall, it would look better if both the link lists were always aligned to the center, perhaps even with a top border to separate the footer from the rest of the content.
Another thing that might be worthwhile to do is on mobile screens. The links would be excellent if they were bigger and had full-width rows, so it's easy to tap on them.

Copy link
Member

@TheOtterlord TheOtterlord left a comment

Choose a reason for hiding this comment

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

At getting-started the bottom padding of the Discord button looks a little weird.

image

Changing the padding to only use the top might make it look better.

image

@SatanshuMishra
Copy link
Contributor Author

Here's the translation snippets for the untranslated strings

Hey @TheOtterlord! I'm not sure if translation suggestions should be submitted on this PR. They may need to be their own PRs since this PR focuses on generating the new structure. Feel free to correct me if I'm wrong through!

@TheOtterlord
Copy link
Member

The suggestions apply our existing translations from the old structure, so we're not introducing any new translations.

Copy link

netlify bot commented Jul 13, 2024

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 9fbda94
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/66985983893b060008579ca8
😎 Deploy Preview https://deploy-preview-8197--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

This looks great! I tested at a few different screen sizes, and love having everything always visible in the new footer.

Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

Awesome job peeps! LGTM 🫡

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.

Thanks for your patience on this one @SatanshuMishra! I spent a bit of time tidying up loose ends and should now be good to go. Thank you for contributing this! 🚀

@delucis delucis merged commit 27d67d7 into withastro:main Jul 18, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site improvement Some thing that improves the website functionality - ask @delucis for help!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sidebar reorganisation proposal
6 participants