dotnetcore / BootstrapBlazor

Bootstrap Blazor is an enterprise-level UI component library based on Bootstrap and Blazor.
https://www.blazor.zone
Apache License 2.0
2.68k stars 302 forks source link

(Calendar) add AdditionalHeaders Parameter #4673 #4674

Open densen2014 opened 6 days ago

densen2014 commented 6 days ago

(Calendar) 日历组件, 周视图添加附加列, 显示例如时间刻度

Summary of the changes (Less than 80 chars)

周视图添加附加列

Description

fixes #4673

Regression?

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

[是否影响老版本]

Risk

[Justify the selection above]

Verification

Packaging changes reviewed?

☑️ Self Check before Merge

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

Summary by Sourcery

New Features:

sourcery-ai[bot] commented 6 days ago

Reviewer's Guide by Sourcery

This PR adds support for additional header columns in the Calendar component's week view. The implementation adds a new AdditionalHeaders parameter that accepts an array of strings, which are rendered as extra columns before the weekday headers.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added support for additional header columns in the Calendar week view
  • Added new AdditionalHeaders parameter of type string[]
  • Created RenderAddHeader RenderFragment to display additional header columns
  • Modified week view table header to conditionally render additional columns
  • Additional headers are displayed with responsive behavior (hidden on small screens)
src/BootstrapBlazor/Components/Calendar/Calendar.razor
src/BootstrapBlazor/Components/Calendar/Calendar.razor.cs

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](https://app.sourcery.ai) 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 - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
bb-auto[bot] commented 6 days ago

Thanks for your PR, @densen2014. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

codecov[bot] commented 6 days ago

Codecov Report

Attention: Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.

Project coverage is 99.97%. Comparing base (624ade0) to head (24c0dd3). Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
...BootstrapBlazor/Components/Calendar/Calendar.razor 53.84% 5 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4674 +/- ## =========================================== - Coverage 100.00% 99.97% -0.03% =========================================== Files 620 620 Lines 27428 27435 +7 Branches 3929 3931 +2 =========================================== + Hits 27428 27429 +1 - Misses 0 5 +5 - Partials 0 1 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: