Skip to content

Add News & Updates section to the Blazor web app home page #219

Closed

Description

@fboucher-os

Why

In #213 (PR #214), a News & Updates section was added to the Android MAUI app's home page (/), rendering the repository's docs/news.md feed (and any referenced images under docs/assets/). Bringing this same News & Updates section to the Blazor web app home page (src/NoteBookmark.BlazorApp/Components/Pages/Home.razor) will give web users visibility into product updates as well.

Proposed scope

  • Add a News & Updates section on the Blazor web app home page (/ in src/NoteBookmark.BlazorApp/Components/Pages/Home.razor).
  • Load and render the Markdown feed from docs/news.md (e.g., fetched from https://raw.githubusercontent.com/fboucher/NoteBookmark/v-next/docs/news.md or shared via a common service/component, resolving relative assets/ image URLs to https://raw.githubusercontent.com/fboucher/NoteBookmark/v-next/docs/assets/).
  • Use safe Markdown-to-HTML rendering with Markdig (DisableHtml() and URL sanitization, matching NewsFeedService in NoteBookmark.MauiApp).
  • Cache or gracefully handle network/fetch failures by displaying a friendly fallback message (Welcome to NoteBookmark! Check back here for product updates.) instead of throwing or breaking the home page.
  • Consider sharing the Markdown parsing/sanitization logic between NoteBookmark.MauiApp and NoteBookmark.BlazorApp (for example in NoteBookmark.SharedUI or NoteBookmark.Domain) to avoid duplication.

Relevant files

Acceptance criteria

  • The Blazor web app home page (/) displays a News & Updates section styled consistently with the existing Fluent UI layout.
  • docs/news.md content (including links and relative images under docs/assets/) is safely rendered from Markdown to HTML.
  • A friendly fallback message is shown if the news feed cannot be fetched or read.
  • Unit tests cover the news feed rendering, asset URL rewriting, and fallback behavior for the web app.

Activity

  1. fboucher-os commented on Oct 26, 2026

    @fboucher-os
    CollaboratorAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: enhancement
    Summary: Add a News & Updates section to the Blazor web app home page that safely renders the repository's Markdown news feed with a graceful fallback.

    Current behavior:
    The MAUI app home page includes a News & Updates section backed by INewsFeedService / NewsFeedService, which fetches the repository's news.md Markdown feed, resolves relative assets/ image references, converts Markdown to HTML using Markdig with raw HTML disabled, sanitizes URL attributes, and falls back to <p>Welcome to NoteBookmark! Check back here for product updates.</p> if the feed is unavailable. The Blazor web app home page (/) currently displays only the static welcome card, feature overview cards, and technology badges, with no News & Updates section.

    Desired behavior:

    • The Blazor web app home page (/) displays a News & Updates section styled consistently with the existing Fluent UI layout.
    • The section loads and renders the Markdown news feed (docs/news.md, e.g. from https://raw.githubusercontent.com/fboucher/NoteBookmark/v-next/docs/news.md), resolving any relative assets/ image URLs so images render properly in the web app.
    • Markdown-to-HTML conversion uses Markdig with DisableHtml() and URL scheme sanitization (http, https, mailto for href, and safe image sources for src), preventing unsafe HTML or script injection.
    • Common Markdown parsing, asset URL resolution, and HTML sanitization logic can be shared between the MAUI app and Blazor web app if appropriate to avoid duplication.
    • If fetching or reading the news feed fails for any reason, the home page does not throw or break rendering, and instead displays the friendly fallback message (Welcome to NoteBookmark! Check back here for product updates.).

    Key interfaces:

    • INewsFeedService (GetHtmlAsync(), RefreshAsync(), FeedUpdated) and NewsFeedService — existing news feed contract and implementation in the MAUI app; can be adapted, shared, or implemented for the Blazor web app DI container.
    • Blazor Home page component (@page "/") — renders the News & Updates section within the Fluent UI layout.
    • Markdig MarkdownPipeline (DisableHtml()) and HTML attribute sanitization logic — ensures only safe href/src URLs are emitted in the rendered MarkupString.

    Acceptance criteria:

    • Visiting the Blazor web app home page (/) renders a News & Updates section styled consistently with the Fluent UI page layout.
    • Markdown content from the news feed (including links and relative images under assets/) is converted to HTML with raw HTML disabled and URL attributes sanitized.
    • Relative assets/ image paths (excluding path traversal segments like ..) are resolved so images display properly in the browser.
    • When the news feed cannot be fetched or read (e.g., network failure or non-success HTTP response), the section gracefully displays <p>Welcome to NoteBookmark! Check back here for product updates.</p> without throwing an unhandled exception.
    • Unit tests cover Markdown-to-HTML rendering, relative asset URL rewriting, URL sanitization, and fallback behavior on fetch failure.
    • Solution builds cleanly with nullable warnings treated as errors and all unit tests passing.

    Out of scope:

    • Changing the format or location of the upstream docs/news.md feed or docs/assets/ directory.
    • Redesigning the existing MAUI app home page or changing its offline file-sync workflow.
    • Adding an in-app editor or admin UI for publishing news items.
  2. moved this from In progress to Merged in Open Source Workbenchon Oct 27, 2026
  3. fboucher commented on Oct 27, 2026

    @fboucher
    Owner

    in v-next

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions