boostorg / website-v2

New Boost website
https://boost.io
Boost Software License 1.0
9 stars 12 forks source link

Formatting in Release notes is inconsistent #932

Closed Lastique closed 2 months ago

Lastique commented 7 months ago

https://www.preview.boost.org/releases/

In the "Updated default target Windows version" notice, the list of affected libraries is rendered with an unexpectedly large font:

Screenshot_20240212_235926

In the "New Libraries" section, the library descriptions also use a larger than expected font. The descriptions are placed on the same line as the library name rather than below it:

Screenshot_20240213_000110

For comparison, here is the same content from the current website:

Screenshot_20240213_000422

vinniefalco commented 6 months ago

The stylesheets for asciidoc and qbk rendering need a complete overhaul, they look terrible. I would like to make it look like the old docs or at least close to it (if not better).

d-spencer-strickland commented 6 months ago

The HTML there for that list is coming out as:

<ul>
  <h4>Boost.Atomic</h4>
  <h4>Boost.Beast </h4>
  <!-- .... -->
</ul>

If this is NOT something that is controlled at the source, please let me know. Otherwise, those should be changed to proper list items <li></li>.

This is the case on both lists mentioned.

Lastique commented 6 months ago

The HTML there for that list is coming out as:

<ul>
  <h4>Boost.Atomic</h4>
  <h4>Boost.Beast </h4>
  <!-- .... -->
</ul>

If this is NOT something that is controlled at the source, please let me know. Otherwise, those should be changed to proper list items <li></li>.

This is the case on both lists mentioned.

The Release notes on the current website properly use li tags in the "Updated default target Windows version" section. Same with the lists in "New Libraries" and "Updated Libraries" sections.

Note that the Release notes originate as a QuickBook document, and should presumably produce the same html output on every build. I'm assuming you are post-processing the output somehow.

julioest commented 4 months ago

@kennethreitz Can we leverage BeautifulSoup to find these non-semantic unordered lists with h4 children?

kennethreitz commented 4 months ago

Yes thats's super easy!! Would you like me to do it, or do you want me to show you how to

julioest commented 4 months ago

That's great news, I'd love to try to tackle this one

julioest commented 3 months ago

Discussed with Kenneth; reassigning to him

joaquintides commented 3 months ago

Issue #1083 is largely covered by this issue, leaving the backlink here so that we don't forget to check once this is fixed.

julioest commented 3 months ago

Update: This issue is difficult due to the similar elements on the page. A CSS-only solution is not feasible as previously thought. I’m making progress using a combination of JS and CSS, but it is taking time.

grafikrobot commented 3 months ago

@julioest I don't see how it's difficult or not feasible to solve with just CSS. Sure, you might need to get the release notes converter to add more class or id tags. But it also seems possible to me with the context created from the <section id="libraryReadMe">....

Lastique commented 3 months ago

I think, the first and foremost problem to solve is to find where the difference in HTML that was discovered above comes from and fix it. Or was it fixed already?

After HTML is correct, we can think about styling fixes.

julioest commented 3 months ago

@grafikrobot It’s been difficult to solve this through CSS only without class or ID attributes. Even with the #libraryReadme context, the release notes HTML structure changes a bit (see attached). Initially, I had the same thought regarding the converter, but I’m not having any luck seeing changes, working in the htmlhelper.py file.

Image

@Lastique The HTML is not fixed, I'm working with the current structure. I was able to find the <h4>s convert them to <li>s with JS - which fixes our indent issue. However, the "New Libraries" is trickier because of how different the markup it is (see attached).

Image

@kennethreitz Can we pair up on this again? I believe if we tweaked attributes in the converter, it'll give me more precision and be able to fix this with CSS.

Lastique commented 3 months ago

The HTML is not fixed, I'm working with the current structure.

This seems like a futile work as your styling will break again when HTML is fixed. And it does need to be fixed anyway.

grafikrobot commented 3 months ago

Could someone point me to the code that does the conversion from the old quickbook (html?) to this html?

vinniefalco commented 3 months ago

This is a pain in the ass

kennethreitz commented 3 months ago

https://github.com/boostorg/website-v2/blob/abefe4d23466c6b970755e36b92ec6da39e1fd5f/core/htmlhelper.py#L414

julioest commented 3 months ago

Here's the current status of this issue (and #1083), I'm testing some more to ensure consistency. But it's almost there

Image

kennethreitz commented 3 months ago

Lookin' good!

julioest commented 2 months ago

This can be closed @joaquintides

joaquintides commented 2 months ago

Thanks for the heads up, I had it set to "Done" on our project page, but that didn't automatically close the issue.