Patch #31066

Show projects using a table instead of an unordered list in the user profile page

Added by Takenori TAKAKI 2 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:UI
Target version:4.1.0

Description

I felt that the project list on the Profile page looks better 'table' style than 'ul' style. Especially on users with a large number of registered projects.

'ul' style 'table' style
==>

users-memberships-ul.png (204 KB) Takenori TAKAKI, 2019-03-20 08:35

users-memberships-table.png (205 KB) Takenori TAKAKI, 2019-03-20 08:36

31066.patch Magnifier (2.18 KB) Takenori TAKAKI, 2019-03-20 09:11

projects-indented@2x.png (30.5 KB) Go MAEDA, 2019-03-20 15:11

users-memberships-indented-table.png (89.5 KB) Takenori TAKAKI, 2019-03-22 05:01

31066-indent-subproject.patch Magnifier (2.4 KB) Takenori TAKAKI, 2019-03-22 05:03

31066-fix-broken-tests.patch Magnifier (2.41 KB) Takenori TAKAKI, 2019-03-22 14:55

31066-group-memberships-by-project.patch Magnifier (2.45 KB) Go MAEDA, 2019-03-26 03:37

Associated revisions

Revision 18012
Added by Go MAEDA about 1 month ago

Show projects using a table instead of an unordered list in the user profile page (#31066).

Patch by Takenori TAKAKI.

History

#1 Updated by Takenori TAKAKI 2 months ago

I made a patch and attached it.

#2 Updated by Bernhard Rohloff 2 months ago

+1 Looks very clean.
I'll test it when I find a free time slot.

#3 Updated by Go MAEDA 2 months ago

Thank you for submitting the patch.

Takenori Takaki, I think it will be even better if subprojects are indented like admin/projects page. Is it possible?

#4 Updated by Takenori TAKAKI about 1 month ago

Maeda-san, Thank you for your feedback!
I also think that indented lists are better to see.
It is possible to indent in subprojects, by changing like the attached patch.

#5 Updated by Go MAEDA about 1 month ago

Thank you for the really nice improvement! But I encountered the following error while running test suites. Could you look into this?

Failure:
UsersControllerTest#test_show_displays_memberships_based_on_project_visibility [/Users/maeda/redmines/redmine-trunk/test/functional/users_controller_test.rb:176]:
Expected at least 1 element matching "td:nth-of-type(1)>a", found 0..
Expected 0 to be >= 1.

bin/rails test test/functional/users_controller_test.rb:171

#6 Updated by Takenori TAKAKI about 1 month ago

Go MAEDA wrote:

Thank you for the really nice improvement! But I encountered the following error while running test suites. Could you look into this?

Oops...Sorry...I could't notice the test broken.
I repaired the broken tests.

#7 Updated by Go MAEDA about 1 month ago

  • Target version changed from Candidate for next major release to 4.1.0

LGTM. Setting the target version to 4.1.0.

#8 Updated by Go MAEDA about 1 month ago

  • File 31066-group-memberships-by-project.patch added

I have slightly changed 31066-fix-broken-tests.patch.

  • Use Enumerable#group_by outside the loop in order to avoid using Enumerable#select inside the loop. Maybe this is more efficient
  • Remove "members" class from the table because "width: 45%" for td.roles looks too wide

#10 Updated by Go MAEDA about 1 month ago

  • File deleted (31066-group-memberships-by-project.patch)

#11 Updated by Go MAEDA about 1 month ago

  • Subject changed from Change style of projects list from "ul" to "table", displayed on user profile to Show projects using a table instead of an unordered list in the user profile page
  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed. Thanks.

Also available in: Atom PDF