プロジェクト

全般

プロフィール

Vote #76540

未完了

Administration: Using grids instead of tables

Admin Redmine さんがほぼ4年前に追加. ほぼ4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Administration_8
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
8
version_id:
0
issue_org_id:
20287
author_id:
127719
assigned_to_id:
0
comments:
25
status_id:
1
tracker_id:
3
plus1:
2
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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.


journals

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

<pre>
$ 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
</pre>

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
This is rebased note-4 patch on trunk r14507.
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
+1

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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
<pre>
if (fsClass.contains("collapsed"))
</pre>

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

<pre>
if (~fsClass.indexOf("collapsed"))
</pre>

--------------------------------------------------------------------------------
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

--------------------------------------------------------------------------------
Thank you. It works.
--------------------------------------------------------------------------------
This great patch should have been merged by now. :(
Do you have an updated patch for 3.4.0?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Updated to Redmine 4.0
--------------------------------------------------------------------------------
Dear Frederico Camara,

Can you give us a patch for 4.1.1?
Thanks.

--------------------------------------------------------------------------------
Greg T wrote:
> Dear Frederico Camara,
>
> Can you give us a patch for 4.1.1?
> Thanks.

Patch for 4.1.1 (unix)
--------------------------------------------------------------------------------
Frederico Camara wrote:

> Patch for 4.1.1 (unix)

Thanks. One problem still remained:
1 out of 1 hunk FAILED -- saving rejects to file app/views/workflows/_form.html.erb.rej

--------------------------------------------------------------------------------
Greg T wrote:
> Frederico Camara wrote:
>
> > Patch for 4.1.1 (unix)
>
> Thanks. One problem still remained:
> 1 out of 1 hunk FAILED -- saving rejects to file app/views/workflows/_form.html.erb.rej

How I miss git when altering patches. I may have changed the file instead of the patch by mistake.

New patch, disregard the other.
--------------------------------------------------------------------------------
@Frederico Camara

Thank you for continuing to update the patch. This feature will be very pleasing to anyone who needs to read large tables.

The patch posted on #20287#note-20 caused a conflict when applied to the trunk(r19977), so I will attach the patch that resolved it.

To commit this patch to Redmine, it must be available on the latest Redmine in development.
--------------------------------------------------------------------------------
I haven't read the code yet, I noticed that the layout collapses when the screen width is reduced.
--------------------------------------------------------------------------------
Mizuki ISHIKAWA wrote:
> I haven't read the code yet, I noticed that the layout collapses when the screen width is reduced.

It's the css and responsive. Just add 'box-sizing: content-box;' to '.g_c' is public/stylesheets/divgrid.css.

I've been trying to implement this with html tables, which I think would be faster, but html tables are hard. Anything but the trivial and you start struggling with the way it's implemented.

To give you and idea, you can stick rows and columns using position, left and top. You have to z-index the header cells left and top, using background color to hide cells underneath (doesn't hide very well). Also you have to adjust the width of row header cells, and adjust the fieldsets the way I did with the divgrid. And then, it starts looking like divgrid.
--------------------------------------------------------------------------------
Frederico Camara wrote:
> Mizuki ISHIKAWA wrote:
> > I haven't read the code yet, I noticed that the layout collapses when the screen width is reduced.
>
> It's the css and responsive. Just add 'box-sizing: content-box;' to '.g_c' is public/stylesheets/divgrid.css.
>
> I've been trying to implement this with html tables, which I think would be faster, but html tables are hard. Anything but the trivial and you start struggling with the way it's implemented.
>
> To give you and idea, you can stick rows and columns using position, left and top. You have to z-index the header cells left and top, using background color to hide cells underneath (doesn't hide very well). Also you have to adjust the width of row header cells, and adjust the fieldsets the way I did with the divgrid. And then, it starts looking like divgrid.

Thank you for your reply.

I've attached a patch that includes the following changes:
* Fix so that the layout does not collapse when the width is narrowed
* Move css written in style attribute to divgrid.css
* Add class of elements lost on change
* and others
--------------------------------------------------------------------------------
I've attached a patch to #14508#note-2 that fixes the table header with CSS (position: sticky).
--------------------------------------------------------------------------------


related_issues

relates,New,17125,workflow's status-transitions' header-column & header-row pan & scroll out of view when numerous issue-statuses

Admin Redmine さんがほぼ4年前に更新

  • カテゴリAdministration_8 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0