Skip to content

Refresh the bilingual WASM homepage - #59

Merged
densen2014 merged 1 commit into
masterfrom
feature/refresh-wasm-homepage
Sep 4, 2026
Merged

Refresh the bilingual WASM homepage#59
densen2014 merged 1 commit into
masterfrom
feature/refresh-wasm-homepage

Conversation

@densen2014

Copy link
Copy Markdown
Owner

Summary

  • merge the separate Chinese and English BarcodeReader demos into one homepage with an in-page language switch
  • reorganize events and parameters into complete API tables, including scan-frame capture and recent camera improvements
  • demonstrate captured scan frames and keep image decoding plus custom scanner UI examples
  • remove the handwritten, image viewer, SSR, and redundant external demo navigation
  • preserve /en and /barcodereader compatibility routes

Validation

  • dotnet publish Demo.Wasm/Demo.Wasm.csproj --configuration Release
  • dotnet build Demo.Wasm/Demo.Wasm.csproj --configuration Release
  • browser-tested Chinese/English switching, /en, /barcodereader, desktop and 390px mobile layouts
  • verified no Blazor error UI, console errors, horizontal mobile overflow, or removed navigation labels

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 4, 2026 10:51
@densen2014
densen2014 merged commit 8368100 into master Sep 4, 2026
@densen2014
densen2014 deleted the feature/refresh-wasm-homepage branch September 4, 2026 10:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The updated Index page regresses UI updates for JS-invoked callbacks (missing StateHasChanged) and has an incorrect aria-label for the language toggle.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR refreshes the Demo.Wasm homepage by consolidating the previous separate demo pages into a single bilingual (Chinese/English) BarcodeReader landing page with updated UI and API tables, while removing redundant navigation and legacy demo pages.

Changes:

  • Merge the BarcodeReader demos into Index.razor with an in-page language toggle and refreshed sections (live scanning, image decode, custom UI, usage/code sample, API tables).
  • Add new page-scoped styling for the redesigned layout.
  • Remove legacy demo pages (viewer, handwritten, separate BarcodeReader page) and simplify the WASM nav menu.
File summaries
File Description
Demo.Wasm/Shared/NavMenu.razor Simplifies navigation to a single “BarcodeReader” entry and updates branding.
Demo.Wasm/Pages/Index.razor.css Adds new scoped CSS to support the refreshed homepage layout and responsive behavior.
Demo.Wasm/Pages/Index.razor Replaces the old content with the unified bilingual homepage, scanner demos, and API tables.
Demo.Wasm/Pages/Viewer.razor Removes the viewer demo page.
Demo.Wasm/Pages/HandwrittenPage.razor Removes the handwritten signature demo page.
Demo.Wasm/Pages/BarcodeReaderPage.razor Removes the separate BarcodeReader page in favor of the consolidated homepage.
Review details

Suppressed comments (1)

Demo.Wasm/Pages/Index.razor:375

  • OnImageResult is also a Func<string,Task> invoked from JS callbacks in BarCodes; without calling StateHasChanged, the decoded text may not appear when the JS callback arrives after the originating UI event completes.
    private Task OnImageResult(string message)
    {
        BarCode = message;
        return Task.CompletedTask;
    }
  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +357 to 361
private Task OnError(string message)
{
ErrorMessage = message;
return Task.CompletedTask;
}
Comment on lines +12 to +13
<button class="btn btn-outline-primary language-button" type="button" @onclick="ToggleLanguage"
aria-label="@L("Switch to English", "切换到中文")">
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.

2 participants