"folded" CSS property

Are you missing a feature? Request its implementation here.
solarian
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

"folded" CSS property

Post by solarian »

To complement the foldable extended CSS property in Oxygen, it would be helpful to have a folded property, so that when switching to Author view the respective elements appear folded.

There are a number of possible uses for this, but for myself it would be useful in a TEI project which has alternate text and translation <seg> elements, e.g.:

Code: Select all


<p>
<seg type="original">...</seg>
<seg type="translation">...</seg>
</p>
so one can proof the original text without having to fiddle with folding down the other <seg> element every paragraph.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: "folded" CSS property

Post by sorin_ristache »

Hello,

I added your request for a folded CSS property to our system. We will add it in a future version of Author.


Thank you for your request,
Sorin
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: "folded" CSS property

Post by Radu »

Hi,

One way in which you can hide different parts of the document when editing is to use alternate CSS's.
The CSS used for TEI is located in the OXYGEN_INSTALL_DIR/frameworks/tei/xml/tei/css/tei_oxygen.css

You can create a CSS file called tei_no_original.css with the following content:

Code: Select all


@import "tei_oxygen.css";

*[type="original"]{
display:none;
}
Edit the TEI P4 or P5 document type association and in the "Author" tab add an additional CSS ${frameworks}/tei/xml/tei/css/tei_no_original.css checking the "Alternate" checkbox and giving it a title.
Also edit the original CSS reference and set it as "Alternate" and with a title.

After that, when editing TEI files you will be able to switch in the "CSS" toolbar combo between the two of them.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
solarian
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: "folded" CSS property

Post by solarian »

Thanks, that's very helpful.
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Re: "folded" CSS property

Post by ra0543 »

I think it would still be really helpful to have CSS control over the default display of foldable elements, so that one could mark a number of levels of a hierarchy (e.g. levels 2, 3 and 4) as foldable but have a default for the CSS (e.g. elements at level 2 are unfolded but those inside at level 3, and therefore also level 4, are folded).

Perhaps the implementation could just be another value for the existing property foldable:folded, which would imply foldable:true but with the default display of the element appearing folded rather than unfolded?

[The alternate CSS solution suggested above is helpful in some circumstances, such as those described, but obviously won't work if one wants to work on one (e.g. level 2) part of a document unfolded while leaving another parallel (level 2) part folded.]
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: "folded" CSS property

Post by Radu »

Hi,

The alternative of course is not useful in all instances.
We already have this registered as an improvement to our issues list.
The idea is to be able to specify for elements which can be folded the initial state (folded or not folded) in which they are when the document is opened.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Re: "folded" CSS property

Post by ra0543 »

Thanks. We'll look forward to this becoming available. Either at the same time as this or even before if possible, would it also be possible to implement toolbar shortcut buttons to unfold and fold all foldable elements (perhaps with the exception of folding the part of the document containing the cursor if that falls within a foldable element)?
ra0543
Posts: 80
Joined: Wed Jan 14, 2009 12:50 pm

Re: "folded" CSS property

Post by ra0543 »

One further (and I hope final) request on this:

Can you add a fold control (perhaps an upwards pointing triangle) at the end of a foldable element like the existing control that appears as a downwards pointing triangle on the line of the start tag of an unfolded foldable element? The new control should have the same function, i.e. to fold the element. This is one way to make it quicker and easier to fold up an element (especially a long one) that one has just finished working with.

Thanks.
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: "folded" CSS property

Post by Radu »

Hi,

We noted both of your requests and they will be discussed.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
paulmathew38
Posts: 1
Joined: Thu Jan 14, 2010 7:03 pm

Re: "folded" CSS property

Post by paulmathew38 »

Hi. I'm new and I've come across this topic. Helps a lot especially for a layman like me. Thanks!
kwringe
Posts: 10
Joined: Thu Jun 18, 2009 9:30 pm

Re: "folded" CSS property

Post by kwringe »

We would also find it useful to be able to fold an element at the end of the element as described below:
Can you add a fold control (perhaps an upwards pointing triangle) at the end of a foldable element like the existing control that appears as a downwards pointing triangle on the line of the start tag of an unfolded foldable element? The new control should have the same function, i.e. to fold the element. This is one way to make it quicker and easier to fold up an element (especially a long one) that one has just finished working with.
It would also be cool if the folding options in Text mode (e.g., Document>Folding) would be also available in Author mode.

Thank you,
Kate
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: "folded" CSS property

Post by Radu »

Hi Kate,

You are probably thinking at the "Collapse All/Expand All/Close other folds" actions which are available in the Text page.
You will be notified when this gets implemented.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9473
Joined: Fri Jul 09, 2004 5:18 pm

Re: "folded" CSS property

Post by Radu »

Hi Kate,

Oxygen 13 added support for the "folded" CSS property and also for more powerful expand/collapse fold actions which can be performed by right clicking a fold triangle in the Author page.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply