Skip to content

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Nov 27, 2025

Link issues

fixes #7194

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Simplify the PdfReaders sample component by removing unused advanced properties, methods, and attribute metadata related to PDF viewing and documentation.

Enhancements:

  • Remove unused PdfReader instances, configuration properties, and navigation/zoom helpers from the PdfReaders sample component to streamline the example.
  • Drop obsolete attribute metadata and localization-backed attribute descriptions from the PdfReaders sample, leaving only the core download functionality.

Copilot AI review requested due to automatic review settings November 27, 2025 07:16
@bb-auto bb-auto bot added the enhancement New feature or request label Nov 27, 2025
@bb-auto bb-auto bot added this to the 10.0.0 milestone Nov 27, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 27, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors the PdfReaders sample component by removing unused properties, advanced demo logic, and attribute metadata helpers, leaving only the basic PdfReader demo state and download behavior.

Class diagram for simplified PdfReaders sample component

classDiagram
    class PdfReaders_Before {
        - DownloadService DownloadService
        - string FileName
        - string Filename
        - PdfReader PdfReader
        - bool _showTwoPagesOneView
        - bool _showPrint
        - bool _showDownload
        - bool _showPager
        - IWebHostEnvironment WebHostEnvironment
        - string FilenameStream
        - PdfReader AdvancedPdfReader
        - bool StreamMode
        - bool ReadOnly
        - string Watermark
        - EnumZoomMode Zoom
        - EnumPageMode PageMode
        - string Search
        - int Page
        + Task OnDownloadAsync()
        + Task ApplyFilenameStream()
        + Task ApplyZoom()
        + Task ApplyPageMode()
        + Task Refresh()
        + Task ApplyPage()
        + Task ApplyPagePrevious()
        + Task ApplyPageNext()
        + Task ApplySearch()
        + Task Clear()
        + AttributeItem[] GetAttributes()
    }

    class PdfReaders_After {
        - DownloadService DownloadService
        - bool _showTwoPagesOneView
        - bool _showPrint
        - bool _showDownload
        - bool _showPager
        - IWebHostEnvironment WebHostEnvironment
        + Task OnDownloadAsync()
    }

    PdfReaders_Before <|-- PdfReaders_After
Loading

File-Level Changes

Change Details Files
Simplified the PdfReaders sample component to only support basic viewing flags and download behavior, removing advanced demo logic and attribute metadata configuration.
  • Removed unused using directive and various unused properties including FileName/Filename, PdfReader references, and stream-based demo members.
  • Deleted advanced PdfReader demo state and behaviors such as zoom/page navigation, search, page mode handling, and related helper methods.
  • Removed the GetAttributes() metadata generator that described PdfReader parameters using localized strings, simplifying the sample to core behavior only.
  • Kept the basic download handler and simple boolean flags controlling UI elements for the PdfReader sample.
src/BootstrapBlazor.Server/Components/Samples/PdfReaders.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7194 Add or update localization documentation for the PdfReader component (e.g., localized attribute descriptions, sample docs, or related localized strings). The PR only removes properties, fields, and related attributes (including several [DisplayName] annotations) from PdfReaders.razor.cs and removes an unused using directive. It does not add any new localized documentation, localization keys, or doc-related content. The existing GetAttributes method remains largely unchanged and no new localization documentation is introduced, so the feature request to add localization documentation for PdfReader is not implemented in this diff.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ArgoZhang ArgoZhang merged commit ef960ae into main Nov 27, 2025
6 of 7 checks passed
@ArgoZhang ArgoZhang deleted the dev-fs branch November 27, 2025 07:17
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (02b0591) to head (f8f2fed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7195   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          745       745           
  Lines        32583     32583           
  Branches      4515      4515           
=========================================
  Hits         32583     32583           
Flag Coverage Δ
BB 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the PdfReader component demo by removing unused code and upgrading the package version from beta to stable release. The localization documentation already exists in the locale files (en-US.json and zh-CN.json), so this appears to be a cleanup refactor rather than adding new localization.

Key changes:

  • Removed unused demo properties, methods, and the GetAttributes documentation method
  • Updated BootstrapBlazor.PdfReader package from version 10.0.1-beta08 to 10.0.1 (stable)
  • Simplified the code-behind file to only include actively used members

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
PdfReaders.razor.cs Removed unused imports, properties, demo methods, and the GetAttributes method that documented component parameters
BootstrapBlazor.Server.csproj Updated PdfReader package from beta (10.0.1-beta08) to stable release (10.0.1)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(PdfReader): add localization doc

2 participants