Skip to content

chore(PdfReader): bump version 10.0.9#768

Merged
ArgoZhang merged 2 commits intomasterfrom
fix-pdf
Dec 2, 2025
Merged

chore(PdfReader): bump version 10.0.9#768
ArgoZhang merged 2 commits intomasterfrom
fix-pdf

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Dec 2, 2025

Link issues

fixes #767

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

Bug Fixes:

  • Prevent errors or unnecessary relayout when the PdfReader toolbar is not rendered or has zero width.

Copilot AI review requested due to automatic review settings December 2, 2025 02:45
@bb-auto bb-auto Bot added the enhancement New feature or request label Dec 2, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Dec 2, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Dec 2, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the PdfReader package version to 10.0.9 and makes the toolbar relayout logic more robust by skipping processing when the toolbar is not rendered or has zero width.

File-Level Changes

Change Details Files
Harden toolbar relayout logic to avoid running on non-rendered or hidden toolbars.
  • Extend the null check on the toolbar element in relayoutToolbar to also return early when the toolbar has zero offsetWidth, indicating it is not visible or not laid out.
  • Keep existing behavior that exits when the toolbar element cannot be found in the DOM.
src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js
Bump PdfReader component/package version to 10.0.9.
  • Update the project file version metadata to 10.0.9 for the PdfReader component.
src/components/BootstrapBlazor.PdfReader/BootstrapBlazor.PdfReader.csproj

Assessment against linked issues

Issue Objective Addressed Explanation
#767 Update the PdfReader component/package version to 10.0.9 in the project configuration (e.g., .csproj).

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 b6b7001 into master Dec 2, 2025
3 of 4 checks passed
@ArgoZhang ArgoZhang deleted the fix-pdf branch December 2, 2025 02:45
Copy link
Copy Markdown

@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.

Copy link
Copy Markdown

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 bumps the PdfReader component version to 10.0.9 and fixes a bug related to toolbar layout calculations when the toolbar element has zero width.

  • Version update from 10.0.8 to 10.0.9
  • Added defensive check to prevent layout calculations on hidden/zero-width toolbar elements

Reviewed changes

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

File Description
BootstrapBlazor.PdfReader.csproj Version bumped from 10.0.8 to 10.0.9 for patch release
PdfReader.razor.js Added toolbar.offsetWidth === 0 check to prevent layout calculations when toolbar is not visible or has zero width
Comments suppressed due to low confidence (10)

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:121

  • Unused variable title.
    const title = el.querySelector('.bb-view-pdf-dialog-title');

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:122

  • Unused variable author.
    const author = el.querySelector('.bb-view-pdf-dialog-author');

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:123

  • Unused variable subject.
    const subject = el.querySelector('.bb-view-pdf-dialog-subject');

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:124

  • Unused variable keywords.
    const keywords = el.querySelector('.bb-view-pdf-dialog-keywords');

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:128

  • Unused variable modified.
    const modified = el.querySelector('.bb-view-pdf-dialog-modified');

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:148

  • Unused variable webview.
    const webview = el.querySelector('.bb-view-pdf-dialog-webview');

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:466

  • Unused variable scaleEl.
    const scaleEl = el.querySelector(".bb-view-scale-input");

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:567

  • The initial value of v is unused, since it is always overwritten.
    let v = 100;

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:428

  • Avoid automated semicolon insertion (94% of all statements in the enclosing function have an explicit semicolon).
    })

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js:490

  • Avoid automated semicolon insertion (91% of all statements in the enclosing function have an explicit semicolon).
    delete el.widths

💡 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.

chore(PdfReader): bump version 10.0.9

2 participants