Coder Social home page Coder Social logo

element-hq / element-x-ios Goto Github PK

View Code? Open in Web Editor NEW
338.0 17.0 62.0 29.55 MB

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.

Home Page: https://element.io/labs/element-x

License: Apache License 2.0

Swift 99.30% Shell 0.22% Ruby 0.36% Objective-C 0.08% Jinja 0.04% C 0.01% Gherkin 0.01%
matrix

element-x-ios's Introduction

Element iOS Matrix room #element-x-ios:matrix.org GitHub

Build Status GitHub release (latest by date)

codecov Quality Gate Status Vulnerabilities Bugs

Element X iOS

ElementX iOS is a Matrix iOS Client provided by Element.

The application is a total rewrite of Element-iOS using the Matrix Rust SDK underneath and targetting devices running iOS 16+.

Rust SDK

ElementX leverages the Matrix Rust SDK through an FFI layer exposed as a swift package that the final client can directly import and use.

We're doing this as a way to share code between platforms and while we've seen promising results it's still in the experimental stage and bound to change.

Status

This project is in work in progress. The app does not cover yet all functionalities we expect.

Contributing

Please see our contribution guide.

Come chat with the community in the dedicated Matrix room.

Build instructions

Please refer to the setting up a development environment section from the contribution guide.

Support

When you are experiencing an issue on ElementX iOS, please first search in GitHub issues and then in #element-x-ios:matrix.org. If after your research you still have a question, ask at #element-x-ios:matrix.org. Otherwise feel free to create a GitHub issue if you encounter a bug or a crash, by explaining clearly in detail what happened. You can also perform bug reporting (Rageshake) from the Element application by shaking your phone or going to the application settings. This is especially recommended when you encounter a crash.

Forking

Please read our forking guide.

Copyright & License

Copyright (c) 2022 New Vector Ltd

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

element-x-ios's People

Contributors

alfogrillo avatar ara4n avatar aringenbach avatar billcarsonfr avatar davidegirardi avatar dependabot[bot] avatar domoritz avatar gileluard avatar hughns avatar hywan avatar ismailgulek avatar johennes avatar jplatte avatar kittykat avatar langleyd avatar laurencegill avatar manuroe avatar michaelkaye avatar nadonomy avatar networkexception avatar nimau avatar paleksandrs avatar pixlwave avatar poljar avatar riotrobot avatar sempruijs avatar stefanceriu avatar t3chguy avatar velin92 avatar vollkorntomate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

element-x-ios's Issues

Set up rageshakes

We need:

  • Log file storage
  • UI to create and share a rageshake
  • Check if we want to reuse EI rageshake server
  • Investigate the redacted view modifier for screenshot uploading

Reuse strings from Element-Android

We want to reuse them for several reasons:

  • Android is better for supporting plurals
  • Better parity between mobile apps
  • Less work for translators

We want to rely entirely on them. This means the iOS developer will have to:

  • add strings first on the Android project and PR them
  • run a script to retrieve from the EA repo

This script could be run like xcodegen when you set up the project.

The final strategy is still to be defined. As part of this research project, we need to define what will be the best (or least bad) in term of devx.

Open questions:

  • Should those generated strings be in git?
  • ...

Adopt Swift structured concurrency

We need to refactor our code to use Swift's new structured concurrency instead of the existing GCD based implementation. Ideally we should let the system to most of the work down to the FFI integration layer.

Timeout on /login needs to be much longer.

For whatever reason, /login for some accounts on some servers can take over 30s (up to 90s or so). But it looks like we have a request timeout of ~30s, which is too short.

Sync v3

We need:

  • to check product implication. This feature can change the UI.
  • feature ready in the SDK
  • /issues/65

I want to see the sending state in the timeline

As an user I would like to see the sending state of recently sent messages:

  • show an icon indicating that the message is currently in local echo state
  • show another icon when the message has been sent
  • remove all icons after a small delay

We don't currently have designs for this but it's not a big concern as tweaking things SwiftUI side is easy. Please use current Element for inspiration e.g. empty circle while in local echo, circle with checkmark after sent.

Rust SDK issue: matrix-org/matrix-rust-sdk#639

I want to sign in with OIDC

OIDC starts to be ready. We should showcase it using ElementX-iOS Alpha. It will help the OIDC team to get more feedbacks and to improve the UX.

After #40, we need to detect from the selected homeserver .well-known the .m.authentication field (example) and to display a "Log in via OIDC" that will open the authentication web service.

A sample swift app is available here.
Test homeserver with OIDC: https://synapse-oidc.lab.element.dev/
Hydrogen with OIDC in action: https://hydrogen-oidc.lab.element.dev/

I want to verify my new login

We need to think more about what can be the minimal things to cross-sign this new device just after logging in.

  • Design question: can we reuse the same design as EI to verify a device?
  • Rewrite everything using the new SwiftUI template

DesignKit component

The new Design Kit project should start in EIX as a swift package that EI could use.

Todo

  • Handle some rogue colours that have creeped into the EI theme.
  • Check in the package.resolved file in EI.
  • Try to generate namesAndAvatars array from the style dictionary.
  • Consider whether or not fonts can be generated by the style dictionary.
  • Migrate DesignKit to use vector-im/compound-design-tokens

I want to see my room list

We need to display:

  • Room avatar, display name
  • Last message, last message sender display name, timestamp
  • Unread count, missed notification count

The app has different ways to present room list. We need to be able to query the SDK :

  • Sorting by:
    • Recently updated
    • Alphabetically by room name
  • Filter by:
    • Room name
    • Tags (Favorites, ...)
    • Type: DM, room, space
    • Invitation
  • Pagination for performance reasons

We also need from the SDK:

  • Room list updates
  • Cache for displayed data. This is the first displayed screen by the app. It must be instant (It currently takes 10s to load the big test account on EIX)

Rust SDK issue: matrix-org/matrix-rust-sdk#634
UI: #30

Rageshake Service

We need to have a fresh new and robust service to send rageshakes:

  • Rage shake detection
  • Upload EIX and SDK logs
  • Last crash
  • Text description
  • Screenshot
  • Anonymised Screenshot would be nice

The UI will be managed in #24.

Danger doesn't detect new changelog files.

If you create a PR with a new changelog file, Danger comments that you should add one. It looks like it is only checking modified files rather than new files, but switching this line to use editedFiles didn't seem to work when I tested it on a PR.

Improve timeline composer keyboard presentation animation

When presenting the keyboard on the timeline the desired behavior is to keep the timeline at the bottom if it was already there. This means hooking into the underlying scroll view and manually pinning it while frames change. This also applies to rotations.
The current implementation relies key value observing the SwiftUI's list underlying tableView offset. Stealing away its delegate is not a viable solution (unless we proxy all the methods).

We need to find a solution to make this smooth.

Minimal Settings Screen UI

We need a very minimal way to

  • logout
  • Report bug
  • App version + Build number
  • Build number navigates to the release / PR

STATE_ERROR_VALIDATION_ERROR for ID

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Design an efficient way to manage list data through FFI

We have different lists containing live data that need to be provided by the Rust SDK:

Those list can be large with thousands of items. Items can be updated in live in all manners: item update, insertion, deletion and move.
We need to find a way for the SDK to share list diff updates. The update mechanism needs

  • to go through the FFI layer
  • to work for any bindings
  • to be consumable for reactive programming used in element apps. We can have a extra layer at the top of the bindings to make the mechanism more native to the final language

Stephan wrote an interface proposal doc. It is highly swift oriented but it is very good start for discussion.

Rust SDK issue: matrix-org/matrix-rust-sdk#642

Setup Brewfile

To allow installing dependencies through brew bundle

  • Swifgen
  • Swiftlint
  • Xcodegen

Set up Nightly builds

We want to automate the release of develop builds so that we can have feedbacks sooner a la develop.element.io.

Timeline composer interactive dismissal

SwiftUI does not provide support for interactive dismissal of the timeline composer. Dragging the keyboard down does work but the SwiftUI view doesn't get resized at all during the process.

The app is currently configured to dismiss on drag, meaning that it will hide the keyboard entirely any time a drag is detected on the timeline, upwards or downwards.

We need to find a way around this and make it feel nicer.

Room list UI

This is a part of IA. We will reuse discoveries from the Delight team

Set up screenshot tests

We would like to use snapshots for our UI tests to speed up repetitive tasks and better resolution.

It seems that the 2 main contenders are:

We should play around with both and see which one we like better.

We also need to find a solution for restoring artefacts between successive runs so we have something to compare with.

It's still up for discussion whether this should be done on Github Actions or Xcode Cloud, mainly because we don't have access to Xcode Cloud yet.

We also talked about adding debug borders around all views to improve snapshot accuracy and, if speedy enough, we can use snapshots within the integration tests as well.

Introduce State Machine component

In order to better track app states we would like to introduce a FSM component that will hard assert that states transitions are correct.
We will use SwiftState and for starters we will rebuild the AppCoordinator on top of it.

Add license

We should add a license, in preparation for a future release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.