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

[android] better user profile (initial layout) #8192

Merged
merged 1 commit into from
May 30, 2024

Conversation

RedAuburn
Copy link
Sponsor Member

@RedAuburn RedAuburn commented May 16, 2024

Some work towards a better user profile page.

Sadly i'm gonna be really busy for the next couple of months, so loading the profile image will have to wait (although it's somewhat working at redauburn/organicmaps/android-user-profile, albeit in the wrong place...)

i thought i may as well submit this stripped down version though, which has a new user info layout, displays the username, and formats the changeset count according to locale.

before/after:

cvbfdfdfg

generic profile image from https://svgsilh.com/image/378368.html (CC0)

@RedAuburn RedAuburn requested a review from a team as a code owner May 16, 2024 11:08
Copy link
Member

@biodranik biodranik left a comment

Choose a reason for hiding this comment

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

Thanks! That is a good start.

@@ -393,6 +393,8 @@ dependencies {
implementation 'com.google.guava:guava:33.1.0-android'
implementation 'com.github.devnullorthrow:MPAndroidChart:3.2.0-alpha'
implementation 'net.jcip:jcip-annotations:1.0'
// Used for circular profile image in profile
implementation 'de.hdodenhof:circleimageview:3.1.0'
Copy link
Member

Choose a reason for hiding this comment

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

Would a square image be enough? It would be great to avoid non-critical dependencies.

@@ -0,0 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="105.34979dp" android:viewportHeight="1280" android:viewportWidth="1215" android:width="100dp">
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@Jean-BaptisteC Jean-BaptisteC left a comment

Choose a reason for hiding this comment

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

✅ Pixel 6 - Android 14
Just need improvement when size police is more big
Screenshot_20240517-000714

android/app/src/main/res/layout/fragment_osm_profile.xml Outdated Show resolved Hide resolved
@Jean-BaptisteC Jean-BaptisteC changed the title [Android] better user profile (initial layout only) [android] better user profile (initial layout only) May 16, 2024
@RedAuburn RedAuburn force-pushed the android-user-profile-layout branch from 6ec118d to 2c7471b Compare May 18, 2024 18:13
@RedAuburn
Copy link
Sponsor Member Author

fixed scaling, using new image, removed circle image view

image1

@biodranik
Copy link
Member

  1. Why is the image not scaled when text is large? The real picture also won't scale, right?
  2. Should user be able to set/change his profile photo after a tap on the stub image?

@RedAuburn
Copy link
Sponsor Member Author

  1. Why is the image not scaled when text is large? The real picture also won't scale, right?

it won't, i didn't think it needed to be bigger but i'll make it scale to fit.

  1. Should user be able to set/change his profile photo after a tap on the stub image?

Definitely, however it makes more sense to implement this when displaying a user profile picture is actually done, otherwise it'll confuse users

@RedAuburn RedAuburn force-pushed the android-user-profile-layout branch from 2c7471b to 41c5143 Compare May 27, 2024 16:19
@RedAuburn
Copy link
Sponsor Member Author

RedAuburn commented May 27, 2024

Converted to ConstraintLayout, profile icon now scales properly and it generally works much better now
normal scaling / 200% scaling
image1

@RedAuburn RedAuburn changed the title [android] better user profile (initial layout only) [android] better user profile (initial layout) May 27, 2024
@biodranik
Copy link
Member

Thanks! Can the title (OpenStreetMap Profile) be somehow autoscrolled when its too large? How Android usually solve this issue in other places?

@RedAuburn RedAuburn force-pushed the android-user-profile-layout branch from 41c5143 to 503f5ed Compare May 28, 2024 22:21
@RedAuburn
Copy link
Sponsor Member Author

RedAuburn commented May 28, 2024

Reworked again to make text always fit (looks mostly the same)

Thanks! Can the title (OpenStreetMap Profile) be somehow autoscrolled when its too large? How Android usually solve this issue in other places?

This is an issue with headers across the app, so I'll open a separate issue for it. There's a marquee scroll effect which we could use, but maybe a better fix would be to use a shorter string when there are larger font sizes (OpenStreetMap Profile -> OSM Profile)

edit: issue opened at #8324

Copy link
Member

@biodranik biodranik left a comment

Choose a reason for hiding this comment

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

LGTM with a few nits.

@biodranik biodranik added this to the Needs alpha/beta testing milestone May 28, 2024
Signed-off-by: Harry Bond <me@hbond.xyz>
@RedAuburn RedAuburn force-pushed the android-user-profile-layout branch from 503f5ed to d169b9e Compare May 28, 2024 23:06
@RedAuburn
Copy link
Sponsor Member Author

fixed nits :)

Copy link
Member

@biodranik biodranik left a comment

Choose a reason for hiding this comment

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

Thanks!

@biodranik biodranik merged commit d4a7936 into organicmaps:master May 30, 2024
6 checks passed
@RedAuburn RedAuburn deleted the android-user-profile-layout branch May 31, 2024 21:00
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.

None yet

3 participants