Преглед изворни кода

Disable collapsing/expanding a code cell input area which generates Markdown/HTML

Why? Otherwise, a user could find his/herself in a situation where
they need to expand a previous section in order to edit the generated
Markdown/HTML for a desired section. In general, no perfect solutions
here. Ideally, users would not generate Markdown/HTML with a mixed
hierarchy (i.e., lower level headings followed by higher level
headings).
kgryte пре 5 година
родитељ
комит
c6a2104a9b
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/toc/src/generators/notebookgenerator/itemrenderer.tsx

+ 2 - 2
packages/toc/src/generators/notebookgenerator/itemrenderer.tsx

@@ -203,8 +203,8 @@ function setCollapsedState(
       const ow = c.outputArea.widgets[j] as Panel;
       ow.setHidden(state);
     }
-    // Collapse/expand a sub-cell's input area by setting the its `hidden` state (NOTE: a collapsed input area will still appear collapsed!!! Once a user clicks on the collapsed cell ellipses will the input area display as being fully hidden. If we want an input area to always be present, whether collapsed or expanded, we could remove the following line.):
-    w.inputArea.setHidden(state);
+    // Collapse/expand a sub-cell's input area by setting the its `hidden` state (NOTE: a collapsed input area will still appear collapsed!!! Once a user clicks on the collapsed cell ellipses will the input area display (or, rather, not display!) as being fully hidden. If we want an input area to always be present, e.g., to always allow a user the ability to edit an expanded section, whether or not generated sections are collapsed or expanded, we could remove the following line.):
+    // w.inputArea.setHidden(state);
   }
   if (state) {
     // Set a meta-data flag to indicate that we've collapsed notebook sections: