Skip to content

WIP : Set user status#7094

Open
ganfra wants to merge 31 commits into
developfrom
feature/fga/set_user_status
Open

WIP : Set user status#7094
ganfra wants to merge 31 commits into
developfrom
feature/fga/set_user_status

Conversation

@ganfra

@ganfra ganfra commented Jun 24, 2026

Copy link
Copy Markdown
Member

Content

Start implementing the set user status part, but using only in-memory data (no sdk yet).
So this is mostly design work.
What is missing :

  • branching sdk
  • managing emoji picker

Motivation and context

Handles part of
#6877
#6878
#6879

Screenshots / GIFs

See recorded screenshots.

Tests

  • Open settings
  • Enable related feature flag
  • You should see the "What's your status?" item at the top of the Settings screen.
  • Keep in mind the data is only in-memory for now.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • I am aware of the etiquette.
  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@ganfra ganfra added PR-Wip For anything that isn't ready to ship and will be enabled at a later date Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. labels Jun 24, 2026
@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 Jun 24, 2026
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

📱 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/iqz8n2

ganfra added 26 commits June 25, 2026 12:32
@ganfra ganfra force-pushed the feature/fga/set_user_status branch from a6c7ee9 to 29b8068 Compare June 25, 2026 10:33
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 25, 2026
@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 Jun 25, 2026
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.02367% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.63%. Comparing base (a373678) to head (301f930).
⚠️ Report is 129 commits behind head on develop.

Files with missing lines Patch % Lines
...ures/preferences/impl/userstatus/UserStatusView.kt 82.51% 7 Missing and 18 partials ⚠️
.../android/libraries/matrix/impl/RustMatrixClient.kt 21.05% 14 Missing and 1 partial ⚠️
...preferences/impl/userstatus/UserStatusPresenter.kt 90.90% 0 Missing and 3 partials ⚠️
...braries/designsystem/theme/components/TextField.kt 92.85% 1 Missing and 2 partials ⚠️
...nces/impl/userstatus/UserStatusBindingContainer.kt 0.00% 2 Missing ⚠️
.../android/libraries/matrix/test/FakeMatrixClient.kt 87.50% 0 Missing and 2 partials ⚠️
.../preferences/impl/root/PreferencesRootPresenter.kt 75.00% 0 Missing and 1 partial ⚠️
...tures/preferences/impl/root/PreferencesRootView.kt 92.30% 0 Missing and 1 partial ⚠️
...droid/libraries/matrix/api/user/DisplayedStatus.kt 80.00% 1 Missing ⚠️
...nt/android/libraries/matrix/api/user/UserStatus.kt 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7094      +/-   ##
===========================================
+ Coverage    80.62%   80.63%   +0.01%     
===========================================
  Files         2686     2694       +8     
  Lines        76354    76687     +333     
  Branches     10269    10317      +48     
===========================================
+ Hits         61557    61836     +279     
- Misses       10866    10892      +26     
- Partials      3931     3959      +28     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ganfra ganfra marked this pull request as ready for review June 25, 2026 13:29
@ganfra ganfra requested a review from a team as a code owner June 25, 2026 13:29
@ganfra ganfra requested review from bmarty and removed request for a team June 25, 2026 13:29
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jul 2, 2026
@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 Jul 2, 2026

@bmarty bmarty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, tested OK

modifier = Modifier.padding(vertical = 16.dp),
)
},
trailingContent = ListItemContent.Custom({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This trailing content is empty, could be removed.


@ContributesTo(SessionScope::class)
@BindingContainer
interface UserStatusBindingContainer {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our current convention is to name this class UserStatusModule. But maybe we should change the convention (probably tight to the old DI API) and rename the other interfaces at some point.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I don't have strong opinion, I can use Module and we make the change later on the whole codebase

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's keep it like this then, and rename the other ones separately

fun `initial state - no status set`() = runTest {
moleculeFlow(RecompositionMode.Immediate) {
createPresenter().present()
}.test {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use test extension?

override suspend fun getUserProfile(): Result<MatrixUser> = getProfile(sessionId)
.onSuccess { matrixUser ->
_userProfile.emit(matrixUser)
// Also update our session storage

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why removing this comment? It does not add much value but still should not be removed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't like obvious comment like this :)

@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jul 8, 2026
@ganfra ganfra enabled auto-merge July 8, 2026 16:17
@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 Jul 8, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Wip For anything that isn't ready to ship and will be enabled at a later date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants