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

Some rework on the codebase #2130

Merged
merged 12 commits into from
Jan 22, 2024
Merged

Some rework on the codebase #2130

merged 12 commits into from
Jan 22, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Dec 29, 2023

This PR now includes only rework that I want to merge on develop first. So no change in UI and in behavior. Just renaming and clean up.

A following PR will come with the change about notification counts.

- First commit: #2080 again, which had been reverted in #2095. - Second commit new version of the SDK, which fix the "RoomInfo.notificationCount always equal to 0" issue - Thrid commit: map `RoomInfo.notificationCount` to `RoomSummaryDetails.numUnreadMessages`, since `RoomInfo.numUnreadMessages` still have some issue. This thrid commit may be reverted at some point.

The behavior of the notification badges in the room list should be similar to the iOS app with this change.

@bmarty bmarty requested a review from a team as a code owner December 29, 2023 11:45
@bmarty bmarty requested review from jmartinesp and removed request for a team December 29, 2023 11:45
Copy link
Contributor

github-actions bot commented Dec 29, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/VE8VEG

@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Dec 29, 2023
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Dec 29, 2023
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (72253c0) 69.95% compared to head (ec7badf) 70.01%.
Report is 12 commits behind head on develop.

Files Patch % Lines
...cations/edit/EditDefaultNotificationSettingView.kt 50.00% 0 Missing and 1 partial ⚠️
...eatures/roomlist/impl/components/RoomSummaryRow.kt 50.00% 0 Missing and 1 partial ⚠️
.../notifications/DefaultNotificationDrawerManager.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2130      +/-   ##
===========================================
+ Coverage    69.95%   70.01%   +0.05%     
===========================================
  Files         1335     1335              
  Lines        32666    32660       -6     
  Branches      6790     6791       +1     
===========================================
+ Hits         22853    22868      +15     
+ Misses        6536     6514      -22     
- Partials      3277     3278       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

I'm still seeing an issue I saw before we reverted this: when a room has a previous message with a mention to you, received while the app wasn't running, the unread count and mention won't be gone until a new message in that room (not coming from the current user) is received.

I'm wondering if we should merge it in this state?

@jmartinesp
Copy link
Member

Could we do the same as iOS, and use a feature flag to decide whether to use the legacy behaviour for this, or this new one?

@bmarty
Copy link
Member Author

bmarty commented Jan 8, 2024

Could we do the same as iOS, and use a feature flag to decide whether to use the legacy behaviour for this, or this new one?

Yes, we could. I wanted to avoid this, but if it helps, let's do it.

@bmarty
Copy link
Member Author

bmarty commented Jan 18, 2024

I'm still seeing an issue I saw before we reverted this: when a room has a previous message with a mention to you, received while the app wasn't running, the unread count and mention won't be gone until a new message in that room (not coming from the current user) is received.

Can we "accept" this as a limitation, and open an issue somewhere (on the Rut side?), to unblock this PR again?

I do not want to add a feature flag to mitigate this. Let's keep it simple. Do you agree @jmartinesp?

@jmartinesp
Copy link
Member

I do not want to add a feature flag to mitigate this. Let's keep it simple. Do you agree @jmartinesp?

I think it would be better to have a FF since the new behaviour is not working that well, and can make the users believe we also have stuck 'notifications' as in EW. Maybe it's better to wait until matrix-org/matrix-rust-sdk#2978 is merged an check if that fixes the issue?

If you think we should merge it as is we can do that, I'm just a bit reluctant to do it because of how users might react if the app starts behaving weirdly here.

@bmarty
Copy link
Member Author

bmarty commented Jan 18, 2024

matrix-org/matrix-rust-sdk#2978 has just been merged 🎉 . I will do some test with it.

@bmarty
Copy link
Member Author

bmarty commented Jan 19, 2024

@jmartinesp splitting the PR to 2 parts. First part is some rework, and once merged I will create another PR for the change about notification count.

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jan 19, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jan 19, 2024
@bmarty bmarty changed the title Room list badge Some rework on the codebase Jan 19, 2024
@bmarty
Copy link
Member Author

bmarty commented Jan 19, 2024

I will iterate to ensure that existing screenshots do not change.

@bmarty bmarty mentioned this pull request Jan 19, 2024
14 tasks
@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 19, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jan 19, 2024
@bmarty
Copy link
Member Author

bmarty commented Jan 19, 2024

OK, I will record screenshot because actually the current preview is better (latest message with timestamp). There is less change, so that's fine.

Copy link

sonarcloud bot commented Jan 19, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Member Author

@bmarty bmarty Jan 22, 2024

Choose a reason for hiding this comment

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

Having a timestamp and no last message should not happen, but I will fix in a future PR (in #2265)

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jan 22, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jan 22, 2024
@bmarty bmarty enabled auto-merge January 22, 2024 08:56
@bmarty bmarty merged commit c3538e5 into develop Jan 22, 2024
18 checks passed
@bmarty bmarty deleted the feature/bma/roomListBadge branch January 22, 2024 09:17
@bmarty bmarty mentioned this pull request Jan 22, 2024
14 tasks
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.

2 participants