Feature #1575

Toolbar button to insert a table

Added by Konrad Kosmowski about 12 years ago. Updated 7 months ago.

Status:ClosedStart date:2008-07-04
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Text formatting
Target version:4.2.0
Resolution:Fixed

Description

When you open the formatting help popup it lacks info about tables. AFAIK with textile markup it is possible to create tables using markup like that:

|cell|cell|cell|
|another cell|merged cell||

Output:

cell cell cell
another cell another cell another cell

So as you see it is possible to create tables - too bad that help does not mention it - I needed to look after textile documentation to get that info. For me it is no problem but I manage Redmine for less technical people and they probably dont even look at help but strictly at the toolbar - when there is no table icon it means there is no tables. ;)

feature-1575.patch Magnifier (4.58 KB) Mizuki ISHIKAWA, 2020-02-19 06:17

use-table-generator.gif (364 KB) Mizuki ISHIKAWA, 2020-02-19 06:21

image.png (156 Bytes) Hiroyuki ENDO, 2020-02-21 07:17

use-table-icon.png (46 KB) Mizuki ISHIKAWA, 2020-02-21 07:30

0001-feature-1575-patch-with-table-icon.patch Magnifier (5.73 KB) Mizuki ISHIKAWA, 2020-02-21 07:35

0001-feature-1575-patch-with-table-icon.patch Magnifier (5.73 KB) Mizuki ISHIKAWA, 2020-02-21 08:16

Screen Shot 2020-02-26 at 9.27.58 AM.png - Firefox (31.1 KB) Kevin Fischer, 2020-02-26 01:33

Screen Shot 2020-02-26 at 9.32.36 AM.png - Chrome (27.3 KB) Kevin Fischer, 2020-02-26 01:33

0002-Firefox-support.patch Magnifier (711 Bytes) Mizuki ISHIKAWA, 2020-02-26 03:19

0003-IE11-support.patch Magnifier (1.91 KB) Mizuki ISHIKAWA, 2020-02-26 03:19

table-icon-1.png (20.3 KB) Go MAEDA, 2020-03-03 10:53

table-icon-2.png (21.3 KB) Go MAEDA, 2020-03-03 10:53


Related issues

Related to Redmine - Feature #12734: Add table reference to textile help Closed

Associated revisions

Revision 19561
Added by Go MAEDA 7 months ago

Toolbar button to insert a table (#1575).

Patch by Mizuki ISHIKAWA and Hiroyuki ENDO.

History

#1 Updated by Paul Rivier about 12 years ago

I agree, but what would a "table" button insert ? Two '|' ? We would probably need something a bit more evolved for such a button, such as a pop-up window asking for
  • number of rows
  • number of columns
  • use headers ? (checkbox)

Once the template syntax is inserted, it probably becomes more natural to fill the cells and tweak it by hand.

#2 Updated by Konrad Kosmowski about 12 years ago

Paul Rivier wrote:

I agree, but what would a "table" button insert ?

It could work like in MS Word or OpenOffice.

#3 Updated by Jean-Philippe Lang about 12 years ago

  • Tracker changed from Defect to Feature

#4 Updated by Go MAEDA about 5 years ago

  • Related to Feature #12734: Add table reference to textile help added

#5 Updated by Go MAEDA 7 months ago

  • Subject changed from Markup help and toolbars lacks tables to Toolbar button to insert a table
  • Category changed from Wiki to Text formatting
  • Priority changed from Low to Normal

Since markup help already has information about tables (#12734), I am changing the subject of this issue.

#6 Updated by Mizuki ISHIKAWA 7 months ago

The attached patch adds a button to insert a table into the wiki toolbar.
The button create a table with rows / columns according to the selected range.

Markdown:

|A |B |C |D |E |
|--|--|--|--|--|
|  |  |  |  |  |
|  |  |  |  |  |
|  |  |  |  |  |

Textile:

|_.A|_.B|_.C|_.D|_.E|
|  |  |  |  |  |
|  |  |  |  |  |
|  |  |  |  |  |

Currently no icon image is set for the button. It is necessary to create a new appropriate icon image.

#7 Updated by Go MAEDA 7 months ago

  • Target version set to Candidate for next major release

#8 Updated by Hiroyuki ENDO 7 months ago

I made a new icon image.

#9 Updated by Mizuki ISHIKAWA 7 months ago

Hiroyuki ENDO wrote:

I made a new icon image.

Thank you for making the icon.
The icon looks very nice!

Screenshot when image.png is applied:

Updated the patch to use image.png as table button icon.

#11 Updated by Kevin Fischer 7 months ago

Unfortunately the grid lines of the selection UI are not properly displayed in Firefox.

Chrome:

Firefox:

This seems to be a long running bug of Firefox though: https://bugzilla.mozilla.org/show_bug.cgi?id=688556

There seem to be workarounds, like using

background-clip: padding-box;
on the cells... But then it looks a little bit strange on Chrome on the other hand

#12 Updated by Mizuki ISHIKAWA 7 months ago

Kevin Fischer wrote:

Unfortunately the grid lines of the selection UI are not properly displayed in Firefox.

Thanks for sharing the information!!
Operation verification on browsers other than Chrome was insufficient.
Since a problem was found not only in Firefox but also in IE11, a patch that solves the problem is attached.

0002-Firefox-support.patch resolves Firefox by removing `td { position: relative; }`.
0003-IE11-support.patch avoids using repeat function that did not work in IE11.

#13 Updated by Go MAEDA 7 months ago

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

Setting the target version to 4.2.0.

#14 Updated by Jan from Planio www.plan.io 7 months ago

I really like this patch. Great work!

For the icon, I think famfamfam should be used to stay consistent with the style of other icons in Redmine.

#15 Updated by Go MAEDA 7 months ago

Jan from Planio www.plan.io wrote:

For the icon, I think famfamfam should be used to stay consistent with the style of other icons in Redmine.

Thank you for the feedback. I think the suggested table icon is better than famfamfam's table icon because famfamfam's table icon looks like a document.

The suggested icon:

famfamfam's table icon:

#16 Updated by Mizuki ISHIKAWA 7 months ago

I also prefer image.png.
The famfamfam's icon does not look like a table because each cell is too small to identify.

#17 Updated by Go MAEDA 7 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for improving Redmine.

Also available in: Atom PDF