Refresh the bilingual WASM homepage - #59
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 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.razorwith 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", "切换到中文")"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/enand/barcodereadercompatibility routesValidation
dotnet publish Demo.Wasm/Demo.Wasm.csproj --configuration Releasedotnet build Demo.Wasm/Demo.Wasm.csproj --configuration Release/en,/barcodereader, desktop and 390px mobile layouts