-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(UniverSheet): add UniverSheet component #5463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's Guide by SourceryThis pull request introduces the UniverSheet component to the BootstrapBlazor server application. It includes the core component, a plugin for extending functionality, a data service for handling data exchange, and a controller for managing plugin commands and UI elements. The component is integrated into the application with a new route, localization support, and documentation. Sequence diagram for getting data from BootstrapBlazorsequenceDiagram
participant ReportController
participant DataService
participant UniverSheet
participant univerAPI
ReportController->>DataService: getDataAsync(messageName, commandName)
activate DataService
DataService-->>ReportController: data
deactivate DataService
ReportController->>UniverSheet: univerAPI = getUniverSheet()
ReportController->>univerAPI: getActiveWorkbook()
univerAPI->>univerAPI: getActiveSheet()
univerAPI->>univerAPI: getRange(0, 0, 2, 1)
univerAPI->>univerAPI: setValues(defaultData)
Class diagram for UniverSheets ComponentclassDiagram
class UniverSheets {
ToastService ToastService
Localizer IStringLocalizer
Plugins Dictionary<string, string>
_sheetExcel UniverSheet
_sheetPlugin UniverSheet
+OnReadyAsync() Task
+OnPostDataAsync(UniverSheetData data) Task<UniverSheetData>
+OnPushExcelData() Task
+OnPushPluginData() Task
}
class UniverSheetData {
MessageName string
CommandName string
Data object
}
UniverSheets -- UniverSheetData : Uses
note for UniverSheets "This class represents the UniverSheets component in Blazor."
Class diagram for ReportControllerclassDiagram
class ReportController {
_injector Injector
_commandService ICommandService
_menuManagerService IMenuManagerService
_componentManager ComponentManager
+ReportController(Injector _injector, ICommandService _commandService, IMenuManagerService _menuManagerService, ComponentManager _componentManager)
-_initCommands()
-_registerComponents()
-_initMenus()
-_registerReceiveDataCallback()
+receiveData(data, sheet)
}
ReportController -- Injector : Uses
ReportController -- ICommandService : Uses
ReportController -- IMenuManagerService : Uses
ReportController -- ComponentManager : Uses
note for ReportController "This class manages the ReportPlugin's commands and UI elements."
Class diagram for ReportPluginclassDiagram
class ReportPlugin {
static pluginName string
_injector Injector
+ReportPlugin(Injector _injector)
+onStarting()
+onReady()
+onRendered()
}
ReportPlugin -- Injector : Uses
note for ReportPlugin "This class represents the ReportPlugin for UniverSheet."
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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 - here's some feedback:
Overall Comments:
- Consider adding a screenshot or GIF to the PR to visually demonstrate the new UniverSheet component.
- The controller.js file has a lot of code - consider breaking it up into smaller files.
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
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5463 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 646 646
Lines 29358 29358
Branches 4131 4131
=========================================
Hits 29358 29358 ☔ View full report in Codecov by Sentry. |
add UniverSheet component
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #5462
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
This pull request introduces the UniverSheet component to the BootstrapBlazor server project. It includes the core component, a sample implementation, and a plugin to demonstrate data integration capabilities.
New Features: