Bug 89131 - UI Control spin button for number of heading rows in dialog Insert Table is not working
Summary: UI Control spin button for number of heading rows in dialog Insert Table is n...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.5
Keywords:
Depends on:
Blocks: Dialog Writer-Tables
  Show dependency treegraph
 
Reported: 2015-02-05 03:31 UTC by Sheeba Medoline
Modified: 2022-10-13 18:39 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of Insert table in Libre Office writer (36.74 KB, image/jpeg)
2015-02-05 03:31 UTC, Sheeba Medoline
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sheeba Medoline 2015-02-05 03:31:39 UTC
Created attachment 113134 [details]
Screenshot of Insert table in Libre Office writer

Actual Result: 

While choosing the "Insert Table" then "more options", then selecting the "Heading" check box in "option" , control spin button is not working in "Heading rows". It can be increased or decreased by manual, but constantly only two rows with two columns are added as heading row.

Expected Result:

While choosing the "Insert Table" then "more options", then selecting the "Heading" check box in "option" , control spin button should work in "Heading rows". It should  be increased or decreased by manual also, and it should produce the number of heading rows entered by the user.

Step 1: Open Libre office Writer
Step 2: Click Insert Table
Step 3: Click More Options
Step 4: Click "Heading" check box
Step 5: When Click the "Heading rows", values are increased/decreased by control spin button.
Comment 1 Cor Nouws 2015-02-05 08:46:46 UTC
Hi Sheeba,

Thanks for reporting.
I confirm that the spin button does not work.
But I can set more header rows by typing the number - of course depending on the total amount of rows.

(I did not check the first version with this problem.)
Comment 2 QA Administrators 2016-02-21 08:34:20 UTC Comment hidden (obsolete)
Comment 3 Cor Nouws 2016-02-22 20:30:49 UTC
Still not working in Version: 5.2.0.0.alpha0+
Build ID: a3c70e760fa4203b7e6692f82d1d8a14214af3da
CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2016-02-17_23:47:57
Locale: nl-NL (nl_NL.UTF-8)
Comment 4 Cor Nouws 2016-02-22 20:32:30 UTC
and already a bug in version 3.3.0 :)
Comment 5 QA Administrators 2017-03-06 14:53:03 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2019-12-03 14:31:31 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2021-12-03 04:34:45 UTC Comment hidden (obsolete)
Comment 8 sdc.blanco 2022-05-26 09:13:59 UTC
Repro

Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 09822cf77cdbe32b03553cd05154100b5f2591d0
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL


Additional information:

1.  Perhaps the spinbox should be removed for now -- or maybe permanently.

=> NeedsUXEval

Explanation:  

1. The first "problem" in OP about "only two rows"  (not checked by confirmer in comment 1) appears to be "by design".  

2. Note that first row inserted has PS "Table Heading", while second row has PS "Table Contents"

3.  Note that although you can enter a number manually in the spinbox, when you change focus, e.g., to Columns, then the value in the "Heading rows" spinbox returns to "1"  -- which probably also explains why the spinbox does not work.

4. As a test -- make first two rows with PS "Table Heading" -- and a table over 2 pages -- only the first row is repeated on the second page.

5. Ok, maybe one will expect the test to fail if the Heading Rows is only set to "1" -- but -- afaict -- there is no option in the Table properties (or elsewhere) that allows a user to change the number of Heading Rows.

ergo:  Either "Heading Rows" needs to take larger values and have an option in Table properties to allow a user to change it  -- or -- the "Options" section in the "Insert Table" should:  (a) drop "Heading rows" and its buddy, and (b) change "Repeat heading rows..." to "Repeat heading row..."
Comment 9 Regina Henschel 2022-05-26 18:30:28 UTC
I cannot confirm the problem. I can increase the number of heading rows with the spin button and the generated table has the number of heading rows as set.

Tested with Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

Perhaps your table has not enough rows? Set the number of rows to 20 in the upper part of the dialog, for example, and try again.
Comment 10 sdc.blanco 2022-05-26 21:44:20 UTC
(In reply to Regina Henschel from comment #9)
> Perhaps your table has not enough rows? 
That was exactly the problem.

Making the table with 6 rows was enough to use the spinbox to add three heading rows (and these three heading rows are carried over to the next page of the table, and the Text Flow tab in Table Properties gives the possibility to change how many rows will be in the heading).

=> not a bug

But maybe a sign that this ticket should be converted to a Documentation bug.

There are extended tooltips for this dialog.  

But maybe a tooltip on the spinbox would help, such as:  

   Cannot be greater than number of rows - 1

(And actually that information could/should probably be added to the extended tooltip as well.)

code pointer: sw/uiconfig/swriter/ui/inserttable.ui

Will leave question to UXEval...maybe as EasyHack...

Nothing is mentioned about this in the help page for this dialog:

https://help.libreoffice.org/7.4/en-US/text/swriter/01/04150000.html
Comment 11 sdc.blanco 2022-05-26 21:55:17 UTC
Here is a proposal for a sentence to add to the description of "Heading rows" in the help page:

The spinbox accepts values up to one less than the number of rows being inserted.

https://gerrit.libreoffice.org/c/help/+/135004

(will leave tooltips to others...)
Comment 12 Heiko Tietze 2022-05-27 07:29:23 UTC
(In reply to sdc.blanco from comment #11)
> But maybe a tooltip on the spinbox would help, such as:  
> 
>    Cannot be greater than number of rows - 1

Good idea. 

Besides, the usual feedback is a disabled up button (or down respectively) if the limits are reached. Does not happen although done in the code with

m_xRepeatHeaderNF->set_max( nMax ); in sw/source/ui/table/instable.cxx

Works with gtk3 but not with gen/kf5. 

Caolan, anything we can do? All spinbuttons including those at the sidebar don't become disabled in respect to min/max.
Comment 13 Commit Notification 2022-05-27 08:08:43 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/60d9df79df1071d5ad299464a4705abb237810ca

tdf#89131 add explanation about adding Heading rows to Insert - Table
Comment 14 Caolán McNamara 2022-05-29 20:31:34 UTC
(In reply to Heiko Tietze from comment #12)
> ... the usual feedback is a disabled up button (or down respectively)
> if the limits are reached.

> Works with gtk3 but not with gen/kf5. 
> 
> Caolan, anything we can do?

https://gerrit.libreoffice.org/c/core/+/135105 is an initial path in that direction. As always things are never simple and I think while this works for "pure" gen, the themed versions of gen, e.g. windows, draw both spinners together with a single enabled/disabled bit so will probably need a follow up adjustment for those
Comment 15 sdc.blanco 2022-05-29 22:00:08 UTC
Another perspective for thinking about the Table > Insert Table dialog.

Why not let the software do the mental arithmetic to add the required number of rows to match the value in the “Heading rows” spinbox plus the value in “Rows” in the general column – rather than pushing that task over to the user, as is done at present? 

Explanation of work flow.

1. General section offers Rows and Columns (do some users just take the default to get started, because it is easy to add rows and columns?)

2. Options section introduces a post facto question (after deciding rows and columns), where user must take some positive actions (a) “enable” Heading (b) decide whether to change number of Heading rows. 

Why can’t user assume that the “Heading rows” are going to be added “on top” of the rows and columns, which were already decided (or not) in the General section? (I probably did).

From that point of view, the spinbox could/should take any value, where those rows are added "on top" of the rows chosen in General.

That approach would make disabled spinboxes unnecessary (and possibly the tooltip as well -- or maybe inspire another tooltip).



(note that Table Properties – Text Flow tab has the control:
   Repeat Heading The first [spinbox] rows
where it is possible to enter any value into the spinbox 

(though in that case, if the value exceeds the number of rows, 
the value is reset to total number of rows on reopening the dialog).
Comment 16 Caolán McNamara 2022-05-30 08:16:58 UTC
(In reply to Caolán McNamara from comment #14)
> I think while this works for "pure" gen, the themed versions of gen, e.g.
> windows, draw both spinners together with a single enabled/disabled bit so
> will probably need a follow up adjustment for those

wrt that, it seems not, that's already taken care of, so looks good for the general case after all. Checked under windows at least.
Comment 17 Commit Notification 2022-05-30 08:17:23 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2896c5dad1799addd72b626d93d7e89b1cf19ff6

Related: tdf#89131 draw up/down spins disabled if value is at max/min

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Heiko Tietze 2022-05-30 10:53:23 UTC
(In reply to Commit Notification from comment #17)
> Caolán McNamara committed a patch related to this issue.

Works nicely on kf5 too, thanks Caolan!

UX-wise solved, adding a note to documentation makes sense.
Comment 19 Commit Notification 2022-05-31 10:32:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/7c411a6df34ce5b04f964b0410b6d2535389918d

Related: tdf#89131 draw up/down spins disabled if value is at max/min

It will be available in 7.3.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Martin Srebotnjak 2022-06-29 13:03:34 UTC
Isn't this a UI bug, not a documentation one - if the UI button is not working as expected?
Comment 21 Heiko Tietze 2022-06-29 13:13:01 UTC
(In reply to Martin Srebotnjak from comment #20)
> Isn't this a UI bug, not a documentation one - if the UI button is not
> working as expected?

See the commits and comments above. UI issue was a missing disabled state when the spin button has max/min value. The documentation part is about what you can do, ie not going beyond the number of rows - a minor issue, as it should be clear now. Up to documentation to resolve fixed.
Comment 22 Martin Srebotnjak 2022-10-09 10:57:37 UTC
Can I close this bug as RESOLVED?
Comment 23 Caolán McNamara 2022-10-09 18:37:43 UTC
I'm content to call it resolved FWIW
Comment 24 Martin Srebotnjak 2022-10-13 18:39:52 UTC
Marking as resolved.