boostorg / website-v2

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

Library Detail Backend Changes #252

Closed frankwiles closed 1 year ago

frankwiles commented 1 year ago
williln commented 1 year ago

Related issues:

@frankwiles what should the refresh schedule be for the various library-adjacent objects? I can start breaking those out into smaller issues.

objects:

Casually broken out into separate API calls, and we'll just refresh whatever data is there when we grab it.

williln commented 1 year ago

notes from post-meeting sync with Greg:

Fields to make available in template:

commits per month

commits per year

new design

See #254

CleanShot 2023-05-03 at 12 05 45

frankwiles commented 1 year ago

@williln I'm thinking daily is probably the right cadence. Just wanted to make sure it wasn't weekly or monthly.

vinniefalco commented 1 year ago

@sdarwin already has this data by the way. I settled on the number of commits because it is super easy to get

git rev-list --count <branch-name>

and also because it is efficient.

In terms of tracking, once a month is more than enough, there's no need for dailies or partially filled months... the signal to noise ratio at high sampling rates is too low. There should always be 12 months in the monthly graph for libraries that are at least 12 months old. Otherwise those older months would just show as zero.

For the yearly, only full years count, going back since the library was added.

vinniefalco commented 1 year ago

The graphs are the lowest priority, if we just hide them and put a solid tinted rectangle in their place I am happy for the Debut, and we can make them actually work later. Everything else needs to work though.

williln commented 1 year ago

@vinniefalco For the C++ version display, should we display exactly what is in meta/libraries.json or should we use the display names here? https://docs.cppalliance.org/user-guide/prev/library_metadata.html

Screenshot 2023-05-09 at 12 16 53 PM

For the display year, should we use the year of the earliest GitHub tag? Example: for asio it would be boost-1.35.0-rc1 in 2008: https://github.com/boostorg/asio/tags?after=boost-1.35.0-rc3

vinniefalco commented 1 year ago

In the lozenge prefer "03" and "14" to "C++03" and "C++14" if for no other reason than the repetition of "C++" weakens the design language of the page.

If we are talking about the library detail page then I think it would be ok to say "C++11", "C++14", and so on.

williln commented 1 year ago

@vinniefalco For the "Since 2019" display year on the library details page, should we use the year of the earliest GitHub tag? Example: for asio it would be 2008 in the boost-1.35.0-rc1 tag

vinniefalco commented 1 year ago

earliest repository tag is a good start. a library might be older (for example in the SVN days), but the author would have to submit a request to manually update the database or something.

williln commented 1 year ago

Items Accomplished:

Remaining items:

vinniefalco commented 1 year ago

Render the asciidoc in the body of the details page -- @vinniefalco where do I get that content?

I was thinking of having it come out of a directory in the library repository. for example

doc/library-detail.adoc

or if that file is not present, then it could come from the root:

README.adoc

alternatively, we can just show nothing if "doc/library-detail.adoc" is missing, and if it is present and is also a symbolic link to another file in the repo then we can resolve the link and use that file. This will allow the repository owner to create README.adoc in the root of the repository for GitHub to preview on the repository landing page, and also allow the repository owner to link doc/library-detail.adoc to README.md so that the same content appears on the corresponding library detail page.

This would have to use the right commit or branch. If the user has selected an older version then it needs to use the git tag corresponding to that version. The user can select "latest version" which is just the highest semantically valued tag. But there are also the "develop" and "master" choices which correspond to the library repository's commit-id in the superproject.

alandefreitas commented 1 year ago

Render library.adoc in the root of the repository to HTML and save it into the database in a TextField which will be rendered below the graphs and other header/link elements.

where do I get that content?

To complement Vinnie's answer, the pages are in the revsys buckets under s3://***/site-pages/{branch}. For instance, s3://***/site-pages/develop/help.adoc for the FAQ page. The "?" icon currently links to https://www.boost.revsys.dev/support/ though.

williln commented 1 year ago

@vinniefalco @alandefreitas Thanks for your explanations. So for the library documentation --

Render the asciidoc in the body of the details page -- @vinniefalco where do I get that content?

I was thinking of having it come out of a directory in the library repository. for example

Do the asciidoc files for the library descriptions not exist in the library repos yet? Or if they do, can you point me to the one I should be using for asio, just as an example? https://github.com/boostorg/asio

vinniefalco commented 1 year ago

The files do not exist yet :) Alan could you please copy README.md to library-detail.adoc (and convert to Asciidoc) for URL, JSON, and Beast? And ask the Boost.Redis and Boost.MySQL authors do to the same (and merge to develop)?

alandefreitas commented 1 year ago

@williln library-detail.adoc is in boostorg/json/doc and boostorg/url/doc. I'll still do the other libs.

williln commented 1 year ago

@alandefreitas Thank you! I'll use those as test cases when working on the asciidoc conversion.

williln commented 1 year ago

@alandefreitas @vinniefalco The code to convert and cache asciidoc content is now in place, so I'm circling back around to load the doc/library-details.adoc content into the body of the Library Details page for the pages that have it.

For versions of the library that predate when that file was added or that otherwise don't have it, what should we show for the library description?

Local example of a library with that file:

Screenshot 2023-06-09 at 10 01 52 AM

And without that file:

Screenshot 2023-06-09 at 10 02 29 AM