Skip to content

Story 2398: Download Page Integration#2471

Open
julhoang wants to merge 21 commits into
developfrom
julia/download-page-integration
Open

Story 2398: Download Page Integration#2471
julhoang wants to merge 21 commits into
developfrom
julia/download-page-integration

Conversation

@julhoang

@julhoang julhoang commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Issue: #2398

Summary & Context

Wires the V3 release detail page to real data: live downloads, release-notes content, hero action buttons, and a dismissible version-alert banner. Also enriches the "What's new" AI flow with dependency stats and inline-markdown rendering.

Changes

Release detail page — real data integration

  • Integrate real data into the release detail page (release_detail.html):
    • Replace hardcoded whats_new_items and release-notes HTML with live values from get_v3_context_data
    • Wire real URLs: Slack, contributors guide, release process, release report, and RSS feed
  • Add empty/placeholder state to _release_highlights_card.html for ungenerated summaries

Version alert banner

  • Add a V3 version-alert banner shown when viewing a non-current version (sticky-latest / beta / older / dev branch):
    • Add _version_alert.html wrapping _banner.html
    • Move alert-message construction out of the template into VersionAlertMixin.get_version_alert_message (Python-side branching/link markup), computed only on the V3 render path
  • Enhance _banner.html: add a dismissible close (X) button with @alpinejs/persist sessionStorage scoping, __body wrapper layout, and no-JS fallback (always visible, no close button)

Hero library updates

  • Add Release Report and RSS action buttons to _hero_library.html:
    • New report_url / rss_url props and file-multiple / rss icons
    • Restructure hero into hero-library__main so the version-alert banner renders as the last child of the hero

"What's new" AI generation

  • Improve the "What's new" AI generation in versions/tasks.py:
    • Feed precomputed dependency add/remove stats into the LLM prompt (omitted when data is missing or all-zero)
    • Instruct the model to wrap code identifiers in inline backticks
  • Add inline_markdown template filter (whats_new_extras.py) rendering code and **bold** spans while escaping all other HTML; apply it to release-highlight descriptions

Shared logic & tooling

  • Move dependency-stat aggregation into Version.get_dependency_stats() and reuse it from the view and the AI task
  • Add scripts/seed_release_notes_all.py to seed release-notes RenderedContent for every local version from the GitHub history source

Styling

  • Improve markdown-card.css (custom list markers, inline code styling, wrapping) and release-detail.css (fixed-height release-notes card)

Tests

  • Add tests for the mixin message builder, dependency stats, template filter, V3 context data, hero banner forwarding, and AI dep-stats handling

Risks & Considerations

  • inline_markdown only handles single-backtick code and **bold**; other markdown passes through escaped.
  • get_dependency_stats can raise BoostImportedDataException when imported data is missing; the AI task swallows it, but verify the view path handles versions without dependency data.
  • Banner dismissal uses sessionStorage keyed by version slug — dismissals reset per session, by design.
  • The markdown styling inside the Release Notes will be handled in another ticket (pending updates to Boostlook)
  • The hero section styling will also be handled in another ticket (pending illustration asset and a refactor)

Testing Instructions

Setup

  1. Check out this branch (stacked on cy/2397-whatsnew) and run migrations if needed.
  2. Seed release-notes content for local versions:
    docker compose run web ./manage.py shell < scripts/seed_release_notes_all.py
    
    Confirm the script reports seeded versions (and any skipped/failed at the end).

Release detail page — real data

  1. Visit http://localhost:8000/releases/ (latest), http://localhost:8000/releases/master/, and http://localhost:8000/releases/develop/.
  2. Verify the downloads table shows live download links (not placeholders) and the copy button works.
  3. Confirm the release-notes card renders real content from the seeded data (not hardcoded HTML), with a fixed-height scrollable area.
  4. Check hero action buttons resolve to the correct destinations: Slack, contributors guide, release process, Release Report (file-multiple icon), and RSS (rss icon).
  5. On a version with no generated "What's new" summary, confirm the highlights card shows the empty/placeholder state instead of breaking. Confirm the "What's new" card is hidden on master/develop.

Version-alert banner

  1. View a non-current version and confirm the banner appears with a message that makes sense for the version you're viewing (sticky-latest, beta, older release, or dev branch).
  2. Confirm the dismiss X works and stays dismissed for the session (persists via sessionStorage, keyed by version).
  3. No-JS check: disable JavaScript and confirm the banner still renders, is always visible, and has no close button.

"What's new" AI generation (versions/tasks.py)

  1. Trigger the "What's new" generation for a version that has dependency add/remove data.
  2. Confirm the LLM prompt includes the dependency stats, and that stats are omitted when data is missing or all-zero
  3. Confirm generated content wraps code identifiers in inline backticks.

Inline markdown filter

  1. On a release-highlight description containing `code` and **bold**, confirm those render as inline code / bold spans.

Tests (optional if you want to invoke it manually)

just test_pytest libraries/tests/test_mixins.py versions/tests/test_models.py versions/tests/test_templatetags.py versions/tests/test_views.py versions/tests/test_ai_tasks.py

Screenshots

Before After Notes
[screenshot] [screenshot] [screenshot]

Self-review Checklist

  • Tag at least one team member from each team to review this PR
  • Link this PR to the related GitHub Project ticket

Frontend

  • UI implementation matches Figma design
  • Tested in light and dark mode
  • Responsive / mobile verified
  • Accessibility checked (keyboard navigation, etc.)
  • Ensure design tokens are used for colors, spacing, typography, etc. – No hardcoded values
  • Test without JavaScript (if applicable)
  • No console errors or warnings

@julhoang julhoang changed the base branch from develop to cy/2397-whatsnew May 26, 2026 19:54
@julhoang julhoang linked an issue May 26, 2026 that may be closed by this pull request
@julhoang julhoang marked this pull request as ready for review May 26, 2026 22:19

@jlchilders11 jlchilders11 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall, this all looks good! Couple of structural things I'd like to see changed that might make it even better.

Comment thread scripts/seed_release_notes_all.py Outdated
Comment thread versions/templatetags/whats_new_extras.py

@herzog0 herzog0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great work @julhoang!! Just one nit here, but I'm pre-approving as I'd say it's optional

Comment thread versions/views.py Outdated
@ycanales ycanales force-pushed the cy/2397-whatsnew branch from 4b617a0 to 965a3bb Compare May 28, 2026 20:57
Base automatically changed from cy/2397-whatsnew to develop May 29, 2026 15:46
@julhoang julhoang force-pushed the julia/download-page-integration branch from bfc1719 to 90d7d16 Compare May 29, 2026 20:41
@julhoang julhoang requested a review from jlchilders11 May 29, 2026 20:44

@jlchilders11 jlchilders11 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, thanks for those adjustments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task: Older Library Document Version Banner Component Update: Dismissible Banner Variant Webpage Integration: Downloads

5 participants