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

Add link to documentation directory in each release page #231

Merged
merged 2 commits into from
May 29, 2024

Conversation

aperezdc
Copy link
Member

@aperezdc aperezdc commented May 28, 2024

Add a button to the documentation directory under /reference for those releases that have it. A small JS data script adds a hasDocumentation computed data property to each page, which will be true in release pages for the wpewebkit package, from versions 2.23.90 onwards (inclusive). The version comparison is done reusing the semver package. Just in case there might be some release after that version that does not have documentation, the hideDocumentation data attribute is also honored.

While at it, fix the post date being close tight to the download and documentation buttons. Instead, promote the <time> element containing the date to a block, which causes it to occupy its own “line”. To avoid stealing much vertical space for the buttons, a new .btn-l CSS class is added, similar to .btn-xl, which produces smaller buttons.


Site preview: https://igalia.github.io/wpewebkit.org/aperezdc/release-doc-links/

@aperezdc aperezdc added the enhancement New feature or request label May 28, 2024
@aperezdc aperezdc self-assigned this May 28, 2024
@aperezdc
Copy link
Member Author

This is how the release pages look now:

pic

Copy link
Member

@csaavedra csaavedra left a comment

Choose a reason for hiding this comment

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

This looks good to me but I defer to @meyerweb for the style and UI changes.

Copy link
Member

@mariospr mariospr left a comment

Choose a reason for hiding this comment

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

LGTM too, but also would like to have @meyerweb take a look if possible for a final approval.

Add a button to the documentation directory under /reference for those
releases that have it. A small JS data script adds a "hasDocumentation"
computed data property to each page, which will be true in release pages
for the "wpewebkit" package, from versions 2.23.90 onwards (inclusive).
The version comparison is done reusing the "semver" package. Just in
case there might be some release after that version that does not have
documentation, the "hideDocumentation" data attribute is also honored.

While at it, fix the post date being close tight to the download and
documentation buttons. Instead, promote the <time> element containing
the date to a block, which causes it to occupy its own "line". To avoid
stealing much vertical space for the buttons, a new "btn-l" class is
added, similar to "btn-xl", which produces smaller buttons.
@aperezdc aperezdc force-pushed the aperezdc/release-doc-links branch from 91e80ca to daf5c59 Compare May 29, 2024 15:15
@meyerweb
Copy link
Member

On the GitHub site preview pages (e.g., https://igalia.github.io/wpewebkit.org/aperezdc/release-doc-links/release/wpewebkit-2.44.2.html), I’m only seeing the Download button. Is this an artifact of GH Pages builds, or was there a change since @aperezdc’s screenshot was posted?

@csaavedra
Copy link
Member

On the GitHub site preview pages (e.g., https://igalia.github.io/wpewebkit.org/aperezdc/release-doc-links/release/wpewebkit-2.44.2.html), I’m only seeing the Download button. Is this an artifact of GH Pages builds, or was there a change since @aperezdc’s screenshot was posted?

The previews have never worked well for this site.

@meyerweb
Copy link
Member

The previews have never worked well for this site.

Wow, seriously — local preview works fine, so I’m working off that.

The secondary-classed buttons are set to be much too low-contrast. I’ve fiddled with some variants and here are two. Please don’t think I mean we should do both: I think we should pick one or the other. (Or a third way that is better than either of these, if someone has one, such as changing a text color or some other adjustment.) Thoughts?

CleanShot 2024-05-29 at 12 07 08

@csaavedra
Copy link
Member

I do like that version better, and I would even say that different colors for documentation and download might make sense to distinguish that one will download a file, and the other open another webpage.

@aperezdc
Copy link
Member Author

The previews have never worked well for this site.

Wow, seriously — local preview works fine, so I’m working off that.

The secondary-classed buttons are set to be much too low-contrast. I’ve fiddled with some variants and here are two. Please don’t think I mean we should do both: I think we should pick one or the other. (Or a third way that is better than either of these, if someone has one, such as changing a text color or some other adjustment.) Thoughts?

CleanShot 2024-05-29 at 12 07 08

I tried locally and I see the blue button invoves changing from the .btn-secondary CSS class to .btn-primary—it looks nicer in my opinion as well, so I'm going to push that change as well.

Do we agree on merging this PR with the addition of making the buttons blue with .btn-primary?

Use the .btn-primary CSS class for buttons instead of .btn-secondary,
which makes them have blue background with white text. This greatly
improves contrast.
@aperezdc aperezdc merged commit 726bd84 into master May 29, 2024
1 check passed
@aperezdc aperezdc deleted the aperezdc/release-doc-links branch May 29, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants