feat(UniverSheet): improving data handling#347
Merged
Conversation
Reviewer's Guide by SourceryThis pull request improves data handling, enhances the plugin system, updates CSS styles, updates the project version, and adds new localization entries to the Sequence diagram for PushDataAsync executionsequenceDiagram
participant RazorComponent as UniverSheet.razor.cs
participant JavaScript as UniverSheet.razor.js
participant DataService as data-service.js
participant Plugin as plugin.js
RazorComponent->>JavaScript: InvokeAsync("execute", Id, data)
activate JavaScript
JavaScript->>DataService: univerSheet.pushData(data)
activate DataService
DataService->>Plugin: _callback(data) // data-service.js
activate Plugin
Plugin-->>DataService: return this.receiveData(data) // plugin.js
deactivate Plugin
DataService-->>JavaScript: return data // data-service.js
deactivate DataService
JavaScript-->>RazorComponent: return data // UniverSheet.razor.js
deactivate JavaScript
Updated class diagram for DefaultPluginclassDiagram
class DefaultPlugin {
- _dataService: DataService
- _sheet: any
+ constructor()
+ onReady(): void
+ install(): void
+ receiveData(payload: any): any
+ setWorkbookData(data: string): void
+ getWorkbookData(): any
}
class DataService {
+ registerUniverSheet(sheet: any): void
}
DefaultPlugin -- DataService: uses
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add Push command logic
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
This pull request includes several changes to the
BootstrapBlazor.UniverSheetcomponent, focusing on improving data handling, enhancing the plugin system, and updating CSS styles. The most important changes include modifying data push methods, enhancing the plugin's data handling capabilities, and updating CSS classes for better styling.Data Handling Improvements:
src/components/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor.cs: ModifiedPushDataAsyncto returnUniverSheetDatainstead ofTaskto handle data more effectively.src/components/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor.js: Updated theexecutefunction to return data frompushDatafor better data flow management.Plugin Enhancements:
src/components/BootstrapBlazor.UniverSheet/wwwroot/plugin.js: Enhanced theDefaultPluginclass to handle workbook data more effectively, including new methodssetWorkbookDataandgetWorkbookData.src/components/BootstrapBlazor.UniverSheet/wwwroot/data-service.js: Modified theregisterUniverSheetmethod to return data from the callback for improved data handling.CSS Updates:
src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/css/univer-sheet.bundle.css: Added new CSS classes for better styling and layout control.src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/css/univerjs.preset-sheets-drawing.css: Updated CSS to include new utility classes for improved UI consistency.Version Update:
src/components/BootstrapBlazor.UniverSheet/BootstrapBlazor.UniverSheet.csproj: Updated the project version from9.0.0-beta01to9.0.0-beta02.Localization Update:
src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/js/univerjs.preset-sheets-core.locales.zh-CN.js: Added new localization entries for better support of Chinese language users.Description
fixes #346
Customer Impact
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Improve data handling in the UniverSheet component by modifying data push methods, enhancing the plugin system, and updating CSS styles. Also, update the project version and add new localization entries.
New Features:
DefaultPluginclass to handle workbook data more effectively, including new methodssetWorkbookDataandgetWorkbookData.