User profile view #931

Open
mmarif wants to merge 20 commits from users-profile into main
mmarif commented 2 weeks ago
Owner

Closes #881

Please suggest on current data shown as some may be related to personal(email etc), but at this moment we have not much to show either. So sticking to it is my view on this.

I will extend the taps on profile images once we agree what to show.

@gitnex/Code-Managers

  • Detail
  • Repositories
  • Starred Repos
  • Followers
  • Following
  • Tap on all profile images
  • Organizations
Closes #881 Please suggest on current data shown as some may be related to personal(email etc), but at this moment we have not much to show either. So sticking to it is my view on this. I will extend the taps on profile images once we agree what to show. @gitnex/Code-Managers - [x] Detail - [x] Repositories - [x] Starred Repos - [x] Followers - [x] Following - [x] Tap on all profile images - [x] Organizations
mmarif added this to the 4.0.0 milestone 2 weeks ago
mmarif added the
Feature
label 2 weeks ago
mmarif self-assigned this 2 weeks ago
mmarif added 2 commits 2 weeks ago
mmarif added 1 commit 2 weeks ago
Collaborator

I would suggest using a similar layout to what is already used on the repository details page. I'm sure that adding a few icons would probably improve UX:

Screenshot_1623004260

I would suggest using a similar layout to what is already used on the repository details page. I'm sure that adding a few icons would probably improve UX: ![Screenshot_1623004260](/attachments/e46eae21-c933-46fc-be8d-315b69b31176)

I'd say currently it provides too less information. Personally I think a "complete" solution would be nice, with:

  • general information
  • repositories
  • organizations
  • activity if enabled
  • followers + following

To structure this a bit, you could use a viewpager + tablayout, just like the repository/orgs detail page, or a "tap-to-show" as already used in the repo details for general information and README.

The problem with such a popup is that you can't put much information in it without being overloaded. Personally I think a separate activity/fragment wouldn't be bad, since you can put much more things in there - a popup is just something for small things like warnings or simple questions, but I wouldn't use it to display more there.

But I agree with @opyale idea to use some icons and I also understand if you don't want to display more information than the general - but for me it would be useless in this format. At least the repositories should be included.

I'd say currently it provides too less information. Personally I think a "complete" solution would be nice, with: - general information - repositories - organizations - activity if enabled - followers + following To structure this a bit, you could use a viewpager + tablayout, just like the repository/orgs detail page, or a "tap-to-show" as already used in the repo details for general information and README. The problem with such a popup is that you can't put much information in it without being overloaded. Personally I think a separate activity/fragment wouldn't be bad, since you can put much more things in there - a popup is just something for small things like warnings or simple questions, but I wouldn't use it to display more there. But I agree with @opyale idea to use some icons and I also understand if you don't want to display more information than the general - but for me it would be useless in this format. At least the repositories should be included.
mmarif added 1 commit 2 weeks ago
Poster
Owner

To add that much information, Activity with viewpager is a better option here, popup will be cramped with it and not advised.

To add that much information, Activity with viewpager is a better option here, popup will be cramped with it and not advised.
mmarif added 1 commit 2 weeks ago
mmarif added 1 commit 2 weeks ago
mmarif changed title from [WIP] User profile popup to [WIP] User profile view 2 weeks ago
mmarif added 2 commits 1 week ago
mmarif added 1 commit 1 week ago
mmarif added 1 commit 1 week ago

Do you want to add the organizations? And the activity/heatmap but there's a separate issue on this

Do you want to add the organizations? And the activity/heatmap but there's a separate issue on this
Poster
Owner

@qwerty287 there is no organization and activity API for user profile. Beside, there is no activity API at all not just other user activity.

Heatmap I hope will be added later on, maybe by @opyale.

@qwerty287 there is no organization and activity API for user profile. Beside, there is no activity API at all not just other user activity. Heatmap I hope will be added later on, maybe by @opyale.
mmarif added 1 commit 1 week ago
mmarif added 1 commit 6 days ago
mmarif added 1 commit 6 days ago
mmarif added 1 commit 6 days ago
mmarif changed title from [WIP] User profile view to User profile view 6 days ago
Poster
Owner

It's ready for review and testing.

It's ready for review and testing.
6543 commented 5 days ago
Collaborator

@mmarif

... here is no organization and ... API for user profile ...

There is a seperate endpoint to query

@mmarif > ... here is no organization and ... API for user profile ... There is a seperate endpoint to query
Poster
Owner

@mmarif

... here is no organization and ... API for user profile ...

There is a seperate endpoint to query

Can you mention the endpoint here, so far I haven't seen one except for the current user logged in which has the token saved.

> @mmarif > > > ... here is no organization and ... API for user profile ... > > There is a seperate endpoint to query Can you mention the endpoint here, so far I haven't seen one except for the current user logged in which has the token saved.
6543 commented 5 days ago
Collaborator
@mmarif https://try.gitea.io/api/swagger#/organization/orgListUserOrgs -> `GET /users/{username}/orgs`
Poster
Owner

@6543 thanks, that will work.

It is suppose to be under user section, I was looking for it there.

@6543 thanks, that will work. It is suppose to be under `user` section, I was looking for it there.
mmarif changed title from User profile view to [WIP] User profile view 5 days ago
6543 commented 5 days ago
Collaborator

One thing: since this overwrite my "copy user name" feature, can we add this to the "username" field in provileView?

One thing: since this overwrite my "copy user name" feature, can we add this to the "username" field in provileView?
Poster
Owner

One thing: since this overwrite my "copy user name" feature, can we add this to the "username" field in provileView?

This will be added via long press in another PR.

> One thing: since this overwrite my "copy user name" feature, can we add this to the "username" field in provileView? This will be added via long press in another PR.
mmarif added 1 commit 5 days ago
mmarif added 1 commit 5 days ago
Poster
Owner

One thing: since this overwrite my "copy user name" feature, can we add this to the "username" field in provileView?

This will be added via long press in another PR.

Never mind, I will do it in this PR.

> > One thing: since this overwrite my "copy user name" feature, can we add this to the "username" field in provileView? > > This will be added via long press in another PR. Never mind, I will do it in this PR.
mmarif added 1 commit 4 days ago
mmarif added 1 commit 4 days ago
mmarif changed title from [WIP] User profile view to User profile view 4 days ago
6543 approved these changes 3 days ago
6543 commented 3 days ago
Collaborator

@opyale if you are ok with it too - we can :merge:

@opyale if you are ok with it too - we can :merge:
Collaborator

I will just check the code, but when that's done, we can merge.

I will just check the code, but when that's done, we can merge.
opyale added 1 commit 3 days ago
opyale requested changes 3 days ago
opyale left a comment

Beautiful coding; nice changes. However, I did notice a few things:

  • I can't click on on repositories, starred repositories and orginzations.
  • Sometimes Fragments are blank and only load if you switch tabs.
  • From what I've seen in the code, some parts don't use pagination yet.
private final List<UserInfo> membersListFull;
private static class ViewHolder {
private class ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

Can we please retrieve the Context from one of our views within the ViewHolder and make it static again?

Can we please retrieve the ``Context`` from one of our views within the ``ViewHolder`` and make it ``static`` again?
}
static class UserSearchViewHolder extends RecyclerView.ViewHolder {
class UserSearchViewHolder extends RecyclerView.ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

Here too: Please make this class static. We don't need a reference to the outer class.

Here too: Please make this class ``static``. We don't need a reference to the outer class.
}
static class UserSearchViewHolder extends RecyclerView.ViewHolder {
class UserSearchViewHolder extends RecyclerView.ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

See other comments

See other comments
return usersList.size();
}
class UsersHolder extends RecyclerView.ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

Same as above

Same as above
return usersList.size();
}
class UsersHolder extends RecyclerView.ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

Same as above

Same as above
return organizationsList.size();
}
class OrganizationsHolder extends RecyclerView.ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

See other comments

See other comments
return reposList.size();
}
class RepositoriesHolder extends RecyclerView.ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

See other comments

See other comments
return reposList.size();
}
class StarredRepositoriesHolder extends RecyclerView.ViewHolder {
opyale commented 3 days ago
Poster
Collaborator

See other comments

See other comments

@opyale You even can't click the username or full name in the lists (e.g. follower), only the profile pics.

@opyale You even can't click the username or full name in the lists (e.g. follower), only the profile pics.
opyale added 1 commit 3 days ago
Collaborator

@mmarif Quick question concerning my first point: Do you plan on keeping this PR open while we are transitioning from TinyDB to Bundles?

@mmarif Quick question concerning my first point: Do you plan on keeping this PR open while we are transitioning from ``TinyDB`` to ``Bundle``s?
Collaborator

As per discord he wrote, he like to get this in first move to Bundle and fix "click" on org afterwards to the work once ...

As per discord he wrote, he like to get this in first move to Bundle and fix "click" on org afterwards to the work once ...

Reviewers

6543 approved these changes 3 days ago
opyale requested changes 3 days ago
This Pull Request has changes requested by an official reviewer.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.