59 Commits

Author SHA1 Message Date
Stefan Ceriu
4b56e4af73
Room member details cleanup (#452)
* Fixes #421 - Stop loading room members twice for displaying the members screen
* Rename RoomMembers to RoomMemberDetails throughout
* Add changelog
2023-01-17 09:31:53 +02:00
Doug
99e7f76ca0
Update danger image, fix snapshots (#436) 2023-01-11 11:01:33 +00:00
Doug
08b333839a
Fix back pagination (#432)
* Use pagination and start items for view state.

isBackPaginating and canBackPaginate are updated each time the timeline is rebuilt

* Update some timeline snapshots

The top section has gone, which has altered the layout slightly.
2023-01-11 09:11:36 +00:00
Doug
edc06bf662
Fix UI tests hanging. (#429)
* Only use Client for UI test signalling.

Make the server listen and return a client.

* Refactor to Listener and Connection.

Matches Network.framework naming.

* Wait until the connection is ready before setting the established connection.

* Docs and fix method name.

* Fix CI issues.

- Use Bonjour to allow multiple devices running simultaneously.
- Sleep after establishing the connection to fix issues on Intel.
2023-01-10 14:10:30 +00:00
Stefan Ceriu
956e92a9ac Add support for manually starting SaS verification flows and accepting remotely started ones 2023-01-10 13:41:07 +02:00
Doug
7888736a4d
Remove French Locale from UI tests. (#420)
* Remove French Snapshots.

* Remove unused sources from UITests.
2023-01-06 16:11:25 +00:00
Doug
51e300642c
Timeline UI Tests (#380)
* Add signalling between UI tests and the app.

* Fix navigationStack on roomLayout screens and update screenshots

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-01-05 16:35:20 +00:00
ismailgulek
1a47fd1a8d
Room details screen (#348)
* Create screen module

* Display details on header tap

* Add strings

* Add room avatar size on details

* Update members method signature

* Use room proxy values

* Create room members screen

* Display room members on tap

* Update previews and mock room proxy

* Commit project file

* Various tweaks and cleanup following code review

* More small tweaks + UI and screenshot tests

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-12-19 14:39:33 +02:00
Stefan Ceriu
6f974a4422
Resetting the app after deletion and cleanup settings (#372)
* Fixes #361 - Reset everything if the app has been deleted since the last run

* Cleaned up and renamed the ElementSettings to ApplicationSettings. Removed its singleton and moved it to the service locator.

* Moved the ApplicationSettings to the Application folder

* Merged together the BuildSettings and ApplicationSettings

* Reset the UserDefaults too when resetting the application state

* Rename ServiceLocator.applicationSettings to just settings

* Fix indentation

* Rename ApplicationSettings to AppSettings

* Various tweaks following code review

* Fix unit tests
2022-12-16 10:02:22 +02:00
Stefan Ceriu
5b90f37f2e
Various UI test fixes (#370)
* Increase integration tests time limits again as they're still ocasionally failing

* Fixed NavigationRootCoordinator name in logs

* Refactor UI tests hierarchy and introduce new userFlowScreen

* Introduce a RoomTimelineControllerFactory so that it can be mocked in the UserFlow UI tests

* Start using a mock timeline controller for the UserSession flows

* Remove the WeakDictionary dependency and replce it with a plain NSMapTable in the BackgroundTaskService

* Allow multiple UITests screenshots per screen

* Prevent the view hierarchy changing when taking screenshots

* Add UserSessionScreen UI tests

* Fix label triaging workflow project identifier as per vector-im/element-ios/pull/7150

* Fix settings screen tests

* Fix roomPlainNoAvatar and roomEncryptedWithAvatar UI tests

* Fix modal server selection screen UI tests

* Fix bug report and login screen UI tests

* Fix text typing missing characters on UI tests

* Fix sliding sync configuration on integration tests

* Stop crashing if not finding a particular room through the MockClientProxy
2022-12-15 15:22:39 +02:00
Doug
6dc2ea800e
#352: Add basic UI tests for the timeline. (#363)
Makes the MockTimelineController configurable with incoming items and pagination responses.
2022-12-12 14:27:49 +02:00
Stefan Ceriu
1102580d6c
UI test fixes (#335)
* Remove status bars when running UITests
* Remove simulator OS versions from screenshot names, be less lenient with image diffing
* Rename UITests splash screen to onboarding
* Switch tests to Xcode 14.1, remove version names for used simulators and switched from iPhone 13 Pro Max to iPhone 14
* Fix ServiceLocator and fallbackLaguage for UI tests
* Drop snapshot diffing precision to 0.99 as 0.999 triggers false negatives
* Fix server selection UI tests after exposing the sliding sync proxy configuration
* Update reference screenshots
2022-11-24 10:35:00 +02:00
ismailgulek
d389ce7ad7
Notifications (#275) 2022-11-21 19:37:13 +03:00
Stefan Ceriu
2fd0491a18
SwiftUI NavigationController and UserNotificationControllers (#309)
* Fixes #286 - Adopted the new SwiftUI NavigationStack based NavigationController throughout the application
* Fixes #315 - Implemented new user notification components on top of SwiftUI and the new navigation flows
* Add home screen fade animation between skeletons and real rooms
* Bump the danger-swift version used on the CI and swiftlint with it
* Renamed Splash to Onboarding, Empty to Splash
2022-11-16 13:37:34 +00:00
Stefan Ceriu
05986cd785 Update timeline UI test reference screenshots after changing bubble rendering 2022-11-07 11:42:47 +02:00
Stefan Ceriu
fabb0bc95f
New timeline (#276) (#280)
* Fixes #276 - Rebuilt room timeline:
    - Removed the need for the ListCollectionViewAdapter
    - Rewrote the TimelineItemList without using introspection
    - Added ReversedScrollView for laying out items at the bottom/trailing
    - Rewrote TimelineProvider diffing through CollectionDifference (similar to the RoomSummaryProvider)
    - Added back `scrollDismissesKeyboard`  behavior
    - Various other tweaks and fixes
- Fixed various warnings:
    - removed async AttributedStringBuilder as AttributedString is non-sendable, made the RoomTimelineItemFactory synchronous
    - removed unused virtual timeline items
    - removed unused isOutgoing property from the FormattedBodyText
* Make TimelineItemContextMenuActions indentifiable and specify contextMenu identifiers
* Bump the matrix-rust-components-swift to v1.0.16-alpha
* Add changes file and changelog contribution guide
* Fix attributed string builder unit tests
2022-11-02 13:03:34 +02:00
Johannes Marbach
09b2f939ab
Fixes #225 - Use a properly defined user agent
* Set a proper user agent
* Add fallback when UA comes out nil
* Remove unused Bundle extension
* Return nil when asciification fails
* Add whitespace handling and further emoji test case
* Explicitly check if string is already in ASCII
* Rename factory to builder
* Use allSatisfy instead of reduce
* Use key path syntax
2022-10-28 17:11:10 +03:00
Stefan Ceriu
ba4064cc2c
Enable e2ee support (#274)
* Enable sliding sync common extensions and session verification banner display; fix user session flow coordinator state machine
* Fixed a couple of deprecation warnings
* Add missing `m.room.encryption` required state
* Switch to rust-sdk v1.0.15-alpha and add changelog
2022-10-28 17:08:51 +03:00
Stefan Ceriu
80babf1cd8
Xcode Cloud Support (#234)
* Removed now unnecessary code from alpha builds
* Add nightly build configuration
* Update ruby dependencies
* Stop changing the app name for PRs and Nightly, the icon is sufficient
* Add ITSAppUsesNonExemptEncryption flag as per https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption and https://stackoverflow.com/questions/35841117/missing-compliance-status-in-testflight
* Updated app groups to reflect various environments: production, nightly and PR. Remove keychain access group as they should be inferred from the access groups
2022-10-24 16:00:17 +03:00
Stefan Ceriu
e979bd808b
UI test fixes (#235)
* Fix UI test simulator versions
* Pin the used Xcode version used by fastlane to `~> 14.0.1`, as simctl status_bar overrides don't work on the Xcode14.1 RC
* Update base screenshots, fix status bar script warning, fix settings screen test
2022-10-19 21:01:35 +03:00
Doug
0e90bff34c
Switch to Xcode 14 and handle the UICollectionView-backed List. (#229)
* Fix Timeline on Xcode 14/iOS 16

Raise requirement to iOS 16+
Reduce pagination jumping.
Sonarcloud fixes.
Fix verification test.
Adopt if let optional { syntax.

* Remove unused ScrollViewReader

The ScrollViewReader didn't appear to change the behaviour.

* Fix warnings on Run Scripts.

Run script build phase 'SwiftLint' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.
2022-10-17 09:56:17 +01:00
ismailgulek
29f61461aa
Update snapshotting library to 1.10.0 (#215) 2022-09-28 10:25:59 +03:00
Stefan Ceriu
98de77679b Fix UI tests 2022-09-26 16:03:34 +03:00
Stefan Ceriu
cbb0ec5063
Introduced a UserSessionFlowCoordinator and split up the AppCoordinator state machine (#212) 2022-09-25 12:34:11 +03:00
ismailgulek
bdc83dac27
Some Post-demo Cleanups (#200)
* Remove redundant string

* Use placeholder avatar on home screen

* Add initial home screen ui test

* Fix settings screen PR remarks

* Remove UIKit alert from home screen sign out

* Remove UIKit alert from soft logout clear all data

* Add reference screenshots for home screen UI tests

* Formatting fixes

* Add clearing room method to client proxy

* Clear room proxies on screen dismiss

* Fix retain cycle in room view model

* Do not go into authentication state immediately

* Define sizes for user and room avatars on different screens

* Use defined avatar sizes everywhere

* Disable image disk caching

* Rename rounded corner shape

* Fix text color of placeholder avatars

* Fix PR reviews on formatted body text

* Fix merge conflict

* Remove shouldShowSenderDetails everywhere and just use it from inGroupState

* Remove redundant linter disablings

* Fix PR remarks

* Rename media provider size parameter
2022-09-23 12:21:41 +03:00
Stefan Ceriu
5ebe923991
Sliding Sync + New Timeline API (#189)
* Begin adopting new Timeline API.

* Add edited indicator and reactions.

* vector-im/element-x-ios/issues/65 - Sliding sync support
* Fix missing room display name, wrong placeholder avatar text color and various other warnings that would fail the build on the CI

* Various tweaks:
* using release version of the demo branch of the sdk
* enabled home screen last room messages
* switched debug mode rust logging to warn
* enabled redactions
* enabled new logout flows and soft logout
* enabled replies

* Fix room member display name and avatar crashes / race condition, fix unit tests
* Make the ClientProxy and the UserSession MainActors
* Remove unused MatrixRustSDK imports, we should strive to keep these only in top level services and proxies
* Don't start either of the syncs while in soft logout

* #181: Style the session verification banner to match Figma.
* #181: Update verification modal.
* #181: Update snapshot tests.

* Make session verification state machine less pedantic
* Remove unnecessary weak selfs
* Various tweaks following code review:
* add start and stop sync client proxy methods
* move ss proxy url the build settings
* made media provider load results discardable
* added publishers for the roomSummaryProvider's total number of rooms and state

* Fix when sender details are shown
* Disable sync v2, causes duplicates in the timeline (as expected)
* Move ClientProxy media loading off the main queue and into a detached task
* Another attempt at moving image loading off the main queue
* Moved home screen diffing and latest room fetching to the background
* Prevent the timeline composer from becoming the first responder when not needed

* Bump to a newer version of the RustSDK

* Fixes vector-im/element-x-ios/issues/107 - New home screen design
* Implement thumbnail loading instead of full image avatars.
* Revert "Disable sync v2, causes duplicates in the timeline (as expected)"
* Add support for local echoes, dispatching detached tasks to a concurrenc GCD queue
* Move the session verification banner to a List Section to avoid UI glitches
* Optimise room mapping after sliding sync updates and thumbnail fetching
* Replace home screen List with a LazyVStack in an attempt to fix performance. Moved move summary provider room updating to a background thread

* Fixes vector-im/element-x-ios/issues/177 - New Bubbles Design
* Define in group state for timeline items
* Add replies into the bubble
* Add timeline width environment value
* Add `RoundedCorner` shape with specific corners rounding
* Add in group state for previews
* Implement bubble grouping logic
* Timeline avatar layout changes
* Fix placeholder avatars for dark mode
* New bubbles design
* Update mock timeline items
* Update timeline separator design
* Update room screen reference screenshots
* Add changelog
* Formatting fixes
* Add some space before single or beginning outgoing items

* Redesign the message composer

* Handle the msgtype enum.

* Update room name label line limit and incoming bubble background. Disabled syncv2, ss withCommonExtensions and session verification controller checking

* Increase default back pagination limit.
* Stop parsing links and tidy up composer button.
* Also fix the frame of an image whilst loading.
* Bump SDK package version.

* Remove app states about settings
* Add strings
* Use colors on placeholder avatars
* Tiny changes for placeholder avatars
* Update settings screen design
* Provide a user display name from the mock client
* Settings screen presentation logic
* Add changelog
* Update reference screenshots

Co-authored-by: Doug <douglase@element.io>
Co-authored-by: ismailgulek <ismailgulek@users.noreply.github.com>
Co-authored-by: ismailgulek <ismailg@matrix.org>
2022-09-21 09:21:58 +01:00
ismailgulek
bf3c7e900f
Log out (#174)
* Expose logout method from SDK

* Use logout from SDK, refactor logging out states

* Add some strings

* Introduce `initialDisplayName` on `UIDevice`

* Implement soft logout screen

* Add `softLogout` test screen identifier

* Add new fields into the client proxy and implement new delegate methods

* Add new fields into the user session and observe new client callbacks

* Implement updated login method

* Add remote logout state and event into the state machine

* Implement refreshing restore token on `UserSessionStore`

* Update app coordinator with new states and display soft logout screen when appropriate

* Add reference screenshots for soft logout screen

* Disable auto requesting photos access on screenshot detection

* Make initial device name optional, generate project file

* Add changelog

* Use logout from SDK, refactor logging out states

* Implement soft logout screen

* Implement updated login method

* Make initial device name optional, generate project file

* Fix renamed event

* Fix logout race

* Remove redundant strings

* Reuse existing strings

* Confirm clear all data

* Expose logout method from SDK

* Use logout from SDK, refactor logging out states

* Add some strings

* Introduce `initialDisplayName` on `UIDevice`

* Implement soft logout screen

* Add `softLogout` test screen identifier

* Add new fields into the client proxy and implement new delegate methods

* Add new fields into the user session and observe new client callbacks

* Implement updated login method

* Add remote logout state and event into the state machine

* Implement refreshing restore token on `UserSessionStore`

* Update app coordinator with new states and display soft logout screen when appropriate

* Add reference screenshots for soft logout screen

* Disable auto requesting photos access on screenshot detection

* Make initial device name optional, generate project file

* Add changelog

* Use logout from SDK, refactor logging out states

* Implement soft logout screen

* Implement updated login method

* Make initial device name optional, generate project file

* Fix renamed event

* Fix logout race

* Remove redundant strings

* Reuse existing strings

* Confirm clear all data

* Comment out new apis for now

* Make the PR compile
2022-09-15 12:41:37 +03:00
Doug
8967891e65 Update screenshots following DesignKit changes. 2022-09-15 09:21:56 +01:00
Stefan Ceriu
4660f096f8
Fixes vector-im/element-x-ios/issues/117 - Event permalink timeline action
* moved NSRegularExpression outside of the AttributedString builder into the MatrixEntityRegex
* fixed eventId v3 regex
* added permalink builders for users, room identifiers and aliases, and events
* added timeline item permalink contextual menu actions and error alerts
* added an app wide ServiceLocator and moved the top level userIndicatorPresenter to it.
* added URL constructor that takes a StaticString and returns an non-optional
* Include Unit and UI tests in the swiftlint search paths
2022-09-12 21:34:53 +03:00
Doug
3f6f055ea9 Add missing/updated snapshots. 2022-09-06 13:31:28 +01:00
Doug
8e46d0e3d6 #106: Add Analytics UI 2022-09-06 10:45:04 +01:00
Stefan Ceriu
142180b1f3
Various CI fixes (#161)
* Update homebrew dependencies like on the other workflows. Fixes problems caused by buggy swiftformat prebundled on the github actions macos runner

* Removed UI tests from PR tests and running them on a schedule instead. Hopefuly fixed code coverage.

* Added back simulator versions as they need to match UI test snapshots

* Allow UI tests to run on this PR

* Added back skipped UI tests

* Fix danger sometimes not working on forks and disable integration tests on them
2022-08-19 17:42:03 +03:00
Stefan Ceriu
78df4abc7f
#49, #123 - Setup UI integration and performance testing (#148) 2022-08-18 16:32:29 +03:00
ismailgulek
2cb6dc1cd9
Screenshot tests (#130)
* #9 Add snapshot testing library

* #9 Create script to boot test simulators

* #9 Create the UI test plan

* #9 Create shared schemes for test targets

* #9 Disable split view for UI tests

* #9 Fix fastlane dependencies

* #9 Add snapshot testing to the application

* #9 assert screenshots

* #9 fix swipe gestures on iPad

* #9 Fix accessing items in session verification screen

* #9 Workaround for flaky unit test

* #9 Specify scheme for alpha build

* #9 Add reference screenshots

* Update python script path and check assets for png check

* Update script path

* Use static timezone for simulator time

* Fix build after SwiftFormat

* Add changelog

* Upload failed screenshots artifact

* Always upload artifacts

* Update boot simulator script

* Update simulator overridden time

* Install pytz before tests

* Get time from Ruby script

* Disable SwiftUI animation when running UI tests

* Update screenshots after animation setting

* Include reference images in the artifact

* Update matching precision

* Update image matching precision & revert artifact content

* Include Xcode result in the artifact

* Update test output directory

* Disable gradient on splash screen for tests

* Tap next button explicitly

* Wait a bit before checking alert

* Wait 1 second

* Run SwiftFormat on project

* Ignore temporary screenshots

* Fix most of the PR remarks

* Fix conflicts

* Bump Python version to 3

* Update reference screenshots for authentication screens

* Update SwiftFormat

* Fix flakey session verification test.

* Update scheme.

Co-authored-by: Doug <douglase@element.io>
2022-08-11 15:02:47 +03:00
Doug
4349b8fc03
#150: Use standard file headers everywhere.
* Add default header in IDETemplateMacros.plist.
* Use the standard header everywhere.
2022-08-11 08:54:24 +01:00
Doug
c20bc6bd1c
#42: Proof of concept login via OIDC.
Uses AppAuth library in the app, ignoring token refresh
2022-07-28 09:28:42 +01:00
Doug
1878a16496
#40: Use the Rust AuthenticationService.
* Update SDK package to 1.0.12-alpha.
* Use an app group for storage and stop stripping the http from the homeserver when configuring the service.
* Rename access token to restore token.
* Remove matrix.org server description inline with latest FTUE changes.
2022-07-27 10:57:16 +01:00
Doug
25d7ba55ad
Enable blank line rules. (#132) 2022-07-06 16:01:50 +01:00
Doug
02eb4b35e2
Add SwiftFormat to the project. (#129)
* Run swiftformat for whitespace.
* Run swiftformat with some rules.
2022-07-06 14:49:05 +01:00
Doug
26d8affaa8
#40: Add basic AuthenticationService and missing UI tests.
* Add MockAuthenticationService and ServerSelectionUITests.
* Add tests covering the Authentication flow.
2022-07-04 10:00:27 +01:00
Stefan Ceriu
a6f9d1ba89
vector-im/element-x-ios/issues/31 - Implement simple SaS sesson verification
* vector-im/element-x-ios/issues/31 - Session verification unit and UI tests
* Fix ImageAnonymizer tests when running on Apple Silicon
* Rename SessionVerification to SessionVerificationScreen
2022-07-01 13:56:52 +03:00
ismailgulek
7bd4763662
Add localizations to UI tests target (#118) 2022-06-29 18:32:14 +03:00
Doug
d74158ced1
#40: Add the login screen from EI.
- Remove SSO and replace fallback with OIDC.
2022-06-28 12:23:35 +01:00
ismailgulek
36c34503fc
Plain timeline styler (#94)
* #92 Create `TimelineStyle` and store it in user defaults

* #92 Create `TimelineStyler` observable environment object

* #92 Use timeline list row insets from the styler

* #92 remove sender view, move header into the styler views

* #92 Add timeline style option in settings

* #92 Add changelog

* #92 refactor some code duplications

* #92 Fix `TimelineStyle`targets

* #92 Fix `TimelineStyle` targets

* #92 Fix PR remarks

* #92 Fix inline PR comments

* #92 Fix UI tests

* #92 Rename bubbled to bubbles
2022-06-27 13:27:09 +03:00
ismailgulek
7dcd494de8
Room screen header (#86)
* #35 Create `ElementNavigationController` subclass

* #35 Add encryption icons

* #35 Add avatar and encryption badge image to the room screen view model

* #35 Create `RoomHeaderView` class

* #35 Replace room title with a RoomHeaderView instance in the toolbar

* #35 Add changelog

* #35 Introduce `UITestScreenIdentifier` and refactor ui tests

* #35 Fix old tests

* #35 add some tests for room screen

* #35 Use svgs instead of pngs

* #35 Fix PR remarks
2022-06-21 20:28:42 +03:00
ismailgulek
591f835811
Minimal Settings screen UI (#85)
* #37 Remove sign out button from home screen

* #37 Move crash button visibility flag to BuildSettings, import BuildSettings from test targets

* #37 Add log out button into the settings screen

* #37 Add version into the settings screen

* #37 enhance bug report parameters

* #37 Remove sign out button from home screen

* #37 Move crash button visibility flag to BuildSettings, import BuildSettings from test targets

* #37 Add log out button into the settings screen

* #37 Add version into the settings screen

* #37 enhance bug report parameters

* #37 Add changelog

* #37 Fix code smells and PR remarks
2022-06-20 15:27:02 +03:00
Doug
8653f1dd6b #40: Add UserSessionStoreProtocol.
Only log out of the specific account.
Add tests for the keychain controller.
Expand test coverage.
PR comments
2022-06-16 10:58:39 +01:00
Doug
abd6a9c7c0 #40: Self review for PR 2022-06-16 10:58:39 +01:00
Doug
8dc5359a44 #40: Add OnboardingSplashScreen from EI.
Update SplashScreen for EXI
2022-06-16 10:58:39 +01:00
Doug
596cf2df0b
#43: Add the DesignKit package to the project.
* Add ElementTextFieldStyle and static style properties.
* Rename button styles, support sizes and simplify colour.
2022-06-09 14:44:46 +01:00