Skip to content

Revert "fix(FEC-15083): Add right controls to xs player" - #1199

Merged
valentinStoicaK merged 1 commit into
masterfrom
revert-1198-FEC-15083-player-responsivness-some-player-buttons-are-missing-on-small-player-size
Aug 26, 2026
Merged

Revert "fix(FEC-15083): Add right controls to xs player"#1199
valentinStoicaK merged 1 commit into
masterfrom
revert-1198-FEC-15083-player-responsivness-some-player-buttons-are-missing-on-small-player-size

Conversation

@valentinStoicaK

Copy link
Copy Markdown
Contributor

Reverts #1198

Copilot AI lite review requested due to automatic review settings August 26, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reverts prior changes from #1198, restoring the previous XS-player bottom bar behavior and the prior overflow-controls calculation.

Changes:

  • Remove the extra overflow “buffer” in filterControlsByPriority so overflow controls are computed strictly by width delta.
  • Hide .right-controls in XS player size via SCSS.

Reviewed changes

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

File Description
src/components/bottom-bar/bottom-bar-utils.ts Reverts overflow-controls calculation to remove the extra buffer factor.
src/components/bottom-bar/_bottom-bar.scss Restores XS behavior by hiding the right controls container.
Suppressed comments (1)

src/components/bottom-bar/bottom-bar-utils.ts:12

  • priorityPair is asserted as non-null but can be undefined when lowerPriorityControls contains no groups with length > 1 (or is empty). In that case controlsToRemove[controlsToRemove.length - 1] and priorityPair?.[0] can both be undefined, making the condition true and then priorityPair[1] throws at runtime. Guard priorityPair before indexing it (and drop the non-null assertion).
  const numOfOverflowControls = Math.ceil((currentMinBreakPointWidth - currentBarWidth) / currentControlWidth) || 1;
  const controlsToRemove = lowerPriorityControls.flat().slice(0, numOfOverflowControls);
  const priorityPair: string[] = [...lowerPriorityControls].reverse().find(p => p.length > 1)!;
  if (controlsToRemove[controlsToRemove.length - 1] === priorityPair?.[0]) {
    controlsToRemove.push(priorityPair[1]);

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@valentinStoicaK
valentinStoicaK merged commit 6dcd5e6 into master Aug 26, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants