Skip to content

feat(translate-selection): improve controls and popup stability#12

Merged
bingran-you merged 7 commits intomasterfrom
fix/on-select-translate-ui
Jan 28, 2026
Merged

feat(translate-selection): improve controls and popup stability#12
bingran-you merged 7 commits intomasterfrom
fix/on-select-translate-ui

Conversation

@thokap
Copy link
Copy Markdown
Contributor

@thokap thokap commented Jan 28, 2026

Summary

  • add translate selection controls (swap/copy) and UI polish
  • allow native select dropdowns to open without focus manager interference
  • prevent selection popup jump by repositioning on resize

Testing

  • Not run (not requested)

…sitioning

- Add 3-column grid layout for swap button between language dropdowns
- Add swap button styling with hover/disabled states
- Change button layout to space-between (Clear left, Copy+Translate right)
- Add actions-right wrapper for grouped buttons
- Fix translate button padding for even spacing
- Increase swap icon size from 16px to 20px with font-weight 600
- Add symmetric padding to header button for hover state breathing room
- Increase button min-width to 85px to fit "Translating..." text
- Swap arrows: font-size 20px → 24px, font-weight 600 → normal
- Header button: margin-left 0 → -8px to align T with label below
The CSS expects colors and tool-toggle to be wrapped in a
.selection-popup-row div for proper flex layout. Without this
wrapper, the CSS rules for same-row display don't apply.

This fixes:
- Colors and highlight/underline toggle now on same row
- Proper flex layout enables correct dropdown positioning
Add 'select' to the whitelist of elements that don't have
preventDefault() called on pointerdown. Without this, clicking
a <select> element blocks the native dropdown from opening.
Adds min-width: 120px to .deeptutor-translate-select to prevent
layout reflow when native <select> dropdowns are first opened.
This stabilizes popup positioning on first interaction.
@thokap thokap changed the title fix: stabilize translate selection popup feat(translate-selection): improve controls and popup stability Jan 28, 2026
@thokap thokap requested a review from bingran-you January 28, 2026 05:30
@bingran-you bingran-you merged commit 2011ce0 into master Jan 28, 2026
2 checks passed
@bingran-you bingran-you deleted the fix/on-select-translate-ui branch January 28, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants