Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room activity indicators #5690

Merged
merged 2 commits into from
Mar 1, 2022
Merged

Room activity indicators #5690

merged 2 commits into from
Mar 1, 2022

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Feb 24, 2022

Resolves #5603

Each time I added indicators to a new screen, I encounter different challenges and architectures across the app, which forced me to change the shape of the API:

  • In this PR I took away global indicators from AppNavigator and instead placed them into TabBarCoordinator and SplitViewCoordinator, because those are actually the views that typically display the indiciators, and are already close-enough to RoomCoordinator. The idea of a global / shared presenter is quite complicated, because there isn't always one guaranteed navigation controller available and setup
  • RoomViewController actually used to have two distinct loading indicators, one on the controller itself, and the other on top of PlaceholderViewController that actually gets replaced. To show toasts instead requires having a navigationController with navigationBar (to anchor the toast correctly) and this is by no means easy, because a view controller does not actually yet have navigationController by the time of viewDidLoad. To solve this the room is not being injected with indicator presenter, which uses split views's detail router to show the indicator. This means we can show the spinner even before the RoomViewController is on screen and the placeholder is showing instead.
  • Introduced UserIndicatorType to simplify the creation of the interactors. The enum can be extended in the future based on need.
iPhone Light iPhone Dark
Simulator Screen Shot - iPhone 13 - 2022-02-24 at 15 01 21 Simulator Screen Shot - iPhone 13 - 2022-02-24 at 15 02 20
With Unread Portrait With Unread Landscape
Simulator Screen Shot - iPhone 13 - 2022-02-24 at 15 09 21 Simulator Screen Shot - iPhone 13 - 2022-02-24 at 15 14 11
iPad Light iPad Dark
Simulator Screen Shot - iPad Pro (12 9-inch) (5th generation) - 2022-02-24 at 14 58 18 Simulator Screen Shot - iPad Pro (12 9-inch) (5th generation) - 2022-02-24 at 14 58 31

@Anderas Anderas requested a review from amshakal February 24, 2022 15:25
@github-actions
Copy link

github-actions bot commented Feb 24, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/sJrTGQ

@Anderas Anderas changed the base branch from andy/tmp_develop to develop February 25, 2022 10:47
Signed-off-by: Andy Uhnak <[email protected]>
@Anderas Anderas force-pushed the andy/5603_room_indicators branch from 5d56120 to 6386566 Compare February 25, 2022 10:47
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@Anderas Anderas merged commit bb4f44a into develop Mar 1, 2022
@Anderas Anderas deleted the andy/5603_room_indicators branch March 1, 2022 13:08
@ShadowJonathan
Copy link
Contributor

One note; i think it looks a bit awkward together with the Unread pill, but in general i think this addresses part of #4614

I'll have to see and feel this in action before i can say this fully addresses it though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refresh Room Activity Indicators
4 participants