Skip to content

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Apr 29, 2025

Link issues

fixes #5914

Summary By Copilot

This pull request focuses on renaming the LayoutSplitebar component to LayoutSplitBar across the codebase to correct a spelling error and improve consistency. It includes updates to component names, properties, CSS classes, localization keys, and test cases. Additionally, a deprecated property (ShowSplitebar) has been marked obsolete in favor of the corrected ShowSplitBar.

Component Renaming and Updates:

  • Renamed the LayoutSplitebar component to LayoutSplitBar in all related files, including .razor, .razor.cs, .razor.js, and .razor.scss. Updated associated CSS classes and JavaScript references [1] [2] [3] [4] [5] [6] [7].
  • Updated the SCSS theme file to reflect the new naming convention for hover and drag styles ($bb-split-bar-body-hover-bg and $bb-split-bar-body-drag-hover-bg).
  • Adjusted imports in components.scss to reference the renamed SCSS file.

Property and Localization Key Changes:

  • Replaced the ShowSplitebar property with ShowSplitBar in the Layout component and marked ShowSplitebar as obsolete with a deprecation warning.
  • Updated localization keys in en-US.json and zh-CN.json to use ShowSplitBar instead of ShowSplitebar [1] [2].

Test Updates:

  • Renamed test cases and updated assertions to reflect the new component and property names (LayoutSplitBar and ShowSplitBar) [1] [2].

Codebase-Wide Usage Updates:

  • Replaced all occurrences of LayoutSplitebar with LayoutSplitBar in Razor files, including MainLayout.razor and TutorialsLayout.razor [1] [2].
  • Updated attribute definitions in Layouts.razor.cs to reflect the corrected property name.

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

Rename the LayoutSplitebar component to LayoutSplitBar to correct a typo.

Enhancements:

  • Update all references to the component, including class names, file names, CSS classes, SCSS variables, and JavaScript selectors.
  • Mark the old ShowSplitebar property in the Layout component as obsolete and introduce the correctly spelled ShowSplitBar property.
  • Update localization keys related to the renamed property description.

@ArgoZhang ArgoZhang requested a review from Copilot April 29, 2025 02:28
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 29, 2025

Reviewer's Guide by Sourcery

This pull request renames the LayoutSplitebar component to LayoutSplitBar to correct a spelling error. This change involves updating component files, properties, CSS classes, localization keys, and test cases across the codebase.

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

File-Level Changes

Change Details Files
Renamed the LayoutSplitebar component and its related files to correct a spelling error.
  • Renamed component source files (.razor, .razor.cs, .razor.js, .razor.scss).
  • Updated the component's internal name and metadata references.
src/BootstrapBlazor/Components/Layout/LayoutSplitebar.razor.scss
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.scss
src/BootstrapBlazor/Components/Layout/LayoutSplitebar.razor
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor
src/BootstrapBlazor/Components/Layout/LayoutSplitebar.razor.js
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.js
src/BootstrapBlazor/Components/Layout/LayoutSplitebar.razor.cs
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs
Updated CSS classes and SCSS variables to align with the new component name.
  • Renamed CSS class selectors used by the component.
  • Updated SCSS variable names for hover and drag styles.
  • Corrected the SCSS import path.
src/BootstrapBlazor/Components/Layout/LayoutSplitebar.razor.scss
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.scss
src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss
src/BootstrapBlazor/wwwroot/scss/components.scss
Renamed the ShowSplitebar property to ShowSplitBar and managed deprecation.
  • Introduced a new ShowSplitBar boolean property.
  • Marked the old ShowSplitebar property as obsolete with a deprecation message.
  • Updated the component's rendering logic and attribute definition to use the new property name.
src/BootstrapBlazor/Components/Layout/Layout.razor.cs
src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.cs
src/BootstrapBlazor/Components/Layout/Layout.razor
Updated component and property usage in test cases and application layouts.
  • Renamed test classes and methods related to the component.
  • Updated component tags and property references in layout files.
  • Adjusted test assertions to match the new names.
test/UnitTest/Components/LayoutSplitebarTest.cs
test/UnitTest/Components/LayoutSplitBarTest.cs
test/UnitTest/Components/LayoutTest.cs
src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor
src/BootstrapBlazor.Server/Components/Layout/TutorialsLayout.razor
Updated localization keys for the renamed property.
  • Renamed localization keys in English and Chinese resource files.
src/BootstrapBlazor.Server/Locales/en-US.json
src/BootstrapBlazor.Server/Locales/zh-CN.json

Assessment against linked issues

Issue Objective Addressed Explanation

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

@bb-auto bb-auto bot added the enhancement New feature or request label Apr 29, 2025
@bb-auto bb-auto bot added this to the v9.5.0 milestone Apr 29, 2025
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 renames the LayoutSplitebar component to LayoutSplitBar to correct a spelling mistake and ensure naming consistency across the codebase.

  • Renames component classes, file names, and related properties.
  • Updates test cases, JavaScript log messages, and localization keys to use the corrected naming.
  • Marks the deprecated property ShowSplitebar with an Obsolete attribute.

Reviewed Changes

Copilot reviewed 10 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/UnitTest/Components/LayoutTest.cs Updated test case naming and assertions to reflect the new property/component name.
test/UnitTest/Components/LayoutSplitebarTest.cs Renamed test class and method for consistency.
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.js Updated log messages and query selectors to use the new class names.
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs Renamed the component class to LayoutSplitBar.
src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor Updated Razor markup and module auto-loader attribute.
src/BootstrapBlazor/Components/Layout/Layout.razor.cs Updated properties from ShowSplitebar to ShowSplitBar and marked the obsolete one.
src/BootstrapBlazor/Components/Layout/Layout.razor Updated usage of the deprecated component and property.
src/BootstrapBlazor.Server/Components/Samples/Layouts.razor.cs Revised attribute definitions to use ShowSplitBar.
src/BootstrapBlazor.Server/Components/Layout/TutorialsLayout.razor Updated component usage to the new name.
src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor Updated component usage to the new name.
Files not reviewed (5)
  • src/BootstrapBlazor.Server/Locales/en-US.json: Language not supported
  • src/BootstrapBlazor.Server/Locales/zh-CN.json: Language not supported
  • src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.scss: Language not supported
  • src/BootstrapBlazor/wwwroot/scss/components.scss: Language not supported
  • src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss: Language not supported

sourcery-ai[bot]
sourcery-ai bot previously approved these changes Apr 29, 2025
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 @ArgoZhang - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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 Apr 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b7759e7) to head (7309f65).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #5915   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          665       665           
  Lines        30485     30485           
  Branches      4345      4345           
=========================================
  Hits         30485     30485           

☔ 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 43cbd10 into main Apr 29, 2025
3 checks passed
@ArgoZhang ArgoZhang deleted the refactor-layout branch April 29, 2025 02:33
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(LayoutSpitBar): rename LayoutSplitBar component name

2 participants