Skip to content

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Dec 26, 2024

update export sample code

Summary of the changes (Less than 80 chars)

简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号

Description

fixes #4841

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

[是否影响老版本]

Risk

  • High
  • Medium
  • Low

[Justify the selection above]

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

Documentation:

  • Updated the export sample code in the documentation.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 26, 2024

Reviewer's Guide by Sourcery

This PR updates the export sample code to display data using Display components instead of EditorForm.

Class diagram showing component structure changes

classDiagram
    class ExportPdfButtons {
        +OnBeforeExport()
        +OnAfterDownload()
        +PdfFileName: string
    }

    class Display {
        +Value: object
        +ShowLabel: bool
        +DisplayText: string
    }

    class GroupBox {
        +Title: string
    }

    ExportPdfButtons --> GroupBox
    GroupBox --> Display : contains

    note for Display "Replaced EditorForm\nwith Display components"
Loading

File-Level Changes

Change Details Files
Replaced EditorForm with Display components for data presentation
  • Removed ValidateForm and EditorForm components.
  • Added Display components for Name, Address, DateTime, and Education fields.
  • Used a grid layout with form-inline class for better data organization.
src/BootstrapBlazor.Server/Components/Samples/ExportPdfButtons.razor

Assessment against linked issues

Issue Objective Addressed Explanation
#4841 Fix the issue where form control data (text boxes, date inputs, etc.) are not being exported to PDF

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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

@bb-auto bb-auto bot added the bug Something isn't working label Dec 26, 2024
@bb-auto bb-auto bot added this to the v9.0.0 milestone Dec 26, 2024
@codecov
Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (04c56cc) to head (3c9b7dd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #4958   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          629       629           
  Lines        28096     28096           
  Branches      4035      4035           
=========================================
  Hits         28096     28096           

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

@ArgoZhang ArgoZhang merged commit 9bf6c46 into main Dec 26, 2024
5 checks passed
@ArgoZhang ArgoZhang deleted the doc-export branch December 26, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ExportPdfButton): 导出pdf控件的数据会丢失

2 participants