Skip to content

⚒️🎨 Migrate Profile to Composable - #5943

Merged
AndyScherzinger merged 8 commits into
masterfrom
feat/noid/profileComposable
Mar 19, 2026
Merged

AndyScherzinger merged 8 commits into
masterfrom
feat/noid/profileComposable

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Mar 10, 2026

Copy link
Copy Markdown
Member
  • Migrate the activity and scope dialog layouts to composable
  • Move away from item adapter to be used for the scope dialog but use MutableList instead

Note: Ultimately but not done by this PR we should move to MVVM - When having/implementing a ProfileViewModel, the item list and updateScope belong there as a StateFlow<List<UserInfoDetailsItem>>. ScopeDialog's onScopeSelected would call viewModel.updateScope(position, scope) and the UI observes the flow. This would be even cleaner but is a larger refactor, making the review more complex. So better do it step by step.

🚧 TODO

  • review & merge

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@AndyScherzinger AndyScherzinger added the 2. developing Work in progress label Mar 10, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from a1a692f to 7c08cfb Compare March 11, 2026 22:39
@AndyScherzinger AndyScherzinger added this to the 23.1.0 milestone Mar 11, 2026
@AndyScherzinger AndyScherzinger added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 11, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch 3 times, most recently from fe6e794 to 6dfb58e Compare March 12, 2026 06:22
@AndyScherzinger AndyScherzinger added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Mar 12, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from 18e7c37 to a88468f Compare March 12, 2026 07:40
@AndyScherzinger
AndyScherzinger marked this pull request as ready for review March 13, 2026 15:34
@AndyScherzinger AndyScherzinger added design Related to the design 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 13, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch 2 times, most recently from 702297b to 33d4502 Compare March 15, 2026 17:06
@sowjanyakch

Copy link
Copy Markdown
Contributor

Edit the profile and rotate the screen. Edited changes are lost - changes must be retained. This needs to be implemented along with MVVM.

@sowjanyakch sowjanyakch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The avatar upload options should be centered aligned.
Screenshot 2026-03-16 at 18 27 58

@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from 33d4502 to 0089ee8 Compare March 16, 2026 22:11
@AndyScherzinger

Copy link
Copy Markdown
Member Author

@sowjanyakch regarding center alignment of #5943 (review) for the buttons, if center aligned than they aren't aligned with the profile activation bo x_nor_ with the above user displayname or any other element, so it is very unaligned then, no?

Any feedback @nimishavijay @jancborchardt ?

@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from 0089ee8 to cd3464d Compare March 18, 2026 06:18
@nimishavijay

nimishavijay commented Mar 18, 2026

Copy link
Copy Markdown
Member

I would agree that center aligning looks off, I'm wondering if a layout like this is feasible? This removes the center/left aligned issue as the only option is center aligning everything in the left column. In the right column we should make sure to align the icons of the "Enable profile" item with the other icons below

image

Additionally, if possible we should make the following changes:

  • Use a smaller toggle icon for the "Enable profile" toggle
  • Reduce its height to the standard height (should be 44px?)
  • Remove the background for the "Enable profile" toggle
    What do you think? @AndyScherzinger @sowjanyakch

@AndyScherzinger

Copy link
Copy Markdown
Member Author

Use a smaller toggle icon for the "Enable profile" toggle

Definitive no on this one. The switch is standard M3/Android.

Reduce its height to the standard height (should be 44px?)

Let's see, list items would be min 56dp but... I did not add it to the list for a reason since all other items are input fields, so
this complicates thing, but let's see. First step could still be to keep it on the left column for easier implementation life.

Remove the background for the "Enable profile" toggle

Sure thing.

@AndyScherzinger

AndyScherzinger commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

@nimishavijay @sowjanyakch
Screenshot_20260318_114553

@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch 2 times, most recently from 294efab to a10212f Compare March 18, 2026 10:43
@nimishavijay

nimishavijay commented Mar 18, 2026

Copy link
Copy Markdown
Member

Nice! I checked the M3 specs and seems like there is no way to get around it. in that case the priority would be the spacing and alignment

  • center align all the icons on the right with the toggle icon
  • add some spacing between the text fields and the icons such that there is equal spacing on the left and right of the icons

Once that's done it should be good to go!

@AndyScherzinger

Copy link
Copy Markdown
Member Author

@nimishavijay final iteration :)

Screenshot_20260318_134058

@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from a10212f to 515c272 Compare March 18, 2026 12:44
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from 515c272 to e654c70 Compare March 18, 2026 13:29
AI-assistant: Claude Code v2.1.72 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…y away from adapter to mutableList

AI-assistant: Claude Code v2.1.74 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from e654c70 to 15535b5 Compare March 18, 2026 13:31
mahibi
mahibi previously requested changes Mar 18, 2026
Comment thread app/src/main/java/com/nextcloud/talk/profile/AvatarSection.kt
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Comment thread app/src/main/java/com/nextcloud/talk/profile/AvatarSection.kt Outdated
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch 2 times, most recently from 5caaaa4 to bec78fb Compare March 18, 2026 23:35
AI-assistant: Copilot 1.0.6 (Claude Sonnet 4.6)

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the feat/noid/profileComposable branch from bec78fb to 32d8ddf Compare March 18, 2026 23:43
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@github-actions

Copy link
Copy Markdown
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/5943.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings9893
Errors00

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1010
Dodgy code5454
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total8181

@AndyScherzinger
AndyScherzinger merged commit d34123b into master Mar 19, 2026
17 of 18 checks passed
@AndyScherzinger
AndyScherzinger deleted the feat/noid/profileComposable branch March 19, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews design Related to the design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants