Repository navigation
fix(sessions): harden DataSaverToggle with cn styling, testids & comprehensive unit tests - #7136
Merged
github-actions[bot] merged 2 commits intoNov 1, 2026
Conversation
…, keyboard-accessible overlay controls, testids & unit tests (fixes SatyamPandey-07#7133)
…rehensive unit tests (fixes SatyamPandey-07#7135)
|
@saisarans2007 is attempting to deploy a commit to the pandeysatyam1802-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
🎉 Thank you for contributing to WorkSphere!
💡 Connect & Support:
|
|
🚀 Auto-merge complete! This pull request is linked to issue(s) #7135 and has been automatically squash-merged into Thank you for contributing to WorkSphere! ✨ |
Closed
4 tasks
7 of 10 tasks
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 1, 2026
… reveal overlay controls on touch devices (closes #7133) (#7137) …reveal overlay controls on touch devices - Hide the viewer stage via a class instead of unmounting it, so the video keeps its srcObject after Show Stage (previously blank) and an active PiP window is not torn down - Reveal the quality/crop overlay on hover-less (touch) devices, not only on hover/focus - Drop the unused requestPip destructure flagged by eslint - Add regression tests for video/stream persistence across Hide/Show Stage, PiP availability while hidden, and the touch overlay class Closes #7133 ## Description Completes #7133. Part of this issue landed in #7136 (linked to #7135), but that implementation unmounts the stage on **Hide Stage**. Because the `srcObject` effect only re-runs when `activeStream` changes, the remounted `<video>` comes back **blank** after **Show Stage**, and any active PiP window is torn down. The overlay controls are also still invisible on touch devices. Changes: 1. **Hide Stage keeps the stage mounted** — hidden via `hidden` class (viewer only), so the same `<video>` keeps its stream and PiP keeps working. 2. **Touch support** — overlay controls get `[@media(hover:none)]:opacity-100`, completing the "not hover-only" acceptance criterion. 3. Removed the unused `requestPip` destructure (eslint warning under the zero-warning lint-staged hook). 4. **Tests** — updated the Hide/Show Stage test and added regression tests: same video element + `srcObject` preserved across Hide → Show, PiP button available while hidden, touch overlay class. The new tests fail on current `main` (4 failures) and pass with this change. ## Related Issue Closes #7133 ## Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules ### Verification - lint-staged `eslint --max-warnings=0` ✅ - `npx tsc --noEmit` — no errors in changed files (pre-existing errors elsewhere on `main`) - `npm test` — session suites 38/38 ✅ - `npm run build` ✅ ## Breaking Changes - [ ] Yes - [x] No --- Co-authored-by: SatyamPandey-07 <186389297+SatyamPandey-07@users.noreply.github.com> Co-authored-by: Satyam Pandey <satyam53@tsecol.onmicrosoft.com>
1 of 7 tasks
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.
Summary of Changes
cn:cn(...)from@/lib/utilsfor consistent class merging on both container and switch button.DataSaverTogglePropsinterface with optional"data-testid"andclassName.DataSaverToggle.data-testidhooks on root container (data-saver-toggle), switch button (data-saver-toggle-button), and status label (data-saver-status).src/__tests__/components/sessions/DataSaverToggle.test.tsx(6 tests) verifying:onChangecallback execution.enabledprop handling and synchronization.estimatedSavedMBprop rendering.classNameanddata-testidpropagation viacn().Closes #7135