Skip to content

Conversation

@pratik-pc
Copy link
Collaborator

@pratik-pc pratik-pc commented Dec 10, 2025

Currently two consecutive messages are split into two message groups if the user subscribed/unsubscribed between them even if the recipient is same(both message are in same topic).

We move such bookend divider which have same recipient above and below it into the message group itself and prevent it from making two separate message groups. We still show bookend in between two message groups if the message recipient is different.

We use want_subscription_status_divider in message containers to denote if we want subscription divider above the message. Obviously this means want_subscription_status_divider of top most message in a message group is false.

For narrow space, date content has more preference to fit its content than subscription status(subscription text ellipsis).

Fixes: #36905.

How changes were tested:

Screenshots and screen captures:

Before After
Screenshot from 2025-12-15 22-10-31 Screenshot from 2025-12-16 01-34-46
Screenshot from 2025-12-15 21-44-47
Screenshot from 2025-12-16 01-31-21
Narrow window
Only subscription status
Screenshot from 2025-12-16 01-35-54
Only date
Screenshot from 2025-12-15 22-02-00
Both between same message
Screenshot from 2025-12-16 01-33-03
Long divider content
Screenshot from 2025-12-16 01-36-41
Screenshot from 2025-12-16 01-37-08
Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

@pratik-pc pratik-pc force-pushed the issue-36905-put-subscribe-dividers-inside-message-group branch from 64e5a10 to d95318a Compare December 10, 2025 12:39
@pratik-pc pratik-pc force-pushed the issue-36905-put-subscribe-dividers-inside-message-group branch 2 times, most recently from f8b4657 to 6eeb414 Compare December 15, 2025 13:25
Earlier, `subscribed` and `unsubscribed` properties were used in the
individual message(later MessageContainer) level. This was later moved
to MessageGroup type in 568c33f. Message
object was renamed as MessageContainer in
e60f764.
@pratik-pc pratik-pc force-pushed the issue-36905-put-subscribe-dividers-inside-message-group branch 3 times, most recently from 137cb82 to ba74352 Compare December 15, 2025 17:55
@pratik-pc pratik-pc marked this pull request as ready for review December 15, 2025 18:24
@alya
Copy link
Contributor

alya commented Dec 15, 2025

The notice text should not be the same color as message text.

We can try 75% opacity, which looks to be what the date has?

@alya
Copy link
Contributor

alya commented Dec 15, 2025

Let's see how that looks. We may want to do small caps after all, to avoid blending in with message text, if it's not enough to make it feel distinct.

@pratik-pc
Copy link
Collaborator Author

image

@alya This is with 75% opacity for subscription status

Earlier, message groups were split for all subscription markers. What it
means in practice is that even if two messages from same topic were in
succession and a subscription marker was in between these two messages,
they would be forced to split into two separate message groups, even in
topic narrows.

We change this message group splitting based on subscription markers
and only split when message recipients are different. The earlier
subscription markers are now moved inside the message group and render
on the same line as date dividers.
`want_subscription_status_divider` is always false for first message
container in the group and for private messages.

Fixes: zulip#36905.
@pratik-pc pratik-pc force-pushed the issue-36905-put-subscribe-dividers-inside-message-group branch from ba74352 to 5e3924d Compare December 15, 2025 20:07
@alya
Copy link
Contributor

alya commented Dec 15, 2025

Hm, why does it look different from the timestamp? Is that an illusion? FWIF, the inspector also is not identical (dark theme):
Time:
Screenshot 2025-12-15 at 15 19 18

Notice
Screenshot 2025-12-15 at 15 17 33

@alya
Copy link
Contributor

alya commented Dec 15, 2025

Anyway, it would be great if you could post a version with matching just the color of the timestamp vs. matching color and font (both light and dark theme) for discussion in #design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Put subscribed/usubscribed dividers inside message blocks

4 participants