autocomplete: Use directional alignment for autocomplete results#2070
autocomplete: Use directional alignment for autocomplete results#2070gnprice merged 1 commit intozulip:mainfrom
Conversation
|
Thanks, @yash-agarwa-l! I don't see a difference between the "before" and "after" screenshots. That doesn't mean it's a bad change (certainly it seems more correct to use |
|
Thanks! The likely reason is because the width of autocomplete dropdown spans the full screen width. |
|
Thanks! For verifying the effect on behavior, what happens if the screen is much wider? Perhaps that would cause the behavior to differ, by making the input wider than the autocomplete popup is. For users in real life, the most likely way that would happen is if they're using a tablet. For testing, an often very convenient way to test layout behavior on different screen sizes and shapes is to run a desktop build of the app, either Linux or macOS. (See the "Desktop support" section in the README.) |
Use AlignmentDirectional.bottomStart instead of Alignment.bottomLeft for the autocomplete dropdown positioning. This ensures the dropdown alignment respects text direction in RTL layouts. This doesn't currently cause any change in user-visible behavior, because the autocomplete popup has the same width as the text input and so both the left and right edges are already aligned. Fixes the issue described here: zulip#1991 (comment)
|
OK. Thanks for the thorough testing! I believe this change would be the right version if we do in the future have the autocomplete popup be sometimes narrower than the input. So I'll go ahead and merge, with an added note in the commit message: |
39024b1 to
b2a1cd9
Compare


Use AlignmentDirectional.bottomStart instead of Alignment.bottomLeft for the autocomplete dropdown positioning. This ensures the dropdown alignment respects text direction in RTL layouts.
The autocomplete dropdown spans the full available width, so Align has no extra space to reposition it—making bottomStart vs bottomLeft visually identical despite the directional correctness fix.
Fixes the issue described here:
#1991 (comment)
Before
LTR
RTL
After
LTR
RTL