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

Update footer and navbar to match PennyLane website #40

Merged
merged 23 commits into from
Sep 22, 2023

Conversation

Mandrenkov
Copy link
Collaborator

@Mandrenkov Mandrenkov commented Sep 20, 2023

Context:

The PennyLane website is updating the styling of its footer and navbar. Since the PennyLane Sphinx Theme inherits the structure and style of the Xanadu Sphinx Theme, the updated layout, configuration, etc. are also reflected here.

Description of the Change:

Updated the footer and navbar configuration and styles to match the new PennyLane website. The changes to the theme configuration are documented in the diff of the README.rst.

Navbar

Navbar

Footer

Footer

Mobile Navbar

Mobile Navbar Expanded Mobile Navbar ToC Expanded

Mobile Footer

Mobile Footer

Benefits:

  • The navbar and footer on the PennyLane Docs pages will be consistent with the main PennyLane website.

Possible Drawbacks:

  • Xanadu OSS projects which do not fall under the PennyLane umbrella will adopt the appearance of the footer and navbar on the PennyLane website if they update their dependency on the Xanadu Sphinx Theme.
  • Some accessibility features were compromised in the adoption of the new footer and navbar styles. These will be reinstated (and improved!) in a future patch release.

Related GitHub Issues:

None.


Preview: https://xanadu-sphinx-theme--40.org.readthedocs.build/en/40/

.github/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link

@Lorraine-at-Xanadu Lorraine-at-Xanadu left a comment

Choose a reason for hiding this comment

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

Hey @Mandrenkov! You've done an incredible job matching the navbar in Sphinx.

  1. Learn > Glossary: Link is broken and should go to https://pennylane.ai/qml/glossary
  2. When I hover on 'Learn' (for example) and then hover on 'Documentation' there's a delay when the 'Learn' menu closes causing overlap.

image

Copy link
Contributor

@LucasSilbernagel LucasSilbernagel left a comment

Choose a reason for hiding this comment

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

The accessibility issues are really painful, but other than that this looks good 😐😅

@Mandrenkov
Copy link
Collaborator Author

Thanks for the review, @Lorraine-at-Xanadu!

  1. Learn > Glossary: Link is broken and should go to https://pennylane.ai/qml/glossary

I assume this is meant for the PennyLane Sphinx Theme PR: PennyLaneAI/pennylane-sphinx-theme#29.

  1. When I hover on 'Learn' (for example) and then hover on 'Documentation' there's a delay when the 'Learn' menu closes causing overlap.

I've updated the navbar so that the dropdown menus instantly close when a user stops hovering over it.

@Mandrenkov
Copy link
Collaborator Author

Thanks for the review, @LucasSilbernagel!

The accessibility issues are really painful

I agree the accessibility of the new navbar and footer leave much to be desired. We'll tackle it soon!

@LucasSilbernagel
Copy link
Contributor

I've updated the navbar so that the dropdown menus instantly close when a user stops hovering over it.

@Mandrenkov @Lorraine-at-Xanadu this is really annoying for users with accessibility requirements and defeats the purpose of the accessible example we followed ☹️

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

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

I didn't review the code, but reviewed the PR preview. Looks and works great @Mandrenkov, super impressed how much you got it to match!

@Mandrenkov
Copy link
Collaborator Author

@LucasSilbernagel, after a discussion with @Anakhom and @AndrewGardhouse offline, we decided to reinstate the one-second delay but ensure that only one dropdown from the navbar is displayed at any given time.

@Mandrenkov Mandrenkov merged commit 3feaae8 into master Sep 22, 2023
2 checks passed
@Mandrenkov Mandrenkov deleted the sc-44264-sc-44265-pennylane-refresh branch September 22, 2023 14:18
Mandrenkov added a commit to PennyLaneAI/pennylane-sphinx-theme that referenced this pull request Sep 22, 2023
**Context:**

The PennyLane website is updating the styling of its footer and navbar.
For a consistent experience, it makes sense to also update the layout,
styling, etc. of the PennyLane Docs pages to match the main website.

**Description of the Change:**

Updated the inherited Xanadu Sphinx Theme (XST) version to v0.4.0 as
well as the default navbar and footer options. The technical details of
these changes (e.g., CSS modifications) are captured in a [different PR
to the XST
repository](XanaduAI/xanadu-sphinx-theme#40).

<details><summary>Desktop Navbar</summary>
<p>

<img width="948" alt="Desktop Navbar"
src="https://github.com/PennyLaneAI/pennylane-sphinx-theme/assets/5883774/79eafb91-7e03-4470-80f7-f069de5de20e">

</p>
</details> 


<details><summary>Desktop Footer</summary>
<p>

<img width="948" alt="Desktop Footer"
src="https://github.com/PennyLaneAI/pennylane-sphinx-theme/assets/5883774/0317edae-1983-4d01-a66b-834c1c614ab5">


</p>
</details> 

<details><summary>Mobile Navbar</summary>
<p>

<img width="417" alt="Mobile Navbar Expanded"
src="https://github.com/PennyLaneAI/pennylane-sphinx-theme/assets/5883774/0cf8d084-ccdb-45e1-a8a7-53f481c94e9c">

<img width="420" alt="Mobile Navbar ToC Expanded"
src="https://github.com/PennyLaneAI/pennylane-sphinx-theme/assets/5883774/1a3de49f-7f21-4378-baca-bd3fe51235ac">

</p>
</details> 

<details><summary>Mobile Footer</summary>
<p>

<img width="419" alt="Mobile Footer"
src="https://github.com/PennyLaneAI/pennylane-sphinx-theme/assets/5883774/c1cfc266-53d6-4901-b5d0-c440ce6d7467">


</p>
</details> 


**Benefits:**

* The navbar and footer on the PennyLane Docs pages will be consistent
with the main PennyLane website.

**Possible Drawbacks:**

* Some accessibility features were compromised in the XST v0.4.0
release; however, these will be addressed in a future patch release.

**Related GitHub Issues:**

None.

--- 

**Preview:**
https://xanaduai-pennylane--29.com.readthedocs.build/projects/sphinx-theme/en/29/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants