Skip to content

feat(UniverSheet): bump version 9.0.0#392

Merged
ArgoZhang merged 4 commits intomasterfrom
feat-univerSheet
Mar 28, 2025
Merged

feat(UniverSheet): bump version 9.0.0#392
ArgoZhang merged 4 commits intomasterfrom
feat-univerSheet

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Mar 28, 2025

Link issues

fixes #391

Summary By Copilot

This pull request includes changes to the BootstrapBlazor.UniverSheet component, focusing on version updates, localization improvements, and enhancements to the createUniverSheetAsync function.

Version Update:

  • Updated the version in src/components/BootstrapBlazor.UniverSheet/BootstrapBlazor.UniverSheet.csproj from 9.0.0-beta09 to 9.0.0.

Localization Improvements:

  • Replaced the localized content in src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/js/univerjs.preset-sheets-core.locales.zh-CN.js with an updated version to improve translations and add missing entries.

Function Enhancements:

  • Modified the createUniverSheetAsync function in src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js to use optional chaining for theme and locale options, improving default handling.
  • Updated the same function to handle data more robustly by parsing and merging templates with custom data.

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

Bump version of BootstrapBlazor.UniverSheet to 9.0.0, including localization improvements and minor updates to the UniverSheet component

New Features:

  • Added new localization entries for right-click menu options in the sheets UI

Enhancements:

  • Updated version number from 9.0.0-beta09 to 9.0.0
  • Improved Chinese localization for UniverSheet component

@ArgoZhang ArgoZhang requested a review from Copilot March 28, 2025 01:51
@bb-auto bb-auto Bot added the enhancement New feature or request label Mar 28, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Mar 28, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Mar 28, 2025

Reviewer's Guide by Sourcery

This pull request updates the BootstrapBlazor.UniverSheet component to version 9.0.0. It includes localization improvements for the Chinese language, enhancements to the UniverSheet creation function, and CSS updates.

Updated class diagram for BootstrapBlazor.UniverSheet

classDiagram
  class BootstrapBlazor.UniverSheet {
    +string Version = "9.0.0"
  }
Loading

File-Level Changes

Change Details Files
Version was bumped to 9.0.0.
  • Updated the project file to reflect the stable release version.
src/components/BootstrapBlazor.UniverSheet/BootstrapBlazor.UniverSheet.csproj
Localization was improved for the Chinese language.
  • Updated the Chinese locale file with improved translations.
  • Added missing entries to the Chinese locale file.
src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/js/univerjs.preset-sheets-core.locales.zh-CN.js
The UniverSheet creation function was enhanced.
  • Implemented optional chaining for theme and locale options to improve default handling.
  • Improved data handling by parsing and merging templates with custom data.
src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js
CSS was updated.
  • Updated the CSS file.
src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/css/univerjs.preset-sheets-core.css

Assessment against linked issues

Issue Objective Addressed Explanation

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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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
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 UniverSheet version to 9.0.0 while improving localization and enhancing the createUniverSheetAsync function.

  • Updated the version in the csproj file.
  • Revised the localized zh-CN file with updated translations.
  • Modified createUniverSheetAsync to use optional chaining for theme/locale options and to merge template data.

Reviewed Changes

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

File Description
src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/js/univerjs.preset-sheets-core.locales.zh-CN.js Updated localization translations for zh-CN locale.
src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js Improved optional chaining and enhanced data handling in createUniverSheetAsync.
Files not reviewed (1)
  • src/components/BootstrapBlazor.UniverSheet/BootstrapBlazor.UniverSheet.csproj: Language not supported
Comments suppressed due to low confidence (2)

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js:73

  • The nested destructuring here extracts only the inner 'data' property from sheet.options.data, potentially discarding associated properties (like template) from the original object. Consider using a temporary variable (e.g., 'const dataObj = sheet.options.data || {}') to preserve the entire structure before extracting individual properties.
const { data: { data } = {} } = sheet.options;

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js:38

  • [nitpick] There is an inconsistency between the property name 'lang' used in sheet.options and the default key 'locale'. For clarity and consistency, consider aligning the naming (for example, use 'locale' instead of 'lang').
locale: sheet.options.lang ?? LocaleType.ZH_CN,

@ArgoZhang ArgoZhang merged commit 8bc4ce3 into master Mar 28, 2025
1 check passed
@ArgoZhang ArgoZhang deleted the feat-univerSheet branch March 28, 2025 01:52
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(UniverSheet): bump version 9.0.0

3 participants