executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
431 stars 197 forks source link

Long project names/titles no longer wrap in left navigation (version 0.4.0rc1) #681

Closed jonascj closed 1 year ago

jonascj commented 1 year ago

Describe the bug

context I was trying out sphinx-book-theme v. 0.4.0rc1 when I noticed that long project names/titles did no longer wrap in the left navigation panel.

Screenshot from 2023-02-15 13-18-46

expectation The long name/title should wrap like it did in v. 0.3.3

Screenshot from 2023-02-15 13-21-04

bug The difference (or bug) seem to be caused by the title-link no longer having the class text-wrap.

v0.4.0rc1

<a href="#" class="navbar-brand logo">
    <p class="title logo__title" style="/*! white-space: normal; */">Very Long and Complicated Project Name</p>
</a>

v0.3.3

<a href="#" class="navbar-brand logo text-wrap">
    <p class="title logo__title" style="/*! white-space: normal; */">Very Long and Complicated Project Name</p>
</a>

I am not sure if this is a problem with pydata-sphinx-theme, but I think not since the pydata-sphinx-theme has the project title in an element which is the full width of the page instead of a narrow left panel (https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html).

problem This is a problem for projects without logos or short names - like books.

This issue https://github.com/executablebooks/sphinx-book-theme/issues/624 is somewhat related, or at least adding the class text-wrap to the left navigation links would likely solve the issue.

Reproduce the bug

Build a project with a long title such as Very Long and Complicated Project Name and version 0.4.0rc1 of this theme. Notice how the title overflows the left navigation panel in the generated HTML-documentation (see the previous screenshot).

List your environment

I did not build with jupyter-book but with Sphinx (on Linux).

Sphinx version: 5.3.0 sphinx-book-theme version: 0.4.0rc1

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

choldgraf commented 1 year ago

good catch, will fix in #677