[iOS BottomSheetController] Fix logic that creates/updates the bottomSheetView accessibilityIdentifier#2210
Merged
nodes11 merged 2 commits intomicrosoft:mainfrom Sep 19, 2025
Conversation
joannaquu
reviewed
Sep 18, 2025
Sources/FluentUI_iOS/Components/BottomSheet/BottomSheetController.swift
Outdated
Show resolved
Hide resolved
Contributor
|
I believe these were added for xcuitests, pipelines will catch it but I'd double check locally |
Contributor
Author
|
The BottomSheetControllerTest tests pass with the changes. Updated verification section with this detail. |
joannaquu
approved these changes
Sep 18, 2025
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.
Platforms Impacted
Description of changes
I observed that
bottomSheetView'saccessibilityIdentifierwas incorrect when the sheet entered the expanded state. The root cause is that the methods which append strings to the identifier can be invoked multiple times without checking whether the substring already exists, which leads to the incorrect identifier.Fix:
bottomSheetViewAccessibilityIdentifierForStatethat performs the necessary state checks and returns the correctaccessibilityIdentifierforbottomSheetView.bottomSheetView.accessibilityIdentifierwith a call tobottomSheetViewAccessibilityIdentifierBinary change
NA
Verification
I valided using the debugger that the bottomSheetView accessibilityIdentifier is set correctly for each of the different states.
I validated that the
BottomSheetControllerTestXCUI tests pass with the changes in place.Visual Verification
|
|
|
Pull request checklist
This PR has considered: