typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

Correct wrong behavior for outline items

Open kris7453 opened this issue 5 years ago • 7 comments

  1. At first I thing that outline-expander in default styles, shouldn't change icon on hover action that present opened node.
  2. I notice, that there is outline-item-open class for li.outline-item-wrapper item, but this class is added only for items, that was manually opened by clicking on item expander. I think that outline-item-open class should be added, not only for expander clicking, but for whole outline-item.
<li class="outline-item-wrapper outline-h2">
   <div class="outline-item">…</div>
   <ul class="outline-children">
      <li class="outline-item-wrapper outline-h3">
         <div class="outline-item">…</div>
         <ul class="outline-children"></ul>
      </li>
      <li class="outline-item-wrapper outline-item-open outline-h3">
         <div class="outline-item">…</div>
         <ul class="outline-children">
            <li class="outline-item-wrapper outline-h4">
               <div class="outline-item">
                  <span class="outline-expander"></span>
                  <span class="outline-label outline-active" data-ref="n187">Block notation</span>
               </div>
               <ul class="outline-children"></ul>
            </li>
         </ul>
      </li>
   </ul>
</li>

kris7453 avatar Dec 15 '20 21:12 kris7453

you can use .outline-item-open>.outline-item to locate the outline-item. The outline-item-open is not used by Typora.

abnerlee avatar Dec 17 '20 14:12 abnerlee

You misunderstood me, I don't want to locate outline-item by outline-item-open class. I just say that outline-item-open class probably should be added for click action executed on outline-item too, not only for expander click. But, maybe current solution is better.

ad.1 I still thing, that by default icon for expander shouldn't change for hover action, but only when expander change state (closed/opened).

kris7453 avatar Dec 18 '20 20:12 kris7453

I still thing, that by default icon for expander shouldn't change for hover action, but only when expander change state (closed/opened).

Click on header will jump to that header, click on icon will expand. So hover on header will not change icon, but hover on icon will. And css has selector for :hover

abnerlee avatar Dec 20 '20 14:12 abnerlee

So hover on header will not change icon, but hover on icon will.

Yeah, this is what I meant, that hover action for expander is a bit weird. Cause why icon change look, when node doesn't change state for "opened". If You don't know what I'm talking about, just look at Windows tree style in explorer, they have similar "expander", but if You not want to change current default style, just let me know that You want not.

kris7453 avatar Dec 22 '20 14:12 kris7453

when node doesn't change state for "opened".

Are you referring to the bug that one item has no children, but can have "opened" status when clicking the expand icon?

abnerlee avatar Dec 31 '20 13:12 abnerlee

No, actually I only referring to visual style. I thought, that I could mention about style of node icon here. For me personally, icons should change they appearance when action was done (e.g. node has been opened), not for action that could be done. It is only my personal opinion about how icons should react, so you can ignore it, if you think otherwise.

kris7453 avatar Jan 03 '21 04:01 kris7453

No, actually I only referring to visual style. I thought, that I could mention about style of node icon here. For me personally, icons should change they appearance when action was done (e.g. node has been opened), not for action that could be done. It is only my personal opinion about how icons should react, so you can ignore it, if you think otherwise.

fixed in new release

abnerlee avatar Apr 27 '21 14:04 abnerlee