element-android
element-android copied to clipboard
Added lab feature to pin/unpin messages
Type of change
- [x] Feature
- [ ] Bugfix
- [ ] Technical
- [ ] Other :
Content
This PR adds a new feature so users can (un)pin messages and open a timeline where only the pinned messages are visible. The feature can be found and activated in the "Labs" settings.
Details of this feature:
- It is possible to (un)pin messages
- Users can open a timeline with all pinned messages
- Users can jump to a specific messages from the pinned messages timeline to the "normal" timeline
- Users have to have the necessary role to (un)pin messages
Little background: Currently, if pinned messages are missing the client will load chunks of older messages like it does in the "normal" timeline until all pinned messages are available. This is not very efficient but it works for now.
Motivation and context
Solves #5933 and #357
Screenshots / GIFs
Here you can see the context menu which includes a button to pin a message. When a message is pinned already a button to do the opposite will be shown.
When there are pinned messages available a button to open a timeline with these messages appears at the top right corner.
Tests
- (Un)Pinned messages and compared result with web client
Tested devices
- [x] Physical
- [ ] Emulator
- OS version(s): Android 12
Checklist
- [x] Changes has been tested on an Android device or Android emulator with API 21
- [x] UI change has been tested on both light and dark themes
- [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#accessibility
- [x] Pull request is based on the develop branch
- [x] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md#changelog
- [x] Pull request includes screenshots or videos if containing UI changes
- [x] Pull request includes a sign off
- [ ] You've made a self review of your PR
- [ ] If you have modified the screen flow, or added new screens to the application, you have updated the test UiAllScreensSanityTest.allScreensTest()
Signed-off-by: Christoph Klassen [email protected]
@bmarty thanks for your review! I edited the things you marked and also did some additional refactoring (renamed files and variables to have more consistency). Since I was already working on the edits I also made the icons (to pin/unpin events) in the context menu bigger so their size fits better to the other ones.
In case that someone wants to know where the icons which are used in this PR come from : They are from Microsoft's Fluent Icons.
@bmarty I removed the property -XX:MaxPermSize=2048m
in gradle.properties (diff) because I'm using a newer version of Java JDK which was complaining that this property is deprecated.
If you want I will add it again. I just forgot to add it again before commiting.
Waiting for this to be merged, it's a very useful feature. Right now I have to explore the room data and copy out the pin IDs, then check them one by one. It isnt very convenient at all
@bmarty I removed the property
-XX:MaxPermSize=2048m
in gradle.properties
I'd also vote for removing the MaxPermSize
property (which has been deprecated since Java 1.8), as the source / target compatibility is at 11 anyway:
https://github.com/vector-im/element-android/blob/591b08f1ff426d5d7a5ee6e60599d809f45bbcc4/dependencies.gradle#L5-L6
@bmarty any updates?
nice feature here! Does it need more changes before merging it @bmarty ?
BTW: In Element X for Android this feature is already included and since today enabled as default: https://github.com/element-hq/element-x-android/releases/tag/v0.6.0.
BTW: In Element X for Android this feature is already included and since today enabled as default: https://github.com/element-hq/element-x-android/releases/tag/v0.6.0.
I'd rather not use element X, can you update this PR with the necessary changes and get it merged?
I'd rather not use element X, can you update this PR with the necessary changes and get it merged?
I implemented all requested changes already and don't know if there is anything from my side that has to be done for a merge.
I'd rather not use element X, can you update this PR with the necessary changes and get it merged?
I implemented all requested changes already and don't know if there is anything from my side that has to be done for a merge.
It says reviews are pending with changes requested, @bmarty any updates on this? I really like this client and want to continue using it for the forseeable future
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Any updates on this? It's been a month and everything seems to be about to come to a happy end, but it still doesn't. Thanks in advance.