Page 1 of 1

Preventing topic-expanding widget from indenting nested topics

Posted: Sun Jul 10, 2022 4:12 pm
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!

Re: Preventing topic-expanding widget from indenting nested topics

Posted: Mon Jul 11, 2022 3:33 pm
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

Re: Preventing topic-expanding widget from indenting nested topics

Posted: Tue Jul 19, 2022 5:08 pm
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.

Re: Preventing topic-expanding widget from indenting nested topics

Posted: Wed Jul 20, 2022 12:41 pm
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.