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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

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.
Copy link

vercel bot commented May 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview May 8, 2024 2:45am

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
src/components/tutorial/FeedbackButton.astro Show resolved Hide resolved
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 <85648028+dreyfus92@users.noreply.github.com>
Remove un-used component import.

Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
@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.

SatanshuMishra and others added 3 commits May 7, 2024 18:51
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
- Changed References to FooterLinks
- Changed color consistency for Footer and FeedbackButton.
style="display: flex; flex-direction: row; align-items: center; text-decoration: none;"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853ZM18.827 6.1701C17.3279 4.66794 14.9076 4.60701 13.337 6.01687L12.0019 7.21524L10.6661 6.01781C9.09098 4.60597 6.67506 4.66808 5.17157 6.17157C3.68183 7.66131 3.60704 10.0473 4.97993 11.6232L11.9999 18.6543L19.0201 11.6232C20.3935 10.0467 20.319 7.66525 18.827 6.1701Z"></path></svg>
Community

Choose a reason for hiding this comment

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

Question: Should this not be translated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @adaliszk! This PR simply aims to transfer the existing content into the new structure. The Community link is a new addition and doesn't have a translation. I'm not 100% sure but a separate PR will probably need to be submitted if this PR (with the basic structure) is approved.

style="display: flex; flex-direction: row; align-items: center; text-decoration: none;"
>
<Icon name="open-book" size="1.2em" />
Contribute

Choose a reason for hiding this comment

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

Question: Should this not be translated?

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 can review this. Perhaps I missed the translation for this.

{labels['page.editLink']}
</a>
<a href="https://contribute.docs.astro.build/guides/i18n/" class="sl-flex" style="padding-left: 10px;">
<Icon name="translate" size="1.2em" /> Translate

Choose a reason for hiding this comment

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

Question: Should this not be translated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as before. I can review this. Perhaps I missed the translation for this.

<Icon name="pencil" size="1.2em" />
{labels['page.editLink']}
</a>
<div class="sl-flex">

Choose a reason for hiding this comment

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

Nitpick: For small screens, this probably should contain a row alignment so that the translated texts do not wrap.

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

{labels['page.editLink']}
</a>
<a href="https://contribute.docs.astro.build/guides/i18n/" class="sl-flex" style="padding-left: 10px;">
<Icon name="translate" size="1.2em" /> Translate
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<Icon name="translate" size="1.2em" /> Translate
<Icon name="translate" size="1.2em" /> {t('rightSidebar.translatePage')}

style="display: flex; flex-direction: row; align-items: center; text-decoration: none;"
>
<Icon name="open-book" size="1.2em" />
Contribute
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Contribute
{t('rightSidebar.contribute')}

style="display: flex; flex-direction: row; align-items: center; text-decoration: none;"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853ZM18.827 6.1701C17.3279 4.66794 14.9076 4.60701 13.337 6.01687L12.0019 7.21524L10.6661 6.01781C9.09098 4.60597 6.67506 4.66808 5.17157 6.17157C3.68183 7.66131 3.60704 10.0473 4.97993 11.6232L11.9999 18.6543L19.0201 11.6232C20.3935 10.0467 20.319 7.66525 18.827 6.1701Z"></path></svg>
Community
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Community
{t('rightSidebar.community')}

@adaliszk
Copy link

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.

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
5 participants