-
Notifications
You must be signed in to change notification settings - Fork 349
all_channels: Replace three dot menu with long press gesture and add on tap to feed #1915
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,11 +5,13 @@ import '../api/route/channels.dart'; | |
| import '../generated/l10n/zulip_localizations.dart'; | ||
| import '../log.dart'; | ||
| import '../model/channel.dart'; | ||
| import '../model/narrow.dart'; | ||
| import 'action_sheet.dart'; | ||
| import 'actions.dart'; | ||
| import 'app_bar.dart'; | ||
| import 'button.dart'; | ||
| import 'icons.dart'; | ||
| import 'message_list.dart'; | ||
| import 'page.dart'; | ||
| import 'remote_settings.dart'; | ||
| import 'store.dart'; | ||
|
|
@@ -96,28 +98,30 @@ class AllChannelsListEntry extends StatelessWidget { | |
| final Subscription? subscription = channel is Subscription ? channel : null; | ||
| final hasContentAccess = store.selfHasContentAccess(channel); | ||
|
|
||
| return Padding( | ||
| padding: EdgeInsetsDirectional.only(start: 8, end: 4), | ||
| child: Row(spacing: 6, children: [ | ||
| Icon( | ||
| size: 20, | ||
| color: colorSwatchFor(context, subscription).iconOnPlainBackground, | ||
| iconDataForStream(channel)), | ||
| Expanded( | ||
| child: Text( | ||
| style: TextStyle( | ||
| color: designVariables.textMessage, | ||
| fontSize: 17, | ||
| height: 20 / 17, | ||
| ).merge(weightVariableTextStyle(context, wght: 600)), | ||
| channel.name)), | ||
| if (hasContentAccess) _SubscribeToggle(channel: channel), | ||
| ZulipIconButton( | ||
| icon: ZulipIcons.more_horizontal, | ||
| onPressed: () { | ||
| showChannelActionSheet(context, channelId: channel.streamId); | ||
| }), | ||
| ])); | ||
| return InkWell( | ||
| onTap: !hasContentAccess ? null : () => Navigator.push(context, | ||
| MessageListPage.buildRoute(context: context, | ||
| narrow: ChannelNarrow(channel.streamId))), | ||
| onLongPress: () => showChannelActionSheet(context, channelId: channel.streamId), | ||
| child: ConstrainedBox(constraints: const BoxConstraints(minHeight: 44), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. commit-sequence nit: Did the removal of the three-dots button make these rows shorter than they had been? If so, then this commit adding the 44px min-height should go before the commit that removes the three-dots button. That way we don't have an intermediate state where the UI is less good in some ways than it was before. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, reordering the commits. |
||
| child: Padding(padding: const EdgeInsetsDirectional.only(start: 8, end: 12), | ||
| child: Row(spacing: 6, children: [ | ||
| Icon( | ||
| size: 20, | ||
| color: colorSwatchFor(context, subscription).iconOnPlainBackground, | ||
| iconDataForStream(channel)), | ||
| Expanded( | ||
| child: Text( | ||
| maxLines: 1, | ||
| overflow: TextOverflow.ellipsis, | ||
chungwwei marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| style: TextStyle( | ||
| color: designVariables.textMessage, | ||
| fontSize: 17, | ||
| height: 20 / 17, | ||
| ).merge(weightVariableTextStyle(context, wght: 600)), | ||
| channel.name)), | ||
| if (hasContentAccess) _SubscribeToggle(channel: channel), | ||
| ])))); | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.