214 Commits

Author SHA1 Message Date
Doug
6cd583d904
Revert back to UIKit for the presentation of the timeline media preview. (#3719)
* Revert back to UIKit for the presentation of the timeline media preview.

* Fix a presentation issue where the media is clipped until the animation finishes.

* Workaround for the preview controller replacing the info button when swiping.

* Use a self-sizing detent on the media info sheet.
2025-01-31 17:28:14 +00:00
Doug
b477a32d2e
Remove unused/redundant assets. (#3702)
* Remove unused image assets.

* Remove unused/redundant colour assets.
2025-01-27 11:44:39 +00:00
ElementRobot
13a404560d
Translations update (#3704)
* Translations update

* Update snapshots
2025-01-27 10:12:39 +00:00
Mauro
48e530fec9
DM Design Tweaks (#3693)
* dm design tweaks

* adding equatable conformance

* topic will now be shown in DMs

* code suggestion

* updated details

* better check

* code improvement
2025-01-22 13:32:39 +00:00
Doug
909ee4abf2
Media browser tweaks (#3692)
* Move the media actions from the bottom bar into the details sheet.

* Allow the media type picker to fill the width of the screen.
2025-01-21 17:00:04 +00:00
Stefan Ceriu
8577f53613
Refactor the JoinRoom screen to take advantage of newer APIs and support more joinRule/membership combinations (i.e. invite required, restricted, banned) (#3685)
- expose the full RoomPreview and RoomMembershipDetails through their own proxies
- implement standard mocks for all the different combinations
- converge on a single room info provider
- rebuild all the previews
- prioritise the preview data over the room one.
2025-01-20 19:07:11 +02:00
Valere
f20847f62b
Warn and block sending on verification violation (#3679)
* feat(crypto): Warn and block sending on verification violation

* fixup: Fix ComposerToolbar previews

* fixup! add ComposerToolBarViewModelTests for canSend

* add new preview tests for verification violations

* Use `deferFulfillment`s in the unit tests.

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2025-01-20 18:29:34 +02:00
Stefan Ceriu
0fd8df52ab
Improve how alias settings are handled, add unit tests (#3686) 2025-01-20 15:43:47 +02:00
Stefan Ceriu
c29175d1f9 Support double-length pseudlanguage in fallback translations and update snapshots for en-us. 2025-01-15 14:59:54 +02:00
Stefan Ceriu
0bcc59ae0a Bump the RustSDK to v25.01.15 and fix (most) concurrency sendability warnings in the generated mocks. 2025-01-15 14:59:54 +02:00
Mauro
e3ad925285
Security and privacy part 2 (#3637)
* handling the history visibility flag

* better logic to handle visibility

* better handling of the visibility options state

* added some copies, and the public room directory

visibility state

* completed the UI

added also the preview tests

* improved the handling of the directory visibility

* added the space users case

and improved handling of the access -> vsibility reaction. Also added a simple error handling for the public directory toggle

* added the edit room address view

but is missing its full implementation

* implement the UI for the edit room address screen

* implemented error checking

when editing the address

* updated preview tests and improved code

* typo fix

* Fix various issues after rebasing.

* Fix build errors and broken snapshot tests

* Adopt latest room privacy and canonical alias setting APIs

* Add support for creating and editing the room's alias.

* Add support for saving room privacy setting changes.

* Fix room alias screen snapshot tests following recent changes.

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2025-01-15 11:50:08 +02:00
manuroe
3950cac085
Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Doug
885a5b9f36
Design tweaks. (#3645)
* Update the background colour of the VisualList component.

* Update the recovery key field to match the designs.
2024-12-20 14:13:23 +00:00
Stefan Ceriu
536f01abbd
Retrofit deferFulfillment onto snapshot tests. (#3641)
* Retrofit `deferFulfillment` onto snapshot tests.

* Convert a bunch of preview tests to the new fulfillment publisher

* Convert more tests

* Remove unneeded delays from the remaining tests

* Remove snapshotting delay option.
2024-12-20 15:30:59 +02:00
Doug
3aa7edc508
Enable the media browser feature 🖼️ (#3642)
* Overlay a progress indicator for downloads instead of using a toast indicator.

* Update the SDK.

* Remove the feature flag for the media browser.

* Remove the media captions feature flag too.

* Add unit test cases for download failure and swiping between items.

* Snapshots (with the media browser visible in the screen).
2024-12-19 14:15:31 +00:00
Stefan Ceriu
21a15936a9 Fix #3639 - Reorder timeline item menu options 2024-12-19 13:18:12 +02:00
Mauro
1496d477a4
updated details design (#3626) 2024-12-17 11:50:01 +00:00
Stefan Ceriu
61ad718007 Fix video item duration formatting 2024-12-16 19:21:28 +02:00
Stefan Ceriu
f9be39eb4f Fix the media gallery's empty state showing up at wrong times. 2024-12-16 19:21:28 +02:00
Mauro
45a630dd85
Implement Knock Logic (#3573)
* WIP RequestToJoin struct

* implemented the logic to display the cells

* knock request banner accept flow

* mark all knocks as seen implemented

* details logic

* implemented accept, decline and ban in the list

* added a loader and modified the stacked view

of the banner

* pr suggestions

* updated naming and loading strings

* added the initial loading state

improved code and the tests

* updated a string that has changed

* code improvement

* tests for the room screen view model

* room details tests

and improved the knock requests tests for the room screen

* knock requests list tests

* added error state alerts with retry

* struct has been renamed on the sdk

so I renamed it also on the app side

* update SDK
2024-12-16 15:32:45 +01:00
Stefan Ceriu
b0f4f42ff2 Add empty states for the media gallery sections 2024-12-13 19:31:35 +02:00
Stefan Ceriu
7da081b15b Update the other affected snapshots 2024-12-13 19:31:35 +02:00
Doug
42b4b331bd Update FormattedBodyText snapshots. 2024-12-13 19:31:35 +02:00
Mauro
b11fbc6cce
Security and privacy part 1 (#3617)
* added the security and settings button in details

* added content to the view

* added enable encryption alert

* updated preview tests and the UI

* removed wrong plists committed by mistake

* pr suggestions
2024-12-13 18:29:17 +01:00
Stefan Ceriu
256ae4d2cc
Custom media gallery views for files and voice messages (#3610)
* Extract the timeline item background from the BubbledStyler.
* Use different views for files and voices messages, reuse the timeline content but only keep the bubble background instead of the whole TimelineStyler.
* Add back max voice message width and add missing accessibility label
2024-12-12 17:48:41 +02:00
Stefan Ceriu
114255c5ec
Media gallery - support for files and voice messages (#3605)
* Move the voice message views to where they belong
* Add separate struct for each media events timeline view
* Add support for all the different media gallery message types and get the files section working
2024-12-12 10:02:10 +02:00
Mauro
89b9259b76
Design Tweaks (#3606)
* updated the order of the room details

also...
- removed the bloom bg from the join room screen
- now DMs do not necessarily need to be encrypted rooms
- changed bg of the knock banner

* removed unnecessary disabled

* updated join room screen tests
2024-12-11 17:42:33 +00:00
Doug
c827ab9165
Configure the media preview screen based on the event and presentation. (#3604)
* Configure media previews based on the presenting screen.

* Switch on TimelineKind instead of having an isPinnedEventsTimeline Bool.
2024-12-11 15:40:31 +00:00
Stefan Ceriu
0b85964f73
Monthly media gallery separators (#3601)
* Fix the order of the items in the media grid.
* Add media gallery timeline separators.
* Change the `SeparatorRoomTimelineItem` to have it expose a Date timestamp instead of a text string.
2024-12-11 13:32:29 +02:00
Doug
e59a705459
Use TimelineMediaQuickLook in the MediaEventsTimelineScreen. (#3598) 2024-12-10 14:56:51 +02:00
Doug
b5605a52e3
Update the timeline media QuickLook modifier. (#3593)
Not hooked up to any flows yet.
2024-12-09 15:23:12 +00:00
Stefan Ceriu
caaa89af62
Media gallery - part 1(#3588)
* Introduce a `MediaEventsTimelineFlowCoordinator`
* Update SDK API and architecture
* Add a feature flag, add translations
* Move the media events timeline presentation under the room flow coordinator state machine
* Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState`
* Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
2024-12-06 16:58:14 +02:00
Doug
a9e4837b62
Use a Date for the timestamp in all timeline items. (#3590)
* Use a Date for the timestamp in all timeline items.

* UI test snapshots.

* Update snapshots

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2024-12-06 13:55:29 +00:00
Doug
40d739f7ed
Use the new SendButton v2 design. (#3589) 2024-12-05 16:08:15 +00:00
Doug
4966083b58
Add new development assets and use in mocks/previews. (#3581) 2024-12-03 17:14:05 +00:00
Doug
4187155159
Enable local echoes for media uploads for all builds. (#3579)
* Enable local echoes for media uploads for all builds.

* Update a string.
2024-12-03 11:28:21 +00:00
Mauro
c7afde3801
Knock a room - added a char counter for the message (#3570)
* added a char counter

* moved code
2024-12-02 17:28:50 +01:00
ElementRobot
b8085356fb
Translations update (#3576)
* Translations update

* fix a test

---------

Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2024-12-02 10:21:08 +00:00
Doug
34f1c61fe2
Add a warning to the media caption composer. (#3574)
We can now remove the feature flag.
2024-11-29 16:23:20 +00:00
Mauro Romito
8d6909982d Move pinned messages button in details 2024-11-29 17:04:15 +01:00
Doug
c8627cfd64
Add support for copying a caption. (#3563)
* Add timeline item action for copying a media caption.

* Fix the action colours when long pressing a timeline item.

Nice side effect: Reasonable sized buttons when button shapes are enabled.

* Re-arrange the Timeline Item Menu.

* Add timeline item menu snapshots for media items.
2024-11-29 12:26:59 +00:00
Doug
751be7b3a7
Update the SDK. (#3565)
* Update the SDK.

* Add mockMXC URLs to fix all the crashes during tests.

* Refactor Voice Messages to not use a MediaSource for local files.
2024-11-28 08:34:38 +00:00
Doug
03aaf849ee
Update how file captions are rendered (#3554)
* Update the File/Audio captions layout to match Figma.

* Fix caption sizing issues.

The send info label was being added incorrectly.

* Update icon size and regenerate snapshots.

* Fix a regression in the location timeline item layout.
2024-11-26 10:36:46 +00:00
Mauro
e315451448
Knock Requests List Screen (#3533)
* created the basic navigation and files

* updated the logic

so that the buttons that do not have permissions won't show

* added the empty state

* progress in making the list UI

* update tests

* UI improvements

* fixed an issue with media provider

* update button style

* fixed a navigation bug

* pr suggestions

* pr suggestions
2024-11-21 19:14:05 +00:00
Doug
7e1476d973
Add support for adding/editing/removing media captions. (#3547)
* Add support for editing media captions.

* Add composer snapshots.

* PR comment.
2024-11-21 18:18:27 +00:00
Stefan Ceriu
acd670ab56 Link the MatrixRustSDK dynamically and only embed it in the main target 2024-11-20 16:11:54 +02:00
Stefan Ceriu
51227fffe3
Show both defaults and frequent emojis in the timeline item menu, make the list scrollable (#3534) 2024-11-19 21:53:57 +02:00
Doug
b75ad6a5aa
Support adding a caption to media uploads. (#3531)
* Add a composer to the MediaUploadPreviewScreen.

And send it's content to the media upload's caption.

* Use the new compound SendButton (updating relative padding in the toolbar).

* Update snapshots.

* Add unit tests for sending a caption.
2024-11-19 16:35:01 +00:00
Doug
c888a5b4aa
Update compound (#3519)
* Update compound

textPlaceholder is now textSecondary.

* Update compound again with support for button shapes on the plain button style.
2024-11-15 13:42:53 +00:00
Stefan Ceriu
ef288a9662
Group image and video metadata in specialised structs (#3518) 2024-11-15 15:00:27 +02:00