Skip to content

Conversation

chrisbobbe
Copy link
Collaborator

@chrisbobbe chrisbobbe commented Sep 27, 2025

Fixes #1533.


Outdated screenshots; working on new ones…
Channel Topic
image image
image image
Light (general chat) Dark (general chat)
image image
Globe, short letter Globe, tall letter
image image
image image
Hash, short letter Hash, tall letter
image image
image image
Lock, short letter Lock, tall letter
image image
image image
Long topic (light) Long topic (dark)
image image
Unknown channel Unknown channel, with topic
image image

@chrisbobbe chrisbobbe added the maintainer review PR ready for review by Zulip maintainers label Sep 27, 2025
@chrisbobbe chrisbobbe force-pushed the pr-channel-topic-action-sheet-headers branch from 7f6a80d to 96b3eba Compare September 27, 2025 01:32
Copy link
Member

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chrisbobbe! LGTM, and tests great. Moving over to Greg's review.

@rajveermalviya rajveermalviya added integration review Added by maintainers when PR may be ready for integration and removed maintainer review PR ready for review by Zulip maintainers labels Sep 30, 2025
Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Small code comments below.

I feel like we might want to include the channel name/icon when showing the topic, too. Consider the case of the combined feed or another interleaved view.

Which reminds me: this should get UX review from Alya (if it hasn't already in a chat thread).

];

_showActionSheet(pageContext, buttonSections: buttonSections);
Widget header;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add final

Comment on lines 844 to 847
header = BottomSheetHeader(
buildTitle: (baseStyle) => Text(
style: baseStyle.copyWith(fontStyle: FontStyle.italic),
store.realmEmptyTopicDisplayName));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

action_sheet: Show topic in topic action sheet

Fixes #1533.

This excludes the channel description for now; that'll be more
complicated to implement, involving #488.

That last bit belongs in the commit message for the channel action sheet, right?

Let's also track that follow-up somewhere — either explicitly in #488, or as its own small issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure: #1896

@alya
Copy link
Collaborator

alya commented Oct 2, 2025

Hmm, we don't show the channel name in topic menus in the web app, but you can seem more context around the menu there. Including the name of the channel makes sense to me for mobile.

@alya
Copy link
Collaborator

alya commented Oct 2, 2025

Looks good to me otherwise!

@chrisbobbe chrisbobbe force-pushed the pr-channel-topic-action-sheet-headers branch from 96b3eba to 09bfe18 Compare October 7, 2025 19:39
@chrisbobbe
Copy link
Collaborator Author

Thanks for the reviews! Revision pushed @alya, this time including the channel name in the topic action sheet too. I've also subtly adjusted the size and alignment of the channel icon; PTAL at that.

Greg commented that the line height looks too small when the topic wraps onto a second line. I kind of agree, but it looks just right to me in the common case where it doesn't wrap; in that case I think it might look awkward to add extra space above or below the line.

Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The new InlineIconGeometryData and iconWidgetData are interesting.

In the screenshots, the hash icon looks a bit low to me.

Comment on lines 577 to 580
ZulipIcons.hash_sign: InlineIconGeometryData._(
sizeFactor: 0.8,
alphabeticBaselineFactor: 1 / 8,
paddingFactor: 1 / 5),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting!

Are there other places we should be using these values? The recipient headers, and message-list app bars, come to mind.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree! I think we can use it basically anywhere we have a channel name with its icon.

channelTopicLabelSpan in its current form isn't ready to be used in recipient headers, but maybe with adjustments. The channel name and topic need to have separate gesture handling, the chevron-right icon needs to be a different color than the text, and ideally we'd do something smart when there's a really long channel name but we still want to show the topic (or at least part of it, if it's long too).

Comment on lines 554 to 556
/// How much padding should separate the icon from surrounding text,
/// as a fraction of the text's font size.
final double paddingFactor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Horizontal padding, right? Seems good to make explicit.

Comment on lines +560 to +561
required this.alphabeticBaselineFactor,
required this.paddingFactor,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the baseline factor ends up getting interpreted compounded with the size factor, but the padding factor doesn't.

Is there a motivation for that difference? Seems like it'd be easy to get confused about. It might be cleanest to specify both of them the same way (either both relative to the surrounding font size, or both relative to the icon size).

paddingFactor: 0),
};

static InlineIconGeometryData defaultGeometry = InlineIconGeometryData._(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: make private?

Comment on lines 668 to 669
if (channelIcon != null) ...[
iconWidgetSpan(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can skip the ...[, since there's exactly one item inside

@alya
Copy link
Collaborator

alya commented Oct 8, 2025

Side point: #design > unknown channel symbol

@alya
Copy link
Collaborator

alya commented Oct 8, 2025

Greg commented that the line height looks too small when the topic wraps onto a second line. I kind of agree, but it looks just right to me in the common case where it doesn't wrap; in that case I think it might look awkward to add extra space above or below the line.

Yeah, I agree that it looks to tight for 2-line topics, and fine without line-wrapping. Can we just increase the spacing when it wraps?

It might be OK to add a bit of space below for 1-line topics if we have to.

@chrisbobbe
Copy link
Collaborator Author

chrisbobbe commented Oct 9, 2025

Thanks for the reviews! Revision pushed (edit: er, now it's pushed) and here are the new screenshots.

Can we just increase the spacing when it wraps?

Yes, I managed to do this! :)

Screenshots
Light Dark
image image
image image
image image
image image
image image
image image
image image
image image

@chrisbobbe chrisbobbe force-pushed the pr-channel-topic-action-sheet-headers branch from 09bfe18 to c18d1c4 Compare October 9, 2025 00:02
@chrisbobbe
Copy link
Collaborator Author

Ah and screenshots with a lock icon, almost forgot:

Light Dark
image image

@gnprice
Copy link
Member

gnprice commented Oct 9, 2025

Thanks for the revision! The code all looks good to me; I'll hold off a bit on merging to give @alya an opportunity to look at the screenshots.

Perhaps file a follow-up issue for taking advantage of the new icon-geometry data, per #1877 (comment) ?

@chrisbobbe
Copy link
Collaborator Author

Perhaps file a follow-up issue for taking advantage of the new icon-geometry data, per #1877 (comment) ?

Sure: #1906

@alya
Copy link
Collaborator

alya commented Oct 11, 2025

Looks great to me, thanks!

@gnprice gnprice force-pushed the pr-channel-topic-action-sheet-headers branch from c18d1c4 to 3d3b1c1 Compare October 11, 2025 00:47
@gnprice gnprice merged commit 3d3b1c1 into zulip:main Oct 11, 2025
1 check passed
@chrisbobbe chrisbobbe deleted the pr-channel-topic-action-sheet-headers branch October 11, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration review Added by maintainers when PR may be ready for integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show channel/topic at top of channel/topic action sheet

4 participants