125 Commits

Author SHA1 Message Date
daveoconnor
09262a10e5 Redirect /libs/{library} to latest docs version (#1977) (#1981) 2025-10-22 09:09:16 -07:00
daveoconnor
65fdf7c91a Correct documentation URL issues (#1975) 2025-10-17 13:14:07 -07:00
daveoconnor
c73de3939d Handle missing version library for /libs/library_name (#1942) (#1947) 2025-10-08 13:57:39 -07:00
daveoconnor
adebb47258 Added contributor email address claim validation (#1710) (#1866) 2025-09-05 13:55:33 -07:00
daveoconnor
cf988bbbab Mask missing library dependency data handling (#1878) 2025-08-20 10:17:47 -07:00
Greg Kaleka
3dffb7b027 Use version cookie when redirecting to library docs 2025-06-26 16:26:31 -04:00
Chrissy Wainwright
a31970c9e1 display user icons on the homepage library spotlight refs #1658
Re-use the code written for the library detail page for displaying authors and maintainers on the homepage. To avoid duplicating code, moved all the necessary pieces to a mixin to be used by HomepageView and LibraryDetail, and adjusted it to work for both.
2025-03-31 12:44:01 -05:00
Chrissy Wainwright
82943fbcd7 display author name on library when missing refs #1705
If the author email is not associated with a CommitAuthor, display the name from the User model
2025-03-18 11:47:49 -05:00
Foo Bar
a55111ca74 Use display_name for "username" instead of first_name, last_name (#1640) (#1638) 2025-03-03 11:03:49 -08:00
Brian Perrett
340db5e5e3 Show boostdep data in library/release detail and report. (#1568) 2024-12-20 15:00:09 -08:00
daveoconnor
91f36c3eeb Simplified/centralised version dropdowns population (#1500) (#1510) 2024-12-10 09:29:50 -08:00
Greg Kaleka
f85c533dde Consolidate version dropdown code and fix library detail dropdown (#1498) 2024-11-26 21:39:49 -05:00
daveoconnor
f6a5f4fbcf Make URLs more consistent, refactor libraries/releases (#1489) 2024-11-25 16:08:38 -05:00
daveoconnor
e7393d8882 Fix categories not being filtered on library views (#1456) 2024-11-18 11:03:57 -08:00
daveoconnor
3a0b4eec70 Fix for category library version sort order (#1441) 2024-11-13 16:04:27 -05:00
daveoconnor
2d64635dad Fix for library version sort order (#1440) 2024-11-13 10:50:11 -08:00
Greg Kaleka
5d9da9e486 Code formatting fix (#1437)
Co-authored-by: Greg Kaleka <gkaleka@energy-solution.com>
2024-11-12 16:12:45 -05:00
Greg Kaleka
e9ed0aabc9 Add missing README message (#1350) 2024-11-12 15:51:31 -05:00
daveoconnor
1d31bef1e4 Library Version Based CPP versions and descriptions (#1422) 2024-11-12 15:49:16 -05:00
Greg Kaleka
fed0291d9e Libraries by category view only show populated categories for selected version (#1417)
Fixes #1224 

- In libraries-by-category view, filter categories to only ones with
libraries in the selected version
- Added a prefetch to the query to fix the N+1 query (minor performance
improvement)

Before:
<img width="1275" alt="Screenshot 2024-11-05 at 3 54 18 PM"
src="https://github.com/user-attachments/assets/fadd4e56-7101-46bb-ab4f-68d7d01a8879">

After:
<img width="1266" alt="Screenshot 2024-11-05 at 3 53 58 PM"
src="https://github.com/user-attachments/assets/b54f4e20-5928-477e-88c2-dc0082babfc0">

---------

Co-authored-by: Greg Kaleka <gkaleka@energy-solution.com>
2024-11-06 12:21:58 -05:00
daveoconnor
b75fac0f37 Fix reversion to previous library versions (#1397) (#1400)
This is related to ticket #1397
2024-10-30 11:38:55 -07:00
daveoconnor
9fbf58a5f1 Fix library dropdown switching (#1388)
* Resolves the issue with libraries not updating on version dropdown
selection going back from version to latest
* Fixes edge case of version alert not showing when query params are
deleted from location bar
* Adds refactor of version selection drop downs on library preference
page and cleans up some unused ones.
2024-10-28 16:49:26 -07:00
Gavin Wahl
a552c633b9 Case insensitive URLs for library detail (#1362)
Redirect to the canonical case when it does not match. This adds a
case-insensitive unique constraint on library slugs to make this safe.

Fixes #163
2024-10-25 13:50:29 -06:00
Gavin Wahl
40dbaf8198 Redirect to latest version on POST (#1361)
This removes the repost dialogue after switching to the latest version.
Fixes #1314
2024-10-21 15:27:45 -06:00
Brian Perrett
e230128f61 Add authors to LibraryVersions. (#1347)
- fixes #1325
- reuses the logic that imports authors for libraries to do the same for
LibraryVersions.
- Authors are only added if an email is listed for the author in the
metadata
2024-10-10 10:39:16 -07:00
daveoconnor
463112e5af fixed issues with releases page and versioning (#1300)
* Fixed issues with releases page and versioning
* Added latest support and version alert
* Updated version alert to link to /release and clarify most recent vs
vs "release" selection
* Refactored Libraries and Releases pages to align similar code for
reuse.
2024-10-07 15:42:18 -07:00
Brian Perrett
23ebe24273 Import commits for minor versions (#1332)
- Fixes #1327
- Commit import will ignore patch and beta versions.
2024-10-07 11:57:30 -07:00
Brian Perrett
96de9d234f Fix previous contributors. (#1320) 2024-10-04 09:12:22 -07:00
Brian Perrett
9bf6f156ad Add ability to highlight new contributors. (#1299)
In the library detail page, if a contributor has never contributed
before the selected release, highlight them as a new contributor.
2024-10-02 13:26:41 -07:00
Brian Perrett
45a3fa7870 Create an avatar tag to be usable anywhere we need an avatar. (#1298)
- fixes https://github.com/boostorg/website-v2/issues/1285
- Use a django tag to render an avatar component.
2024-09-27 15:30:46 -07:00
Brian Perrett
48c09d3d5e Import commits per release and create release reports (#1263)
View stats per release, we do this by
doing log diffs between release tags. Ex: `git log
boost-1.78.0..boost-1.79.0`. The output is parsed and the commits
are saved with a foreign key to the `LibraryVersion` it relates to.

- commits are imported by doing "bare" clones (no project files, only
git data) of repos into temporary directories, as created by python's
bulitin `tempfile.TemporaryDirectory`
- Added Commit model
- Added CommitAuthor model
- Added CommitAuthorEmail model
  - One CommitAuthor can have many emails.
- Added task for importing commits. (and admin link to trigger it)
- Added task for importing CommitAuthor github data (avatar and profile
url, with admin link to trigger it)
- Added a basic Library stat page which can be viewed by going to the
admin -> library -> view stats.
- Added a `Get Release Report` button in the `LibraryAdmin` which allows
a staff member to select a boost version and up to 8 libraries to
generate a report for. The report is just a webpage which attempts to
convert cleanly to a pdf using the browser's print to pdf functionality.
- Updated the Library Detail page to show commits per release instead of
per month.
- Updated the Library Detail page to show `Maintainers & Contributors`
sorted by maintainers, then the top contributors for the selected
release, then the top contributors overall by commits descending.
- Removed CommitData, which was tracking monthly commit stats
2024-09-25 15:09:07 -07:00
daveoconnor
30ab003561 added support for 'release' in urls (#1084) (#1266)
1. added support for 'release' in library urls
2. fixed versioning not working from the non-grid library list pages
3. fixed library detail user selection of versioning not working
4. unified cookie handling to share across both LibraryList and
LibraryDetail
2024-09-24 13:56:13 -07:00
daveoconnor
50559609e9 fixed issues with libraries navigation, refactors (#1213) (#1250)
There's a good amount of refactoring in this, so this is going to look
like a much bigger change than it is. In reality it makes the dispatch
code simpler.

Fixes: 
1. Resolved the issue with the libraries pages not redirecting correctly
2. Resolved an issue around categories not being preserved moving from
page to page.

The issue with the redirects was there was a tug of war on arriving on
/library between the various ways of determining where the user should
end up.
I added a `/libraries/grid/` url and now `/libraries/` determines which
list page the user should end up on based on 1) url 2) cookie, 3) the
default, same for version preference. We can probably get rid of
dispatch() later. This has the added bonus of allowing reliable linking
to a specific list view (e.g. for users to bookmark one type)

Refactors:
1. Separated the navigation on the three library pages into a standalone
template.
2. Moved some constants to constants.py
3. Moved a lot of the views methods which were only used by the
dispatch() call to utils.py .
4. At that stage there were circular imports so I moved the docs
generation functions which were only used in constants.py to
constants_utils.py. utils.py is more general.
2024-09-19 12:06:36 -07:00
Frank Wiles
161d3b1387 Add latest option behavior to latest library and detail pages (#1218) 2024-08-30 06:41:30 -05:00
Frank Wiles
ef3b79134f Add url path to handle /doc/libs/release/* (#1204)
Redirect to the latest release when this URL prefix exists on
documentation.

Fixes #1084
2024-08-26 19:01:30 -05:00
Kenneth Reitz
454a9cdc20 Validate values being stored for preferred boost version and switch to cookies (#1169)
This pull request validates the versions being stored (per #1168) for
the preferred Boost version selection. It also switches this
functionality to using cookies.
2024-07-29 10:01:04 -04:00
Kenneth Reitz
cbd93eaeb2 chore: Refactor LibraryList view to handle redirect logic and improve code readability 2024-07-03 09:19:18 -04:00
Kenneth Reitz
32a8d122d7 Sticky libraries view (#1129)
This pull request solves #1106.
2024-07-02 16:24:06 -04:00
Kenneth Reitz
3907699bc4 Refactor version dropdown logic in LibraryDetail view 2024-06-28 11:33:45 -04:00
Kenneth Reitz
dca2fe1ba6 Remove non-released versions from version selection form queryset 2024-06-14 14:01:43 -04:00
sdarwin
35196dbf94 Set boost version session variable from library detail page. 2024-05-07 11:26:45 -04:00
sdarwin
36f4df85c9 Remove csrf_token from two pages 2024-04-30 15:28:59 -04:00
Kenneth Reitz
917322db9a Fix setting selected boost version in LibraryList view 2024-04-25 11:35:50 -04:00
Kenneth Reitz
d77e38e883 improve code documentation 2024-04-08 11:07:19 -04:00
Kenneth Reitz
4fed2c1483 Fixes [regression] list and category views not working on www.stage.boost.cppalliance.org #1046 2024-04-08 10:46:31 -04:00
Kenneth Reitz
8d796ac074 Fix redirect issue in LibraryList and VersionDetail views 2024-04-05 12:18:59 -04:00
Kenneth Reitz
19c6a75b88 Add selected boost version functionality to LibraryList view 2024-04-05 11:34:37 -04:00
Kenneth Reitz
02093a76c4 satisfy linter 2024-04-04 10:33:20 -04:00
Kenneth Reitz
7f3ea1f360 Remove "boost_" prefix from documentation URLs 2024-04-04 10:33:20 -04:00
Kenneth Reitz
cc94538dc5 cleanup LibraryDetail dispatch method 2024-03-25 16:09:35 -04:00