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

cleanup and improve chat's context menu #2141

Merged
merged 3 commits into from
Apr 5, 2024
Merged

cleanup and improve chat's context menu #2141

merged 3 commits into from
Apr 5, 2024

Conversation

r10s
Copy link
Member

@r10s r10s commented Apr 4, 2024

as discussed before, this PR:

  • adds functions canReply() and canReplyPrivately()
    for consistency and to cleanup code

  • if possible, shows the reaction options in the first row;
    as this is limited to 4 options,
    we have now three default reactions plus "..." there.
    more default reactions will go to the reaction picker, see init "Frequently Used" reactions with defaults #2112;
    this closes faster reactions #2113

  • "buerocratic, dangerous" options go to "more".
    this makes the menu smaller and avoids scrolling
    as it happens even on larger screens.

  • as a side-effect, iOS 12 menu is cleaned up as well

this is how it looks like on iOS 16 (available since iPhone 8):

@r10s r10s force-pushed the r10s/faster-reactions branch 4 times, most recently from 00da3bc to 60a1dc3 Compare April 4, 2024 14:15
@r10s r10s changed the title tweak menu cleanup and improve chat's context menu Apr 4, 2024
@r10s r10s marked this pull request as ready for review April 4, 2024 14:19
@r10s r10s requested a review from zeitschlag April 4, 2024 14:19
@r10s r10s force-pushed the r10s/faster-reactions branch 2 times, most recently from 003b74b to 06120fc Compare April 4, 2024 16:31
@dignifiedquire
Copy link
Member

screenshot is looking great, looking forward to using this

- add functions canReply() and canReplyPrivately()
  for consistency and to cleanup code

- if possible, show the reaction options in the first row;
  as this is limited to 4 options,
  we have now three default reactions plus "..." there.
  more default reactions will go to the reaction picker, see #2112;
  this closes #2113

- "buerocratic, dangerous" options go to "more".
  this makes the menu smaller and avoids scrolling
  as it happens even on larger screens.

- as a side-effect, iOS 12 menu is cleaned up as well
@r10s r10s force-pushed the r10s/faster-reactions branch from 06120fc to b07f197 Compare April 4, 2024 20:28
Copy link
Collaborator

@zeitschlag zeitschlag left a comment

Choose a reason for hiding this comment

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

PR LGTM from a code perspective. Some remarks and suggestions here and there, but that's it.
While testing I came across this and it looked bit weird to me:

Simulator Screenshot - iPhone 15 Pro - 2024-04-05 at 09 25 35

This is a screenshot from the device messages and I'm not sure if this is intended? You know better than me :)

deltachat-ios/Chat/ChatViewController.swift Outdated Show resolved Hide resolved
deltachat-ios/Chat/ChatViewController.swift Outdated Show resolved Hide resolved
}

return UIAction(title: reaction.emoji, image: selectedImage) { [weak self] _ in
let title = sentThisReaction ? (reaction.emoji + "✓") : reaction.emoji
Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding a checkmark to mark the sent reaction is smart!

deltachat-ios/Chat/ChatViewController.swift Outdated Show resolved Hide resolved
@r10s
Copy link
Member Author

r10s commented Apr 5, 2024

This is a screenshot from the device messages and I'm not sure if this is intended? You know better than me :)

no it is not :) good catch!

if a chat cannot be reacted to, we should just not apply preferredElementSize at all. i will do a fix

EDIT: done:

@r10s r10s merged commit 67d2c0f into main Apr 5, 2024
1 check passed
@r10s r10s deleted the r10s/faster-reactions branch April 5, 2024 09:45
@r10s r10s added the enhancement actually in development, user visible enhancement label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement actually in development, user visible enhancement
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

faster reactions
3 participants