-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Merge explore orgs
into explore users
#29816
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
Conversation
Now, there is only one `explore` page to search for accounts. The existing setting to define the redirect behavior of `/` has been changed so that it no longer redirects to the no longer existing `/explore/organizations`. As such, this refactoring is not breaking. Additionally fix incorrect visibility behavior that was correct for `/explore/organizations` but incorrect for `/explore/users`. Fixes go-gitea#29803
models/user/search.go
Outdated
if opts.Type.Has() { | ||
cond = builder.Eq{"type": opts.Type} | ||
if opts.IncludeReserved { | ||
if opts.Type.Value() == UserTypeIndividual { | ||
cond = cond.Or(builder.Eq{"type": UserTypeUserReserved}).Or( | ||
builder.Eq{"type": UserTypeBot}, | ||
).Or( | ||
builder.Eq{"type": UserTypeRemoteUser}, | ||
) | ||
} else if opts.Type.Value() == UserTypeOrganization { | ||
cond = cond.Or(builder.Eq{"type": UserTypeOrganizationReserved}) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review hint: Hide whitespace changes for this file
I don't think this is better than before. It's confusing mixed users and orgs. |
Maybe add a https://primer.github.io/octicons/organization-16 besides the org name to distinguish? |
I can also add it in this PR, but I would have liked to first make a refactoring and then a UX enhancement. |
Don't really care, these are seldomly used pages. But I do have a slight preference because landing something "unfinished" into main branch is not so great. |
@silverwind Done. |
Icon and text seem slightly misalign. Maybe it needs a |
Done |
@@ -7,11 +7,11 @@ | |||
<div class="flex-item-main"> | |||
<div class="flex-item-title"> | |||
{{if .IsOrganization}} | |||
<span data-tooltip-content title="{{ctx.Locale.Tr "explore.user_is_organization" .DisplayName}}">{{svg "octicon-organization"}}</span> | |||
<span class="tw-flex tw-justify-center tw-flex-wrap" data-tooltip-content title="{{ctx.Locale.Tr "explore.user_is_organization" .DisplayName}}">{{svg "octicon-organization"}}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tw-items-center
instead of tw-justify-center
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea.
I simply translated your suggestion into tailwind.
Also, I see no improvement when adding tw-items-center
…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry gt-ac
is actually tw-content-center
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still no difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check later. Maybe we should also move the icon into second row and add a User/Organization/Bot text besides it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(the text is currently a tooltip)
I don't think it should be called users, imho the most common use case is to search for organizations not users. Personally I would just drop user search from there but if combined it would be preferable to call the tab Organizations |
Furthermore, you can still query users with it, so it would be false advertising since an org is a user but a user is not necessarily an org. Or how do you see it? |
If you look from business side of view (not how it's technically saved in database) these are both different things. But from use case scenario in this place you would most commonly look for organizations to get to it's repositories not user profile |
If you think both UI are similar because we haven't displayed more information on the list pages. I think the direction is displaying more user or org-related information on the list page but not sharing it. |
I also agree that the concept "User" and "Org" are fundamentally different. Although they share the same base table, but they are different things to end users, and it should avoid mixing them together. |
just to add my 2c ... From a UX perspective having the tab just called "users" will confuse people ... "I want to find the project page, where do I search". From people behaviour there is a mental distinction between what a USER is and what an ORG is since an ORG is a collection of related repositories to meet a common goal . A user however is someone that interacts with gitea/git, is associated with a project (aka ORG) and may have a collection of repositories that at face value would appear to be randomly associated but means something to a user (forks of associated repositories [users or org], their own pet projects). Likewise users are associated to org's via teams but orgs are not associated to a user. NOW... from a streamlining of the UI... this might make sense but
|
At least, add an option next to |
I cannot imagine we have the requirement to search both users and orgs. |
According to #29816 (comment) , should we still keep this PR? |
Probably not. |
Now, there is only one
explore
page to search for accounts.The existing setting to define the redirect behavior of
/
has been changed so that it no longer redirects to the no longer existing/explore/organizations
.As such, this refactoring is not breaking.
Additionally, fix incorrect visibility behavior for
/explore/users
.It was correct for
/explore/organizations
.Fixes #29803
After
(Note that both
tester
andtest-org
are orgs,test2
is a bot, andtest
is a normal user)