Skip to content

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented May 12, 2025

Description

Latest release broke the navbar color.

image

Taking advantage of this PR and also do more stuff:

  • Centering navbar elements
  • Moving search field to sidebar on small devices
  • Moving Edit on GitHub link to the end of primary bar.
  • Removing secondary sidebar in all pages. The secondary sidebar provides a page map, which allows you to move quickly to page sections. Our doc pages are not specially very big. So I am removing that sidebar so the navigation is cleaner view is cleaner. Additionally in mobile view it allows me to remove the right side menu button.

Details

Navbar color

image

Centering navbar elements

Before

image

After

image

Moving search field to sidebar on small devices

Before

image image

After

image image

Removing secondary sidebar in all pages.

Before

image image

After

image image

Issue linked

Close #3914

Checklist

@germa89 germa89 requested a review from a team as a code owner May 12, 2025 09:34
@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

Copy link
Contributor

sourcery-ai bot commented May 12, 2025

Reviewer's Guide

This PR restores the navbar’s intended styling and layout by refining custom CSS rules to center elements and eliminate unwanted shadows, and by updating the Sphinx configuration to streamline sidebars and navbar items.

File-Level Changes

Change Details Files
Refined custom CSS to center navbar content and remove shadow styling
  • Added .bd-navbar-elements rule for center alignment
  • Added .bd-main .bd-content rule to center page content
  • Overrode .sd-shadow-sm to eliminate default navbar shadow
  • Removed redundant light/dark theme background and color overrides
doc/source/_static/custom.css
Updated Sphinx HTML theme configuration to simplify sidebars and navbar items
  • Introduced empty secondary_sidebar_items to disable secondary sidebars
  • Cleared navbar_persistent entries
  • Added primary_sidebar_end for edit/sourcelink controls
  • Configured navbar_end with search, version and theme switchers, and icon links
  • Removed old html_sidebars definition
doc/source/conf.py

Assessment against linked issues

Issue Objective Addressed Explanation

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@germa89 germa89 self-assigned this May 12, 2025
@github-actions github-actions bot added documentation Documentation related (improving, adding, etc) bug Issue, problem or error in PyMAPDL labels May 12, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @germa89 - I've reviewed your changes - here's some feedback:

  • In custom.css, the .sd-shadow-sm rule is missing a semicolon after the !important declaration—please add it to ensure proper parsing.
  • The old html_sidebars and commented sidebar settings in conf.py should be removed or consolidated with the new secondary_sidebar_items configuration to avoid confusion.
  • After removing the theme-specific CSS overrides, test both light and dark themes to confirm the navbar and other elements retain the intended styles consistently.
Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@germa89
Copy link
Collaborator Author

germa89 commented May 12, 2025

Related to: ansys/ansys-sphinx-theme#691

@germa89
Copy link
Collaborator Author

germa89 commented May 12, 2025

Asking sphinx/UI guys for a quick review @jorgepiloto @Revathyvenugopal162

@germa89
Copy link
Collaborator Author

germa89 commented May 12, 2025

Also related to: ansys/ansys-sphinx-theme#693

…ince it does not affect. Waiting for ansys-sphinx-theme release
@germa89 germa89 enabled auto-merge (squash) May 12, 2025 12:58
@germa89
Copy link
Collaborator Author

germa89 commented May 12, 2025

@pyansys-ci-bot LGTM.

Copy link
Contributor

@pyansys-ci-bot pyansys-ci-bot left a comment

Choose a reason for hiding this comment

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

✅ Approving this PR because germa89 said so in here 😬

LGTM

@germa89 germa89 merged commit c8d5655 into main May 12, 2025
82 of 83 checks passed
@germa89 germa89 deleted the fix/doc-looks branch May 12, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, problem or error in PyMAPDL documentation Documentation related (improving, adding, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation seems broken/off
3 participants