Skip to content
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

msglist: Vertical message-unread marker should be "start"-positioned, not "left" #1245

Open
chrisbobbe opened this issue Jan 2, 2025 · 0 comments
Labels
a-i18n Translation, localization, internationalization a-msglist The message-list screen, except what's label:a-content
Milestone

Comments

@chrisbobbe
Copy link
Collaborator

#77 (comment) :

If in the future we find areas where our layout doesn't behave properly in RTL, we can open specific issues for those.

/// Widget responsible for showing the read status of a message.
class _UnreadMarker extends StatelessWidget {
  const _UnreadMarker({required this.isRead, required this.child});

  final bool isRead;
  final Widget child;

  @override
  Widget build(BuildContext context) {
    final messageListTheme = MessageListTheme.of(context);
    return Stack(
      children: [
        child,
        Positioned(
          top: 0,
          left: 0,
          bottom: 0,
          width: 4,
          child: AnimatedOpacity(
            opacity: isRead ? 0 : 1,
            // Web uses 2s and 0.3s durations, and a CSS ease-out curve.
            // See zulip:web/styles/message_row.css .
            duration: Duration(milliseconds: isRead ? 2000 : 300),
            curve: Curves.easeOut,
            child: DecoratedBox(
              decoration: BoxDecoration(
                color: messageListTheme.unreadMarker,
                border: Border(left: BorderSide(
                  width: 1,
                  color: messageListTheme.unreadMarkerGap)))))),
      ]);
  }
}
@chrisbobbe chrisbobbe added a-msglist The message-list screen, except what's label:a-content a-i18n Translation, localization, internationalization labels Jan 2, 2025
@chrisbobbe chrisbobbe added this to the M7: Future milestone Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-i18n Translation, localization, internationalization a-msglist The message-list screen, except what's label:a-content
Projects
Status: No status
Development

No branches or pull requests

1 participant