407 Commits

Author SHA1 Message Date
Stefan Ceriu
ee4040141d
Top level deeplink handling (#1660)
* Handle link opening on the top most levels and prepare for percolating them throughout the app
* Add support for a custom app scheme
* Add specific AppRoute parsers.
* Integrate custom scheme in the AppRouteURLParser
* Switch to `element://call` and cleanup route parsing
2023-09-11 12:31:31 +03:00
Alfonso Grillo
9b313b814e
Polls refinements (#1608)
* Refine focus behavior

* Begin draft mode

* Add alert on poll form

* Add poll ended asset

* Add fallback text for ended poll event

* Cleanup

* Fix assets

* Remove poll feature flags

* Fix UI tests

* Fix ui tests

* Refine discard poll alert

* Remove unused import

* Rename hasDraftContent -> hasContent

* Restore createPoll-2 ref screenshots
2023-09-01 15:55:11 +02:00
Alfonso Grillo
f0fad25d09
Vote on a poll and end a poll (#1597)
* Fix project file

* Add vote and end poll actions

* Handle redaction

* Fix local echo behavior

* Cleanup

* Fix UI tests

* Add localisation

* Cleanup

* Fix end poll action style
2023-08-31 12:04:25 +02:00
Alfonso Grillo
a2623dd254
Create poll UX (#1571)
* Add poll attachment button

* Add poll creation feature flag

* Setup navigation to CreatePollScreen

* Add create/cancel actions

* Add create poll screen ui skeleton

* Add bindings in CreatePollScreen

* Add logics in CreatePollScreen

* Cleanup code

* Fix option deletion crash

* Fix conflicts

* Add create poll logic

* Add localisations

* Fix test build errors

* Fix crash

* Add UTs

* Add accessibility IDs

* Add ui tests

* Add 240 char limit

* Fix addOption hide behavior

* Add maxNumberOfOptions

* Cleanup code

* Move delete workaround in the view model

* Use compound delete icon
2023-08-30 09:23:30 +00:00
aringenbach
d1573ae40d
Initial integration of RTE (#1464)
* Initial integration of RTE

* Fix `clipped`, `focused` and composer view type

* Remove horizontal padding

* Add `ComposerToolbar` mock

* Restore `composerFocusedSubject`

* Allow using HTML from RTE on message sent

* Fix new message content API

* Add feature flag for Rich Text Editor
2023-08-29 12:37:13 +00:00
Stefan Ceriu
c776229dc0 Bump the RustSDK to v1.1.0 2023-08-25 14:42:56 +03:00
Mauro
db1903ec05
MessageText component (#1521)
* MessageText component

* swiftformat

* fix swift format being a bit crazy

* link tapping support

* new test + fix for font + dynamic support

* fix for blockquote issue.

* code improvement

* small code improvement and fixed tests not working due to weird swiftformat behaviour

* fix boost emoji

* updated swiftformat

* better testing

* UI tests updated

* fixing the issue with the cache overriding the size category changes

* whitespaces

* appropriate color + better info plist parsing

* cleaned the code and fixed links

* tapping link fixes

* list bug fix

* ui tests regenerated
2023-08-22 10:14:23 +00:00
Alfonso Grillo
25f66d2557
Refine polls UI in the timeline (#1474)
* Add summary view in PollRoomTimelineView

* Add selectedPollOption action

* Handle undisclosed polls

* Add more logics in PollRoomTimelineView

* Refine ended poll UI

* Refine poll layout

* More UI refinements

* Fix layout issue

* Refine progress bar

* Add poll mocks and UI tests

* Cleanup
2023-08-11 10:25:16 +00:00
Stefan Ceriu
dd6d1f6e63 Tweak swiftlint settings 2023-08-08 11:48:40 +03:00
Stefan Ceriu
10259e9345 Fixes #1455 - Use the stable timeline id to match timeline items in between local echo and remote echo states 2023-08-08 11:48:40 +03:00
Stefan Ceriu
28c2490910 Adopt batched timeline diffs and other RustSDK changes 2023-08-02 12:08:57 +03:00
Doug
1609ae2036
Send read receipts as messages are displayed. (#1426) 2023-08-01 11:53:02 +01:00
Stefan Ceriu
3c8daebfe1 Delay rendering bottom timeline items when scrolled up and avoid content shifts
- builds on top of langleyd/timeline_defer_new_items
- improve animations
2023-07-31 14:29:40 +03:00
David Langley
beaf9a8dbf
Reactions - Design review tweaks (#1417)
* Design review tweaks

- truncate reactions as per spec
- add haptic feedback on reacting
- Remove all collapse/expand animations on reactions
- tweak reaction and summary padding
- Fix alignment of time on reaction summary view
- Made sure reaction summary button in horizontal scroller is on screen on appear
- update screenshots

* Update TimelineReactionsView.swift

* Remove dark add more button and check long rtl reactions

* Set colour of  templated add more button

* Fix padding and only inset from the bubble on the leading side as per designs

- Fix padding
- Only inset from the bubble on the leading side as per designs

* Update screenshots

* Fix line length warning.
2023-07-31 11:16:52 +00:00
Alfonso Grillo
0e7a48d961
"View only" polls in the timeline (#1399)
* Add stub methods in RoomTimelineItemFactory

* Add PollRoomTimelineView and PollEndRoomTimelineView

* Add timeline skeleton

* Start poll mapping

* Add comment

* Refine poll UI

* Add feature flags for polls

* Cleanup

* Delete poll end event

* Refine poll mapping

* Refine poll layout

* Reuse FormRowAccessory

* Refine poll bubble layout

* Localise strings

* Update project

* Refine poll preview

* Map poll properties
2023-07-27 15:34:27 +02:00
Alfonso Grillo
1529b5b8ca
Update SDK to 1.0.102-alpha (#1408)
* Update SDK to 1.0.102-alpha

* Log error

* Notification Improvements API part 1 (#1410)

* changes

* WIP

* progress

* updated test

* removed unused

* code improvement

* Process diffs as batches provided by the SDK.

---------

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
2023-07-27 09:48:56 +00:00
Alfonso Grillo
90ff2df00e
Refactor TimelineItemBubbledStylerView for polls (#1404)
* Refactor bubble bg colors and insets

* Improve MapLibreStaticMapView layout

* Add BubbleTimestampLayout

* Refactor BubbleTimestampLayoutType

* Refine .horizontal, .vertical layouts

* Rename layout type

* Add docs

* Restore LocationRoomTimelineItem body

* Refactor whitespaces

* Fix background color for LocationRoomTimelineView.

* Fix UTs

* Fix analytics ui tests

* Fix bug report tests

* Fix settings ui tests

* Rename private property

* Record room screen tests
2023-07-26 15:17:41 +00:00
Mauro
99b5bf5150
Reverting to TableView but with SwiftUI compatibility (#1407)
* revert but also allows us to keep the existing SwiftUI implementation if we need it

* code improvement

* pr review

* FF is volatile

* message that communicates that is volatile
2023-07-26 13:53:43 +00:00
Mauro
7cf32ba37c
SwiftUI timeline refactor + TimelineViewState decoupling (#1392)
* swiftUI conversion + scroll to bottom

* remove unused

* back pagination implemented, however when a lot of elements are in the scroll the perfomance diminishes not sure what may be causing it

* scroll adapter solution

* way better

* works but height animation in cells are broken

* code improvement

* everything implemented

* rebase fix

* fix

* doc

* fix test compilation

* code improvement and animation improvement

* code improvement

* code improvements

* tests updated.

* pr comments

* better identifiers

* fix

* some PR comments

* pr comments
2023-07-25 12:20:13 +00:00
Doug
43dafda3ef
Tweaks for macOS (#1383)
* Fix constant Create Room button animation on macOS.

* Allow right-clicking on timeline items to work again on macOS.

* Use inline media upload previews on macOS

This comes with the caveat that the previews are no longer interactive.
2023-07-24 12:08:50 +00:00
Mauro
5a24d0817c
Fix for offset 1 not making new messages auto scroll (#1371)
* bett docs + fix

* better doc

* small code improvement

* code improvement

* code improvement
2023-07-20 13:52:02 +00:00
Alfonso Grillo
ed27aa9a47
Location event body representation (#1368)
* Change GeoURI body format

* Update location event representation
2023-07-20 13:04:13 +00:00
Mauro
f0ca15290f
Flipping the tableView (#1366)
* I can't believe this works so well.

* code improvements

* we probably just need to change the TODO

* better naming

* done, there is only one small bug to fix

* fix

* this needs to be decided

* fixed the backpagination issue and improved the scroll to top gesture triggered by tapping on the clock (but won't work when I am at the bottom)

* fix
2023-07-20 11:29:45 +00:00
Mauro
caeb86e178
Better identification system for virtual items (#1361)
* better identification system

* better handling for unknown
2023-07-19 14:29:56 +00:00
Alfonso Grillo
df58d8378e
Delete Location Sharing feature flags (#1358)
* Delete location sharing feature flags

* Add changelog.d file

* Update localizations

* Amend changelog file
2023-07-19 12:15:26 +02:00
Alfonso Grillo
cf39710891
Remove ”copy” action for location events (#1355)
* Hide ”copy” action for location events

* Cleanup
2023-07-18 15:54:42 +00:00
Mauro
f46abbaf9e
Diffable fade animations (#1343)
* animate only 2 seconds after the appearence

* scrolling is stable

* code improvement

* comment and removing code that is not necessary anymore

* feature flag

* comment

* better code

* the day divider ID is the timestamp itself as ISO

* Apply suggestions from code review

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>

* format fix

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
2023-07-18 14:18:11 +00:00
David Langley
a44a60cb0a
Sort reactions on the timeline by count and then timestamp and show the date on the summary view (#1320)
* Sort timetamps on timeline and show the date on the summary view

- Sort reaction aggregations on the timeline by count and then by most recent timestamp ascending(tagging new reactions on the end)
- Show the timestamp on the summary view and sort descending(newest at the top)

* Address comments.

- Fix ID case.
- Improve readability of components in body.
- Improve the comments that describe the sorting.
2023-07-14 17:18:32 +01:00
Mauro
76506752b4
SDK Changes Refactor (#1312)
* internal id

* notification refactor

* client proxy refactor

* required self

* better identifier system

* using the event id when required

* tests fixed

* tested some stuff

* fixed merge conflict

* improved the test wait

* animation disabled

* Bump Rust SDK version to 1.0.98-alpha (#1310)

* code improvement

* pause sync

* pr suggestions

* result

* Apply suggestions from code review

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* enum based debug identifier

---------

Co-authored-by: aringenbach <80891108+aringenbach@users.noreply.github.com>
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-12 10:28:41 +00:00
Alfonso Grillo
adb253ff66
Send location uncertainty within a geo uri (#1309)
* Add uncertainty

* Add UTs

* Delete verticalAccuracy
2023-07-12 09:02:05 +00:00
Flescio
153149d93f
Send current user location (#1272)
* add new asset for location, add logic for sharing user current location

* work on default zoom and auth for location

* add attribution button

* fix attribution button position, fix isSharingUserLocation

* Add NSLocationWhenInUseUsageDescription back

* Fix initial animation

* change map logo and attribution position

* Add annotation just in the setup

* add errors and alert for map vies

* location unit test

* add unit test for location sharing

* add changelog

* Update ElementX/Sources/Other/MapLibre/MapLibreMapView.swift

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>

* add comments and minor parameters refactor

* Update ElementX/Sources/Screens/LocationSharing/StaticLocationScreenCoordinator.swift

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>

* Update ElementX/Sources/Screens/LocationSharing/StaticLocationScreenViewModel.swift

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>

* Sort assets

* Cleanup

* Cleanup

* Fix error localizations

* Fix tests

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
2023-07-11 10:42:59 +00:00
David Langley
2cec1858ff
Add expand/collapse UI for reactions (#1249)
* Add expand/collapse UI for reactions

- Adds a CollapsibleFlowLayout for controlling the layout
- Adds tests for  this layout and some mocks for testing layouts generally
- Improves the rendering of the reaction buttons which were not pixel perfect
- Adds the UI for the expand collapse buttons including the count of hidden items in the collapsed state.

* Add comment for reactionsCollapsed binding.

* Remove Flow and simplify implementation

- Remove SwiftUI-Flow
- Add strings by importing from Localyse
- Remove count on expand button as requires GeometryReader and can cause loops
- Don't use GeometryReader for hiding reactions with opacity(just put them way off screen for now)
- Fix unit and UI tests

* Address PR comments

- use synthesized inits
- use rows rather than lines for naming flow layout
- other naming improvements
- reactions were already rendered in another ui test, removing my test on favour of those and updating the screenshots for those.
2023-07-10 15:13:58 +00:00
Mauro
d2fe663003
SDK Bump + Back pagination state listener (#1274)
* backPagination improved

* sdk bump

* removed unused line

* Update ElementX/Sources/Services/Timeline/TimelineController/RoomTimelineController.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* cancelling the TaskHandle on deallocation

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-07 07:54:40 +00:00
Doug
6b8b5a75b3
Add encryption history banner and update session verification banner strings. (#1250)
* Add a hard wall on back-pagination in encrypted rooms.
Until the app supports key backup, the history will never be decryptable.

* Fix initial display of the timeline table view.

* Update session verification banner strings.
2023-07-05 14:08:31 +01:00
Mauro
b294278170
Refactor the NSDiffableDataSourceLayer (#1235)
* first part, using references

* better animations

* delete view provider and replaced wth two files

* ordered dictionary usage

* bubbled styler view previews

* plain style is back

* fix

* read marker previews restored

* updated tests

* code improvements

* better naming
2023-07-04 14:08:43 +00:00
Alfonso Grillo
caf23094b0
Update SDK to 1.0.94-alpha (#1232)
* Update SDK

* Map new location fields

* Add LocationRoomTimelineItemContent.AssetType
2023-07-04 06:39:32 +00:00
Stefan Ceriu
be124a972e Prevent the TimelineController from requesting a backpagination even though items are available on the TimelineProvider level. Manually populate the items subject in the TimelineProvider constructor. 2023-06-29 20:13:56 +03:00
Mauro
b2ab6103c3
Editing a failed echo, just cancels and resends it (#1207)
* editing a failed message means cancelling and resending it

* changelog
2023-06-29 14:37:52 +00:00
David Langley
98cec5672c
Reaction summary and flow layout for reactions (#1158)
* Add reaction summary view

* Add avatars and display names and flowlayout for reactions

- Add avatars to summary view
- Add display names to summary view
- Add flow layout to reaction buttons as per designs(long press on  scolling buttons is difficult to achieve so prioritised this).

* Add and use SwiftUI-Flow for reaction layout.

* Correct Swift-Flow inclusion via xcodegen

* Remove own FlowLayout implementation and Fix unit tests

* Improve naming and correct spacing on summary view as per design.

* Fix safe area insets on summary view bottom sheet

* Scroll to selected reaction in the case that it is offscreen when the sheet is displayed.

* Add more reactions to UITests to ensure the new flow layout is displayed(wraps on to second line).

* Fix snapshot image.

* Address review comments.

* Use onLongPressGesture for reactions also to fix double actions bug and for consistency.

* Respect RTL languages.

* Fix unit test.
2023-06-29 10:53:44 +01:00
Alfonso Grillo
3f6bfbcc14
Open map from timeline (#1199)
* Add navigation to expaneded map

* Add MapLibreMapView.Options

* Add AppActivityView

* Add ShareToMapsAppActivity

* Add share sheet presentation

* Add localisations

* Cleanup

* Fix UT build errors

* Revert breaking change

* Fix UIView setup

* Add support for location’s description

* Show popover on iPad

* Restore assets

* More cleanup
2023-06-29 09:12:42 +00:00
Mauro
10e167732b
Show Only Retry Decryption and View Source for Unencrypted messages (#1202)
* show only retryDecryption for unencrypted message

* fix
2023-06-28 15:57:19 +00:00
Mauro
908b368680
Delivery status is displayed only for last message (#1193)
* checkmark only displays for the last message

* delivery status is now displayed only for last message

* changelog
2023-06-28 14:28:56 +00:00
Stefan Ceriu
02f086cfcb Prevent the app from crashing when multiple virtual timelineStart items appear in the timeline 2023-06-28 15:33:07 +03:00
Flescio
102e6a64fa
Send pin-drop location (#1179)
* add location sharing action in room, and open location sharing screen

* add pin location sharing

* fix asset, add tests for location viewModel, add send location request

* fix map zoom level, fix assets for location

* add feature flag for location sharing

* hide attribution button
2023-06-28 09:39:38 +00:00
Stefan Ceriu
e6711a0236 Removed unused swipe gesture (+3 squashed commits)
Squashed commits:
[d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier
[37c46ab9] Rename Analytics to AnalyticsService
[8852a371] #920 - Cleanup ServiceLocator usages
2023-06-28 11:33:41 +03:00
Mauro
f54eb78503
Filter out some actions for failed local echoes (#1184)
* done

* pr suggestion
2023-06-27 16:41:18 +00:00
aringenbach
88ac3fb8c6 Rename sendReaction as toggleReaction 2023-06-26 20:25:55 +03:00
Mauro
3d3fd5dc66
Handling cancelled as a sendingFailed case (#1161)
* handling cancelled as a sendingFailed case

* changelog
2023-06-26 10:33:15 +00:00
David Langley
13decc668a
Reaction highlights (#1145)
* Highlight own reactions

- Highlight own reactions on timeline and improve style.
- Highlight reactions on message bottom sheet only when it our own.

* Improve overlay background colours

* pin to new sdk version

* Remove the red used for debug.

* Fix padding, overlap and only display count if > 1.

- Fix reaction padding and overlap of reaction and bubble.
- Only display count if greater than 1.
- Return EmptyView for TimelineDeliveryStatus.cancelled.

* Fix colors as per design recommendations.

* Add Snapshot tests for reactions and documentation.

- Add UITests for the timeline including reactions.
- Add the reference snapshots.
- Add documentation on how to run snapshot tests and update the reference snapshots.

* Fix Package.resolved
2023-06-25 13:24:48 +01:00
Alfonso Grillo
1f99e9af8d
Update Matrix SDK to v1.0.84-alpha (#1147)
* Fix build errors

* Add sendLocation API

* Amend cancelled behavior
2023-06-23 15:14:38 +00:00