Bug 129733 - Add an action to remove both a section and its content
Summary: Add an action to remove both a section and its content
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:
Depends on:
Blocks: Section
  Show dependency treegraph
 
Reported: 2020-01-02 10:06 UTC by peter josvai
Modified: 2020-01-17 07:12 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peter josvai 2020-01-02 10:06:31 UTC
Description:
I'm only getting to know the 'sections' functionality, but love it, works fairly well, and apparently, it's very well thought up...

one improvement would be to rename the 'remove' button...
cause as it is, it suggests that when pressed, the text would disappear (be removed)... but it won't

moreover, instead of a simple rename, 
it could become a dropdown button..

like:
remove section and text
remove section




Steps to Reproduce:
1. you have a document, and another document linked into it with 'section' functionality... -- you want to remove the text -- and you press 'remove'
2. 
3. 

Actual Results:
'remove' will "dislink" the linked document (I don't want to use 'unlink' here)
and leave the text in the body of the working document

Expected Results:
I'd expect it to remove the text from the working document, and the section, and the linking.. altogether...







Reproducible: Always


User Profile Reset: No



Additional Info:
there could be MORE enhanced in this functionality....

it is, I find, very good as it is...
and it's not lacking complexity either! (see the ability to link only a section of  a text, protection, for example)

BUT...
the end goal could be to be allow the users to turn text of a document under a heading, say, text under a H3 heading, into a linked section in an external document...

that is, to cut out the text under a H3 heading, and paste it into a new document (without opening it, like in the case of "File / save a copy")..
and link that section-document into the document...

the point, as I imagine, could be to be able to externalize text under a heading (a section, so to speak), into an external document and link it is a section...

and to dissolve this text BACK into the document...
(by "removing" the section-linking)

this "to and fro" way would be the greatest in the end...
Comment 1 Heiko Tietze 2020-01-07 15:40:01 UTC
I'm somewhat split. On the one hand, your example is a valid use case. On the other, any content is deleted manually. So why handle sections differently? Plus, the remove + delete thing changes the functionality from a formatting/structure-only thing towards a content handler like a text box.

For the terminology I leave it to the natives. Remove sounds perfect to me, a tooltip with further information might be helpful.
Comment 2 sdc.blanco 2020-01-08 15:23:42 UTC
OP is ambiguous.

Case 1 and Case 2 are existing, working functions for sections with linked files.  I believe OP wants to keep both Case 1 and Case 2, but add a Case 3.

Case 1:  Section w/linked file.  Later, user unlinks file in "Edit Section")
            -->  text and section remain.

Case 2:  Section w/linked file.  Later, user clicks "Remove"  in "Edit Section"
            -->  text remains (but section and link are gone.)

In both cases, the linked text remains and the link is lost, but the section is retained in Case 1.

I think the OP may be to remove text for sections with and w/o linked files, so

Case 3a:   Section w/o linked file.  
Case 3b.   Section w/linked file.

          (new action) "Remove Section and Text" 
           --> both section and text are removed.


+1  Case 1
+1  Case 2
 0  Case 3a.  w/o linked files.   
+1  Case 3b.  w/ linked files 

There is no "undo" function for sections with linked files.  Without proposing the UI, it would be great to have a way to remove "linked file" sections without the text remaining.  (Not a content-handler. More like an easy way to recover from mistakes/bad choices when linking files.)

Practical use situations:

I: A 50-page document gets linked in a section (e.g., wrong file chosen, exploring the function). AFAIK, anything that gets linked in (for whatever reason) has to be manually deleted (e.g., no Ctrl-Z). No fun.

Type II:  A linked-section is no longer desired. You can hide the section (as a workaround).  But after "Remove" (Case 1 and 2) you must manually clean the text. Irritating.
Comment 3 Cor Nouws 2020-01-16 21:37:48 UTC
Hi Peter
(In reply to peter josvai from comment #0)
> one improvement would be to rename the 'remove' button...
> cause as it is, it suggests that when pressed, the text would disappear (be
> removed)... but it won't
If you select a section including paragraph on top and below, copy, cut, delete work as expected.

> moreover, instead of a simple rename, 
> it could become a dropdown button..
> 
> like:
> remove section and text
                    content (should that be)
> remove section
IMO it is not needed to extend the function in the dialog.
But I won't strongly object.
Comment 4 Heiko Tietze 2020-01-17 07:12:53 UTC
We discussed this topic in the design meeting and decided to add standard functionality to section. That is copy, cut, paste, delete and ideally we have it in the sidebar and/or the context menu. Given that removing a section currently means to keep the text we can just delete the content as well (cut, delete for selection works like this) or ask for confirmation (Do you want to remove section with content? [Section + Content] [Section only] [Cancel]).

I vote for the first option.