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

Support Android 11 Conversation features #1809

Merged
merged 7 commits into from
Aug 30, 2021

Conversation

dkter
Copy link
Contributor

@dkter dkter commented Jul 25, 2020

Resolves the first item in #1722

Screenshots:
Screenshot_20200725-133126
Screenshot_20200725-133145
Screenshot_20200725-133218

Pull Request Checklist

  • Changes has been tested on an Android device or Android emulator with API 21
  • No in-app UI change
  • Pull request is based on the develop branch
  • Pull request updates CHANGES.md
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off

Signed-off-by: David Teresi [email protected]

@BillCarsonFr
Copy link
Member

Hello, thx for the contribution!
Does this PR include the floating bubble feature? that opens a floating chat?

@dkter
Copy link
Contributor Author

dkter commented Aug 5, 2020

@BillCarsonFr No, but it will be possible in the future after this PR. I've begun experimenting with the bubble feature but thought this should go through first.

@johns2s
Copy link

johns2s commented Dec 9, 2020

Any update on this?

@dkter
Copy link
Contributor Author

dkter commented Dec 9, 2020

Any update on this?

It looks like sharing shortcuts have been added to Element since I wrote this PR, so that should probably be taken into account before this is merged (though I won't have time to work on it for at least a couple weeks.)

@bmarty
Copy link
Member

bmarty commented Jan 25, 2021

Android 11 is now properly handled (see #2600 ), this PR should probable be updated after a rebase.

@dkter dkter force-pushed the conversation-features branch 2 times, most recently from 0eb0c77 to d63776d Compare July 4, 2021 03:19
@dkter
Copy link
Contributor Author

dkter commented Jul 4, 2021

Sorry this took so long. I've updated this to work better with the API 30 target and stable Conversations API.

Here are a few other things I changed:

  • Shortcuts (on the home screen, as well as for sharing) are no longer restricted to being favourited rooms only. This is because conversation notifications need to be associated with a shortcut, so shortcuts must be created for all rooms. I've replaced this with a ranking where favourited rooms are ranked higher than normal or low-priority rooms (so they will be prioritized to appear on the home screen, for example).
  • I'm making sure the shortcut icon is cropped to a square because otherwise it doesn't render correctly in conversation notifications
  • Previously, shortcut icons were being cropped because the app didn't account for Android's automatic 18dp crop for adaptive icons. I added a transparent border around shortcut icons to account for this

(I'm having technical issues right now and haven't had the chance to test on an API 21 device, I'll update this when I've done that) Tested and is working under API 21.

@dkter dkter force-pushed the conversation-features branch from d63776d to c9ec8d4 Compare July 5, 2021 18:22
@dkter
Copy link
Contributor Author

dkter commented Jul 9, 2021

Some updated screenshots now that Android's conversation UI has finalized (and the icon crop has been fixed)

Conversation notification
Conversation settings

(note that shortcut icons like the ones below were previously cropped)
Screenshot_20210708-235938.png

Copy link
Contributor

@andrewaylett andrewaylett left a comment

Choose a reason for hiding this comment

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

I have rebased these changes on top of develop and run them locally on my OP6 with Android 11, and very much approve.

dkter added 6 commits August 25, 2021 13:41
Instead of only favorite rooms having shortcuts, all rooms now have
shortcuts and they are ranked according to favorite/normal/low-priority
status.
Rectangular icons were causing issues with the conversation icon display
(probably an Android bug) and shortcut icons were being cropped in
unnecessarily.
This prevents shortcuts from momentarily being shown out of order while
the shortcut list is in the process of being updated.
@dkter dkter force-pushed the conversation-features branch from 18f915c to 2004d35 Compare August 25, 2021 18:58
@dkter
Copy link
Contributor Author

dkter commented Aug 25, 2021

Rebased onto develop and fixed a minor bug with shortcut sorting. I've been using this version of Element for about a month and it's been working great.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, I think we can merge it (just checking with the team)

@dkter dkter force-pushed the conversation-features branch from 3092de8 to 15217d9 Compare August 27, 2021 22:49
@bmarty bmarty merged commit 23e3241 into element-hq:develop Aug 30, 2021
@HammyHavoc
Copy link

Reporting this on behalf of @bryandesrosiers, after upgrading to 1.2.1, which tagged this PR.

image

'Chatheads' ala Messenger would be awesome. :- )

@andrewaylett
Copy link
Contributor

Odd, I see priority levels but not chat heads (because that's not implemented yet). I've got most of the way to an implementation myself: enough to see the pop-out icon in the notification, but not to actually show the chat when one taps on it. Bit stuck now. Anyone know if there's a specific bug for the remaining pieces that I could tag on to?

@dkter
Copy link
Contributor Author

dkter commented Sep 13, 2021

enough to see the pop-out icon in the notification, but not to actually show the chat when one taps on it.

@andrewaylett I had this exact issue a year ago when I was trying my hand at implementing bubbles. No idea why it doesn't work, and I hadn't been able to find any other instances of this problem, though bubbles were a very new feature back then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants