Skip to content

Refactor FXIOS-15348 [Technical Debt] [Redux] Use @Copyable macro for RemoteTabsPanelState#34762

Open
hkarmoush wants to merge 2 commits into
mozilla-mobile:mainfrom
hkarmoush:remotetabspanel-copyable-macro
Open

Refactor FXIOS-15348 [Technical Debt] [Redux] Use @Copyable macro for RemoteTabsPanelState#34762
hkarmoush wants to merge 2 commits into
mozilla-mobile:mainfrom
hkarmoush:remotetabspanel-copyable-macro

Conversation

@hkarmoush

@hkarmoush hkarmoush commented Jul 22, 2026

Copy link
Copy Markdown

📜 Tickets

Jira ticket
Github issue

💡 Description

Applies the @Copyable macro (from the ModifiedCopy package) to RemoteTabsPanelState, replacing the reducer's manual full-constructor reconstructions with .copy(...) chains that only touch the fields actually changing in each action handler. This follows the same pattern already established in the codebase (e.g. SearchBarState, HomepageState) and applied most recently to TabPeekState in #34744.

No behavioral change — defaultState(from:) and the existing convenience initializers (init(appState:uuid:), init(windowUUID:)) are left untouched, consistent with how other @Copyable migrations in this codebase handle those.

🎥 Demos

N/A — internal Redux state refactor, no UI change.

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code — existing RemoteTabsPanelTests.swift coverage is unaffected since the memberwise initializer used there is untouched by @Copyable
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver) — N/A
  • If adding telemetry, I read the data stewardship requirements and will request a data review — N/A
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n — N/A
  • If needed, I updated documentation and added comments to complex code — N/A, no new comments needed

FarisArmoush and others added 2 commits July 14, 2026 12:43
The titleLabel in MicrosurveyPromptView was constrained to match the headerView's height, creating a circular dependency that collapsed the label to a single line regardless of numberOfLines=0. Additionally, the headerView's .fillProportionally distribution squeezed the label width inappropriately.

Fixed by:
1. Removing the circular height constraint on titleLabel
2. Changing headerView distribution from .fillProportionally to .fill

This allows the title to wrap naturally and the prompt card to grow to fit its content, especially important for longer survey titles and larger Dynamic Type sizes.
@hkarmoush
hkarmoush requested a review from a team as a code owner July 22, 2026 09:15
@hkarmoush
hkarmoush requested a review from Cramsden July 22, 2026 09:15
@hkarmoush
hkarmoush force-pushed the remotetabspanel-copyable-macro branch from 2b52999 to 6bc411e Compare July 22, 2026 15:42
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