markbind icon indicating copy to clipboard operation
markbind copied to clipboard

Minimized panels: support a way to show in previous line

Open damithc opened this issue 7 years ago • 8 comments

Current: minimized panels appear in a new line, although multiple minimized panels can appear in a single line. image

Suggest: support a way to push a panel that are minimized by default to the end of the previous line. Reason: Saves vertical space (more printer friendly)

Example:

Some text. Some text. Minimized Panel 1Panel 2

damithc avatar Feb 21 '18 09:02 damithc

If we do not leave a new line after "Some text, some text", the panels will be minimized at the end of the previous line:

Some text, some text
<panel type="info" header="Minimized panel 1" minimized >
Content 1
</panel>
<panel type="info" header="Minimized panel 2" minimized >
Content 2
</panel>

Output:

no-new-line

yamgent avatar May 15 '18 06:05 yamgent

You mean it is like that already?

damithc avatar May 15 '18 07:05 damithc

You mean it is like that already?

Yes, it already works. I didn't change any code.

yamgent avatar May 15 '18 07:05 yamgent

It works only for trivial cases. If you add blank lines inside one of the panels, it won't work anymore. This code results in totally unexpected behavior:

Some text, some text
<panel type="info" header="Minimized panel 1" minimized >

* Content 1
* Content 2

</panel>

damithc avatar May 15 '18 09:05 damithc

Hello! I just tried out the code and currently this gives:

Some text, some text

<panel type="info" header="Minimized panel 1" minimized >

* Content 1
* Content 2 
</panel>
<panel type="info" header="Minimized panel 1" minimized >

* Content 1
* Content 2
</panel>

to give image. However, removing the new line:

Some text, some text
<panel type="info" header="Minimized panel 1" minimized >

* Content 1
* Content 2 
</panel>
<panel type="info" header="Minimized panel 1" minimized >

* Content 1
* Content 2
</panel>

results in image

Seems like its an issue with the new line and parsing..

yucheng11122017 avatar Jan 26 '24 05:01 yucheng11122017

For the original issue, I am unsure if there is still a need to show minimized panels on one line, given that users can always alternate towards popover components instead. And given that we have ways to hide minimized panels for print view, introduced into the User Guide in 2019 (after discussion on this issue died down), I am wondering if the issue is still relevant @damithc?

On a separate note, @yucheng11122017 I think we can file the bug you found as a separate issue relating to newlines if we decide to close the original issue 👍

lhw-1 avatar Jan 26 '24 11:01 lhw-1

On a separate note, @yucheng11122017 I think we can file the bug you found as a separate issue relating to newlines if we decide to close the original issue 👍

Yup I think this makes sense! We can include it in issue #500 if that makes sense

yucheng11122017 avatar Jan 27 '24 01:01 yucheng11122017

For the original issue, I am unsure if there is still a need to show minimized panels on one line, given that users can always alternate towards popover components instead. And given that we have ways to hide minimized panels for print view, introduced into the User Guide in 2019 (after discussion on this issue died down), I am wondering if the issue is still relevant @damithc?

Although it is not explicitly stated in my original description, what I'm aiming for is to use panels to achieve inline expansion/collapse of content so that the reader can control the level of details in a contiguous chunk of content. Content that pops doesn't give the same visual outcome. However, I'm fine to let panels be what they are now, and use an entirely different syntax for inline-expandable text. e.g.,

Bat is a nocturnal animal. <inline header="more info on their behavior">They
 hunt at night and sleep during the day</inline>

damithc avatar Jan 27 '24 03:01 damithc