Bug 148320 - Explicit toggle for ToC/Index title
Summary: Explicit toggle for ToC/Index title
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks: TableofContents-Indexes-Dialog
  Show dependency treegraph
 
Reported: 2022-04-02 08:48 UTC by Eyal Rozenberg
Modified: 2024-04-22 09:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2022-04-02 08:48:08 UTC
The ToC/Index insertion dialog seems to force you to specify a title; and an empty title on the dialog removes the title paragraph from the ToC/Index. 

Instead, there should be an explicit toggle of whether or not a title should be used. Guessing that empty means no title is a bit onerous and, IIANM, this is not a common practice in LO dialogs.
Comment 1 Dieter 2022-04-18 03:24:37 UTC
I confirm the described behaviour, but I don't think, it's a bug. Preview also shows no title, if title-entry is empty.

cc: design-team for further input and decision
Comment 2 Eyal Rozenberg 2022-04-18 06:55:48 UTC
(In reply to Dieter from comment #1)
> Preview also shows no title, if title-entry is empty.

This is non-intuitive, and is not consistent with other behavior in LO. You can have an empty footer, an empty paragraph, or an empty caption. So you're not supposed to have to assume that "empty title" = "no title".
Comment 3 Heiko Tietze 2022-04-22 09:45:46 UTC
Better compare with caption and if you leave the field empty you get an empty caption. Wouldn't expect anything else. Admittedly, the checkbox is convenient (and we have space) but I don't see a pattern.
Comment 4 Eyal Rozenberg 2022-04-22 10:29:22 UTC
(In reply to Heiko Tietze from comment #3)
> I don't see a pattern.

Can you explain that phrase?
Comment 5 Heiko Tietze 2022-04-22 10:50:36 UTC
(In reply to Eyal Rozenberg from comment #2)
> ... is not consistent with other behavior in LO.

I don't see this pattern, meaning consistency in terms of input fields that are in use if a checkbox is checked or otherwise mean empty content.
Comment 6 Eyal Rozenberg 2022-04-22 11:04:06 UTC
(In reply to Heiko Tietze from comment #5)
> I don't see this pattern, meaning consistency in terms of input fields that
> are in use if a checkbox is checked or otherwise mean empty content.

Ah. So, I didn't mean consistency in terms of an input field, but rather consistency in terms of dichotomy between non-empty and non-existence:

Footer             can be empty
Header             can be empty
Footnote           can be empty, sort of
Endnote            can be empty, sort of
Heading paragraph  can be empty
Comment            can be empty
Caption            can be empty
ToC title          can't be empty

Given all the rest, the user is unlikely to realize that an empty title means no-title, and would waste time trying to look for a checkbox which doesn't exist.
Comment 7 Heiko Tietze 2022-04-22 11:10:26 UTC
(In reply to Eyal Rozenberg from comment #6)
> ... the user is unlikely to realize that an empty title means no-title

Don't think so. And, as Dieter pointed out, we have a preview.
Comment 8 Cor Nouws 2022-04-26 20:26:32 UTC
(In reply to Heiko Tietze from comment #7)

> Don't think so. And, as Dieter pointed out, we have a preview.

The preview helps me clearly, indeed.
Comment 9 Heiko Tietze 2022-04-28 05:59:22 UTC
The topic was on the agenda of the design meeting.

The alternative to just clearing the text field is to have a checkbox "[x] Use title" and enable the input respectively. It improves consistency, clarifies the behavior for novice user, and makes the label "Type and Title" more appropriate. Plus, we have enough space and the enhancement is an easy hack.

Code pointer:
* add the checkbox to sw/uiconfig/swriter/ui/tocindexpage.ui
* add variables and logic to sw/source/ui/index/cnttab.cxx; likely in FillTOXDescription() rDesc.SetTitle(m_xTitleED->get_text());