Preventing topic-expanding widget from indenting nested topics

Post here questions and problems related to editing and publishing DITA content.
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

Preventing topic-expanding widget from indenting nested topics

Post by chrispitude »

Hi everyone,

I am trying to use CSS to style the Oxygen editor as close to the PDF Chemistry and WebHelp output as possible.

We use nested topics here. I noticed that in the Oxygen editor, the topic-expanding widget causes nested topics to be successively indented:
image.png
What's the best way to prevent this indenting? Testcase here:

oxygen_nested_topic_indenting.zip

Adding this to my-editor.css seems to work when tags are off:

Code: Select all

.topic\/topic { margin-left: -12px; }
.topic\/section { margin-left: -12px; }
but not so well when tags are on:

image.png

Thanks!
You do not have the required permissions to view the files attached to this post.
Radu
Posts: 9436
Joined: Fri Jul 09, 2004 5:18 pm

Re: Preventing topic-expanding widget from indenting nested topics

Post by Radu »

Hi Chris,

Not sure, maybe hide the fold button completely from the CSS by defining certain elements as -oxy-foldable:false?
https://www.oxygenxml.com/doc/versions/ ... ments.html
Also maybe we could consider to add in the future some improvements/features on the Oxygen side?
- Maybe move the fold buttons on some kind of vertical stripe bar so that they no longer add indentation in the document?
- Maybe when full tags are shown, bring the fold button inside the full tag symbol?
As for negative margin left, I would not use it myself liberally on lots of elements or on top level elements, the complexity of the code we use to handle negative margins may induce some performance problems when editing large documents or may produce some unexpected bugs. But we can also try to fix such problems if they arise.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

Re: Preventing topic-expanding widget from indenting nested topics

Post by chrispitude »

Hi Radu,

For now, I think I will use your idea of showing/hiding the folding buttons via an alternate CSS file.

In the future, I like the idea of having an expand/collapse gutter in the Author view that works similarly to what's already in the Text view! Many IDEs use a similar gutter approach to keep the expand/collapse widgets from interfering with the content itself. Although, the Author view can have multiple opening tags on the same line, so I'm not sure how that would be handled.

Such improvement is a nice-to-have, but certainly not urgent for us.

Thanks for the warning about negative margin-left settings. We use them to emulate some legacy formatting from our FrameMaker books, but I would like to find some time to re-think that whole area of our formatting.
adrian_sorop
Posts: 78
Joined: Wed Jun 22, 2016 2:48 pm

Re: Preventing topic-expanding widget from indenting nested topics

Post by adrian_sorop »

Hi Chris,
I'm glad Radu helped you.
I've also logged your feature request: EXM-50958.
Have a nice day,
Adrian S.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply