Patch #20287

Administration: Using grids instead of tables

Added by Frederico Camara over 2 years ago. Updated 5 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Administration
Target version:-

Description

We are a brazillian government agency and we've been using Redmine to control ExpressoBr (groupware) tickets.

Some time ago, it became difficult to manage the workflow status transitions. In a complex workflow, the table becomes so large it would scroll horizontally and vertically away from the first line and column. Zooming out and filters helped somehow, mainly if the status transition would be nearer the top left. The most recently created statuses would be too far right and down for zoom to help.

This patch transforms the administration tables into grids, so the first row and first column are always visible, like in a worksheet. Also, I got rid of the button that selected the whole line or column, because it became completely useless in a large grid, but I think it is easy to put it back.

Redmine has 5 pages with tables in administration:
  • Roles and Permissions > Permission Report
  • Trackers > Summary
  • Workflow > Summary
  • Workflow > Status transitions
  • Workflow > Field permissions

The grid itself is something like a table, it has four parts: A floating first cell, a first line stuck to the top of the grid, a first row stuck to the left, a body that on scroll, repositions the first row and first line using javascript. The other javascript resizes the width of columns in the grid.

divgrid.css Magnifier - public/stylesheets/divgrid.css (752 Bytes) Frederico Camara, 2015-07-10 21:54

divgrid.js - public/javascripts/divgrid.js (1001 Bytes) Frederico Camara, 2015-07-10 21:54

divgrid - patch file to redmine 2.6.5 (28.1 KB) Frederico Camara, 2015-07-10 21:54

divgrid - patch file to redmine 2.6.6 (29.8 KB) Frederico Camara, 2015-07-12 16:00

rm20287_2.6-stable.r14424.patch Magnifier (31 KB) Mischa The Evil, 2015-07-19 08:34

issue-20287-trunk-r14507.diff Magnifier (31 KB) Toshi MARUYAMA, 2015-08-18 05:39

issue-20287-redmine-3.2.0.diff Magnifier (34.5 KB) Frederico Camara, 2015-12-28 17:55

issue-20287-redmine-3.3.0.diff Magnifier (33.9 KB) Frederico Camara, 2017-03-23 14:02

issue-20287-redmine-3.4.0.diff Magnifier (34.7 KB) Frederico Camara, 2017-07-05 12:50


Related issues

Related to Redmine - Defect #17125: workflow's status-transitions' header-column & header-row... New

History

#1 Updated by Go MAEDA over 2 years ago

I tried to apply your patch but I encountered the following error.

$ patch -p1 < divgrid
patching file app/views/roles/permissions.html.erb
patching file app/views/trackers/fields.html.erb
patching file app/views/workflows/permissions.html.erb
patch: **** malformed patch at line 472: diff -ruN redmine-2.6.5/app/views/workflows/index.html.erb redmine/app/views/workflows/index.html.erb

#2 Updated by Frederico Camara over 2 years ago

#3 Updated by Frederico Camara over 2 years ago

Go MAEDA wrote:

I tried to apply your patch but I encountered the following error.

[...]

Thank you for reporting.

I made the patchfile again, against redmine 2.6.6. It is the same code as 2.6.5.

In 2.6.5, I think I removed windows line feeds from the files I was patching against and it messed up the patchfile.

2.6.6 should be ok.

#4 Updated by Mischa The Evil over 2 years ago

I've extracted a corrected patch file (see Patch), using TortoiseSVN (so it can be applied using "patch -p0 < rm20287..."), against source:/branches/2.6-stable@14424. It contains the changes included in the diff file (as posted in #20287-2) and the addition of the JS and CSS files. This way it is much easier to review the changes made.

FTR: I have not reviewed the diff in substance, but I like the general idea behind this enhancement.

#5 Updated by Toshi MARUYAMA over 2 years ago

This is rebased note-4 patch on trunk r14507.

#6 Updated by Frederico Camara almost 2 years ago

This is updated to use redmine-3.2 code (stable).

- Resolves some html format bugs on previous patches.

To apply:

patch -p1 < issue-20287-redmine-3.2.0.diff

#7 Updated by Yuuki NARA about 1 year ago

+1

#8 Updated by N O about 1 year ago

+1

#9 Updated by Go MAEDA 12 months ago

  • Related to Defect #17125: workflow's status-transitions' header-column & header-row pan & scroll out of view when numerous issue-statuses added

#10 Updated by Greg T 9 months ago

I tried to apply this to Redmine 3.3, which wasn't easy with GNU patch, but it still has a javascript error: TypeError: fsClass.contains is not a function (when trying to access the Additional transitions allowed when the user is ... elements) at

if (fsClass.contains("collapsed"))

Can you please fix that?

It seems contains is an outdated version of the includes method. But even that may not be supported by browsers (e.g. IE11), so it's safer to use

if (~fsClass.indexOf("collapsed"))

#11 Updated by Frederico Camara 9 months ago

Greg T wrote:

I tried to apply this to Redmine 3.3, which wasn't easy with GNU patch, but it still has a javascript error: TypeError: fsClass.contains is not a function (when trying to access the Additional transitions allowed when the user is ... elements) at
[...]

Can you please fix that?

It seems contains is an outdated version of the includes method. But even that may not be supported by browsers (e.g. IE11), so it's safer to use

[...]

Thank you, I fixed that and updated the patch to what I am using now in production.

To apply:

patch -p1 < issue-20287-redmine-3.3.0.diff

#12 Updated by Greg T 9 months ago

Thank you. It works.

#13 Updated by Greg T 5 months ago

This great patch should have been merged by now. :(
Do you have an updated patch for 3.4.0?

#14 Updated by Frederico Camara 5 months ago

Greg T wrote:

This great patch should have been merged by now. :(
Do you have an updated patch for 3.4.0?

I updated the patch to the little changes made between 3.3.0 and 3.4.0. Did a little testing and it seems alright.

#15 Updated by Greg T 5 months ago

Frederico Camara wrote:

I updated the patch to the little changes made between 3.3.0 and 3.4.0. Did a little testing and it seems alright.

Thank you very much.

Also available in: Atom PDF