-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(Tab): update FullScreen targetId #5996
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 GuideThis pull request refactors the fullscreen invocation mechanism by making the 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.
Pull Request Overview
This PR refactors the fullscreen functionality in several components and services by making the TargetId parameter optional and simplifying related code.
- Updated the FullScreenButton component usage in Tab.razor to remove the TargetId parameter.
- Modified FullScreenServiceExtensions to accept an optional id parameter.
- Removed the GetIdByTabItem helper in Tab.razor.cs and updated unit tests to align with the new API.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTest/Services/FullScreenServiceTest.cs | Updated tests to invoke TestById without passing an ID, reflecting the updated API |
| src/BootstrapBlazor/Extensions/FullScreenServiceExtensions.cs | Changed ToggleById to accept an optional id parameter |
| src/BootstrapBlazor/Components/Tab/Tab.razor.cs | Removed GetIdByTabItem and updated OnFullScreen to call ToggleById with no parameter |
| src/BootstrapBlazor/Components/Tab/Tab.razor | Updated FullScreenButton usage by removing the TargetId parameter |
| src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.scss | Adjusted the fullscreen CSS selector to match modern fullscreen API usage |
Comments suppressed due to low confidence (1)
src/BootstrapBlazor/Components/Tab/Tab.razor.cs:1119
- [nitpick] The 'context' parameter is no longer used in the OnFullScreen method. Consider removing it if it's not required by an interface or external contract to simplify the method signature.
private async Task OnFullScreen(ContextMenuItem item, object? context)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5996 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 670 670
Lines 30624 30620 -4
Branches 4356 4355 -1
=========================================
- Hits 30624 30620 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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:
- The
Tabcomponent's fullscreen buttons will now activate page-level fullscreen, a change from their previous behavior of targeting individual tab elements or the tab container.
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.
Link issues
fixes #5995
Summary By Copilot
This pull request refactors the fullscreen functionality across multiple components and services, simplifying the API by making the
TargetIdparameter optional. Key changes include updates to theFullScreenButtoncomponent, removal of unnecessary methods, and adjustments to unit tests to align with the new API.Fullscreen Functionality Simplifications:
:fullscreenselector inFullScreenButton.razor.scssto remove the:not(:root)pseudo-class, ensuring compatibility with modern fullscreen APIs.TargetIdparameter fromFullScreenButtonusage inTab.razor, simplifying its invocation. [1] [2]FullScreenServiceExtensionsto make theidparameter optional in theToggleByIdmethod, enabling fullscreen toggling without explicitly providing an ID.Code Cleanup:
GetIdByTabItemmethod fromTab.razor.csas it is no longer needed due to the simplified fullscreen handling.OnFullScreenmethod inTab.razor.csby removing the dependency onGetIdByTabItem.Unit Test Updates:
FullScreenServiceTestto reflect the optionalidparameter inToggleById, removing the need to pass a specific ID during testing. [1] [2]Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Simplify fullscreen functionality across Tab and FullScreenButton components by making the target ID optional and removing unnecessary methods
New Features:
Bug Fixes:
Enhancements:
Chores: