-
Notifications
You must be signed in to change notification settings - Fork 358
msglist: Use directional positioning for unread marker in RTL #1991
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
Conversation
chrisbobbe
left a 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.
Thanks! Small comments below.
Also:
- Please say
Fixes #1245.in the commit message. For examples, use Greg's "secret" to usinggit log -p. - Please also post screenshots of what it looks like before this change, so we can see clearly the improvement being made. 🙂
lib/widgets/message_list.dart
Outdated
| } | ||
| } | ||
|
|
||
|
|
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.
Same here.
lib/widgets/message_list.dart
Outdated
| )), | ||
| ), | ||
| ), | ||
| ), | ||
| ), | ||
| ], | ||
| ); |
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.
This code-style change is unrelated and unhelpful; please remove it.
b28320e to
8cd3ad5
Compare
|
Thank you for the feedback. |
|
Bump on this part:
|
8cd3ad5 to
ff6061b
Compare
|
Thank You, I've updated the commit and pushed the revision. |
|
Please write it according to the project style; the |
ff6061b to
df5ae40
Compare
|
Thanks for the clarification, updated. |
|
Thanks! Marked for Greg's review. |
gnprice
left a 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.
Thanks @yash-agarwa-l for taking care of this, and thanks @chrisbobbe for the previous reviews!
Those before/after screenshots in particular are very helpful, thanks. It's especially helpful that they're very clean — the before and after differ only in the one way that's relevant.
This looks good; merging. One commit-message nit which I'll fix up:
- msglist: Use directional positioning for unread marker in RTL.
+ msglist: Use directional positioning for unread marker in RTL
In this repo we don't use a trailing period on the summary line of a commit message.
df5ae40 to
49d6226
Compare
|
I also just did a quick audit with I found 4 of them:
child: UnconstrainedBox(
alignment: Alignment.centerLeft,
child: Padding(
// TODO clean up this padding by imitating web less precisely;
// in particular, avoid adding loose whitespace at end of message.
padding: const EdgeInsets.only(right: 5, bottom: 5),
@yash-agarwa-l if you're looking for more issues to work on for contributing to Zulip, I think those would be a good list to pick up while this area is fresh in your mind from doing this issue. I'd suggest going in the order listed above — the quotes in particular I would guess look pretty wrong right now. And then a key element in a PR for any of these will be to post good before/after screenshots that clearly show the change, just like you did on this PR. |
|
Thanks so much for the review, the merge, and especially for auditing the code for these related RTL issues! I'm really happy contributing to Zulip. I'll start working through that list, beginning with the block quotations (Quotation widget), and will keep all your feedback in mind for the new PR. |
Fixes #1245
This PR corrects the unread-marker alignment in RTL layouts.
Problem:
_UnreadMarker used LTR-specific properties (left: 0, Border(left: …)), causing the unread marker to always appear on the left, even for RTL languages like Arabic.
Fix
Therefore Replaced LTR-specific properties with directional equivalents:
PositionedDirectional(start: 0)
BorderDirectional(start: BorderSide(...))
This ensures the unread marker appears on the correct “start” side based on text direction.
Manually tested by setting:
locale: Locale('ar')
Verified correct behavior in both LTR and RTL layouts (screenshots included).
Before
LTR
RTL
After
LTR
RTL