Skip to content

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Sep 29, 2025

Link issues

fixes #6803

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

Update CSS bundler imports and paths, enhance RTL styling for multiple components, and remove an unused RTL stylesheet.

Bug Fixes:

  • Fix CSS bundler import paths to correctly reference Bootstrap and third-party assets.

Enhancements:

  • Add RTL-specific styles for card-collapse arrows, form select components, clear icons, and pagination arrows.
  • Update CSS bundler imports in bundle.min.css and bundle.rtl.min.css to reference assets from core/bootstrap/css and lib directories.
  • Update ColorPicker component to load nano.min.css from the lib/pickr directory.

Chores:

  • Remove obsolete wwwroot/css/rtl.css file.

Copilot AI review requested due to automatic review settings September 29, 2025 02:25
@bb-auto bb-auto bot added the enhancement New feature or request label Sep 29, 2025
@bb-auto bb-auto bot added this to the 9.10.0 milestone Sep 29, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 29, 2025

Reviewer's Guide

This PR overhauls CSS bundling by updating import paths, enhancing RTL-specific styles, correcting the Pickr theme asset link, and removing an obsolete RTL stylesheet.

ER diagram for CSS asset file changes

erDiagram
BOOTSTRAP_BLAZOR_BUNDLE_MIN_CSS {
  string bootstrap_core_path
  string animate_path
  string swal_path
}
BOOTSTRAP_BLAZOR_BUNDLE_RTL_MIN_CSS {
  string bootstrap_core_rtl_path
  string animate_path
  string swal_path
}
BOOTSTRAP_BLAZOR_BUNDLE_MIN_CSS ||--|| BOOTSTRAP_BLAZOR_BUNDLE_RTL_MIN_CSS : shares_structure
Loading

Class diagram for updated CSS asset imports in bundler

classDiagram
class "bootstrap.blazor.bundle.min.css" {
  +@import url('../core/bootstrap/css/bootstrap.min.css')
  +@import url('bootstrapblazor.min.css')
  +@import url('../lib/animate/animate.min.css')
  +@import url('../lib/swal/sweetalert2.min.css')
}
class "bootstrap.blazor.bundle.rtl.min.css" {
  +@import url('../core/bootstrap/css/bootstrap.rtl.min.css')
  +@import url('bootstrapblazor.min.css')
  +@import url('../lib/animate/animate.min.css')
  +@import url('../lib/swal/sweetalert2.min.css')
}
class "ColorPicker.razor.js" {
  +addLink("./_content/BootstrapBlazor/lib/pickr/nano.min.css")
}
"bootstrap.blazor.bundle.min.css" <|-- "bootstrap.blazor.bundle.rtl.min.css"
Loading

Flow diagram for RTL-specific style enhancements

flowchart TD
    A["components.scss"] --> B["Add RTL .card-collapse-bar arrow rotation"]
    A --> C["Add RTL .form-select-append left alignment"]
    A --> D["Add RTL .select .clear-icon left alignment"]
    A --> E["Add RTL .pagination arrow rotation for first/last page"]
Loading

File-Level Changes

Change Details Files
Enhanced RTL specific SCSS styles
  • Added arrow rotation for collapsed cards in RTL
  • Adjusted form-select and clear icon positioning to left in RTL
  • Flipped pagination arrows for RTL direction
src/BootstrapBlazor/wwwroot/scss/components.scss
Updated bundled CSS import paths to new directory structure
  • Refactored bootstrap import to core/bootstrap/css path
  • Replaced direct animate and sweetalert2 imports with lib/animate and lib/swal paths
  • Removed redundant rtl.css import
src/BootstrapBlazor/wwwroot/css/bootstrap.blazor.bundle.rtl.min.css
src/BootstrapBlazor/wwwroot/css/bootstrap.blazor.bundle.min.css
Corrected Pickr theme CSS link path
  • Changed nano.min.css import path to ./_content/BootstrapBlazor/lib/pickr/nano.min.css
src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.js
Removed obsolete RTL stylesheet
  • Deleted rtl.css from wwwroot/css
  • Updated project files to remove rtl.css reference
src/BootstrapBlazor/wwwroot/css/rtl.css
src/BootstrapBlazor/BootstrapBlazor.csproj
src/BootstrapBlazor/Directory.Build.targets
.gitignore

Assessment against linked issues

Issue Objective Addressed Explanation
#6803 Update the CSS bundler to use correct and current import paths for dependencies.
#6803 Remove unused or obsolete CSS files from the bundle.
#6803 Ensure that all relevant components and scripts reference the updated CSS paths.

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

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 CSS bundler to consolidate RTL styles and modernize asset management. The main purpose is to move RTL (right-to-left) styles from a separate CSS file into the main SCSS components file and update CSS bundle paths to reference assets directly from their source locations.

  • Consolidation of RTL styles into the main SCSS components file
  • Updated CSS bundle imports to use source paths instead of copied files
  • Simplified build targets and project file configuration

Reviewed Changes

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

Show a summary per file
File Description
components.scss Added RTL-specific styles that were previously in separate CSS file
rtl.css Removed as RTL styles moved to components.scss
bootstrap.blazor.bundle.rtl.min.css Updated import paths to reference source locations
bootstrap.blazor.bundle.min.css Updated import paths to reference source locations
Directory.Build.targets Simplified build process, removed CSS copying tasks
ColorPicker.razor.js Updated CSS path to reference source location
BootstrapBlazor.csproj Updated content exclusions to match new bundling approach

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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 - here's some feedback:

  • Double-check that the updated relative import paths in the bundle CSS files match your deployed folder structure to prevent any missing asset errors.
  • Consider centralizing your asset/library paths (e.g., for the Pickr nano.min.css) into a shared config or constant to reduce hardcoded string duplication across JS and CSS.
  • Ensure the removed rtl.css isn’t referenced elsewhere and that the new inline RTL overrides fully replace its previous styles without creating specificity conflicts.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Double-check that the updated relative import paths in the bundle CSS files match your deployed folder structure to prevent any missing asset errors.
- Consider centralizing your asset/library paths (e.g., for the Pickr nano.min.css) into a shared config or constant to reduce hardcoded string duplication across JS and CSS.
- Ensure the removed rtl.css isn’t referenced elsewhere and that the new inline RTL overrides fully replace its previous styles without creating specificity conflicts.

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.

@ArgoZhang ArgoZhang enabled auto-merge (squash) September 29, 2025 02:26
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #6804   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          739       739           
  Lines        31748     31748           
  Branches      4464      4464           
=========================================
  Hits         31748     31748           
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.

@ArgoZhang ArgoZhang merged commit 2f01d5a into main Sep 29, 2025
7 checks passed
@ArgoZhang ArgoZhang deleted the refactor-css branch September 29, 2025 02:28
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(Bundle): update css bundler

2 participants