-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor NO_TICKET Various improvements #37
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
base: coderabbit_full_base_refactor_no_ticket_various_improvements_pr11
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request adds accessibility identifiers to browser UI components, renames a stack view for clarity, and fixes layout constraints and code structure issues in toolbar components. Changes improve component identifiability and correct layout inconsistencies without altering core functionality. Changes
Poem
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
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.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
firefox-ios/Client/Frontend/Browser/Toolbars/AddressToolbarContainer.swift (1)
444-449: Fix toolbar leading anchor in swiping‑tabs layout.
UsingrightSkeletonAddressBar.trailingAnchorfor the toolbar’s leading edge pushes the toolbar past the right skeleton (offscreen) and can yield an invalid/negative width. The toolbar should sit between the left and right skeletons.🛠️ Proposed fix
- toolbar.leadingAnchor.constraint(equalTo: rightSkeletonAddressBar.trailingAnchor).isActive = true + toolbar.leadingAnchor.constraint(equalTo: leftSkeletonAddressBar.trailingAnchor).isActive = true toolbar.trailingAnchor.constraint(equalTo: rightSkeletonAddressBar.leadingAnchor).isActive = true
🤖 Fix all issues with AI agents
In `@BrowserKit/Sources/ToolbarKit/AddressToolbar/BrowserAddressToolbar.swift`:
- Around line 418-421: The divider visibility currently checks
leadingPageActionStack; update the logic to reflect trailing actions instead:
compute hasPageActions using trailingPageActionStack.arrangedSubviews.isEmpty
and set dividerWidthConstraint?.constant to
uxConfig.browserActionsAddressBarDividerWidth when trailing actions exist
(otherwise 0). Ensure you update the reference to trailingPageActionStack and
leave uxConfig.browserActionsAddressBarDividerWidth and dividerWidthConstraint
usage unchanged.
- Around line 329-333: The stacks array mistakenly includes browserActionStack
twice and omits trailingPageActionStack, so trailing page action views don't get
animated; update the assembly of stacks (the variable created where
browserActionStack.arrangedSubviews + navigationActionStack.arrangedSubviews +
leadingPageActionStack.arrangedSubviews + browserActionStack.arrangedSubviews is
built) to include trailingPageActionStack.arrangedSubviews instead of the
duplicate browserActionStack, ensuring all page action stacks are part of the
animation list used with isAnimationEnabled.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
BrowserKit/Sources/ToolbarKit/AddressToolbar/BrowserAddressToolbar.swiftfirefox-ios/Client/Application/AccessibilityIdentifiers.swiftfirefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swiftfirefox-ios/Client/Frontend/Browser/Toolbars/AddressToolbarContainer.swift
🧰 Additional context used
🧬 Code graph analysis (1)
BrowserKit/Sources/ToolbarKit/AddressToolbar/BrowserAddressToolbar.swift (2)
BrowserKit/Sources/ToolbarKit/NavigationToolbar/BrowserNavigationToolbar.swift (1)
updateActionStack(87-118)firefox-ios/Client/Frontend/Browser/Toolbars/Redux/AddressBarState.swift (1)
trailingPageActions(1087-1124)
🔇 Additional comments (16)
firefox-ios/Client/Frontend/Browser/Toolbars/AddressToolbarContainer.swift (2)
224-235: LGTM: clearer keyboard state naming and guard.
461-477: LGTM: guard early‑exit and constraint setup look good.BrowserKit/Sources/ToolbarKit/AddressToolbar/BrowserAddressToolbar.swift (7)
11-13: Doc-only change.
51-53: LGTM: trailing page action stack initialization.
126-128: LGTM: stack visibility list updated consistently.
193-197: LGTM: trailing page action stack added to container.
215-218: LGTM: zero‑width constraint list updated.
271-278: LGTM: divider and trailing stack constraints updated.
320-323: LGTM: trailing page actions now updated.firefox-ios/Client/Frontend/Browser/BrowserViewController/Views/BrowserViewController.swift (6)
137-139: LGTM: status bar overlay identifier.
149-151: LGTM: header container identifier.
155-157: LGTM: over‑keyboard container identifier.
179-181: LGTM: bottom container identifier.
185-188: LGTM: bottom content stack identifier.
191-193: LGTM: content container identifier.firefox-ios/Client/Application/AccessibilityIdentifiers.swift (1)
67-73: LGTM!The new accessibility identifiers follow the established naming conventions in this file, using the consistent
"Browser.<propertyName>"pattern. The placement directly within theBrowserstruct (rather than inside a nested struct) is appropriate since these are browser-level container elements.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| let stacks = browserActionStack.arrangedSubviews + | ||
| navigationActionStack.arrangedSubviews + | ||
| leadingPageActionStack.arrangedSubviews + | ||
| pageActionStack.arrangedSubviews | ||
| browserActionStack.arrangedSubviews | ||
| let isAnimationEnabled = !UIAccessibility.isReduceMotionEnabled && animated |
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.
Include trailing page actions in animation list.
trailingPageActionStack is omitted and browserActionStack appears twice, so trailing page action buttons can remain at alpha 0 after updates.
🛠️ Proposed fix
let stacks = browserActionStack.arrangedSubviews +
navigationActionStack.arrangedSubviews +
leadingPageActionStack.arrangedSubviews +
- browserActionStack.arrangedSubviews
+ trailingPageActionStack.arrangedSubviews📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| let stacks = browserActionStack.arrangedSubviews + | |
| navigationActionStack.arrangedSubviews + | |
| leadingPageActionStack.arrangedSubviews + | |
| pageActionStack.arrangedSubviews | |
| browserActionStack.arrangedSubviews | |
| let isAnimationEnabled = !UIAccessibility.isReduceMotionEnabled && animated | |
| let stacks = browserActionStack.arrangedSubviews + | |
| navigationActionStack.arrangedSubviews + | |
| leadingPageActionStack.arrangedSubviews + | |
| trailingPageActionStack.arrangedSubviews | |
| let isAnimationEnabled = !UIAccessibility.isReduceMotionEnabled && animated |
🤖 Prompt for AI Agents
In `@BrowserKit/Sources/ToolbarKit/AddressToolbar/BrowserAddressToolbar.swift`
around lines 329 - 333, The stacks array mistakenly includes browserActionStack
twice and omits trailingPageActionStack, so trailing page action views don't get
animated; update the assembly of stacks (the variable created where
browserActionStack.arrangedSubviews + navigationActionStack.arrangedSubviews +
leadingPageActionStack.arrangedSubviews + browserActionStack.arrangedSubviews is
built) to include trailingPageActionStack.arrangedSubviews instead of the
duplicate browserActionStack, ensuring all page action stacks are part of the
animation list used with isAnimationEnabled.
| // Page action spacing | ||
| let hasPageActions = !pageActionStack.arrangedSubviews.isEmpty | ||
| let hasPageActions = !leadingPageActionStack.arrangedSubviews.isEmpty | ||
| dividerWidthConstraint?.constant = hasPageActions ? uxConfig.browserActionsAddressBarDividerWidth : 0 | ||
| } |
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.
Divider visibility should follow trailing page actions.
The divider sits between the location view and the trailing page action stack, so it should reflect whether trailing actions exist.
🛠️ Proposed fix
- let hasPageActions = !leadingPageActionStack.arrangedSubviews.isEmpty
+ let hasPageActions = !trailingPageActionStack.arrangedSubviews.isEmpty
dividerWidthConstraint?.constant = hasPageActions ? uxConfig.browserActionsAddressBarDividerWidth : 0🤖 Prompt for AI Agents
In `@BrowserKit/Sources/ToolbarKit/AddressToolbar/BrowserAddressToolbar.swift`
around lines 418 - 421, The divider visibility currently checks
leadingPageActionStack; update the logic to reflect trailing actions instead:
compute hasPageActions using trailingPageActionStack.arrangedSubviews.isEmpty
and set dividerWidthConstraint?.constant to
uxConfig.browserActionsAddressBarDividerWidth when trailing actions exist
(otherwise 0). Ensure you update the reference to trailingPageActionStack and
leave uxConfig.browserActionsAddressBarDividerWidth and dividerWidthConstraint
usage unchanged.
Benchmark PR from agentic-review-benchmarks#11
Summary by CodeRabbit
Chores
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.