mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-31 03:07:53 +08:00
Always expand the setup cell when focused (#1166)
This commit is contained in:
parent
62140eb8d7
commit
567c69a884
3 changed files with 1 additions and 22 deletions
|
@ -128,28 +128,13 @@ solely client-side operations.
|
||||||
@apply hidden;
|
@apply hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-el-session]:not([data-js-insert-mode])
|
|
||||||
[data-el-cell][data-type="setup"]:not([data-eval-validity="fresh"]:not([data-js-empty])):not([data-js-changed])
|
|
||||||
[data-el-editor-box],
|
|
||||||
[data-el-session]
|
[data-el-session]
|
||||||
[data-el-cell][data-type="setup"]:not([data-eval-validity="fresh"]:not([data-js-empty])):not([data-js-changed]):not([data-js-focused])
|
[data-el-cell][data-type="setup"]:not([data-eval-validity="fresh"]:not([data-js-empty])):not([data-js-changed]):not([data-js-focused])
|
||||||
[data-el-editor-box] {
|
[data-el-editor-box] {
|
||||||
@apply h-0 overflow-hidden;
|
@apply h-0 overflow-hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-el-session][data-js-insert-mode]
|
|
||||||
[data-el-cell][data-type="setup"][data-js-focused]
|
|
||||||
[data-el-enable-insert-mode-button],
|
|
||||||
[data-el-session]
|
[data-el-session]
|
||||||
[data-el-cell][data-type="setup"][data-eval-validity="fresh"]:not([data-js-empty])
|
|
||||||
[data-el-enable-insert-mode-button],
|
|
||||||
[data-el-session]
|
|
||||||
[data-el-cell][data-type="setup"][data-js-changed]
|
|
||||||
[data-el-enable-insert-mode-button] {
|
|
||||||
@apply hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-el-session][data-js-insert-mode]
|
|
||||||
[data-el-cell][data-type="setup"][data-js-focused]
|
[data-el-cell][data-type="setup"][data-js-focused]
|
||||||
[data-el-info-box],
|
[data-el-info-box],
|
||||||
[data-el-session]
|
[data-el-session]
|
||||||
|
|
|
@ -520,12 +520,7 @@ const Session = {
|
||||||
const cell = event.target.closest(`[data-el-cell]`);
|
const cell = event.target.closest(`[data-el-cell]`);
|
||||||
const type = cell && cell.getAttribute("data-type");
|
const type = cell && cell.getAttribute("data-type");
|
||||||
|
|
||||||
if (
|
if (type && type === "markdown" && this.focusedId && !this.insertMode) {
|
||||||
type &&
|
|
||||||
["markdown", "setup"].includes(type) &&
|
|
||||||
this.focusedId &&
|
|
||||||
!this.insertMode
|
|
||||||
) {
|
|
||||||
this.setInsertMode(true);
|
this.setInsertMode(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -104,7 +104,6 @@ defmodule LivebookWeb.SessionLive.CellComponent do
|
||||||
status={@cell_view.eval.status} />
|
status={@cell_view.eval.status} />
|
||||||
</:primary>
|
</:primary>
|
||||||
<:secondary>
|
<:secondary>
|
||||||
<.enable_insert_mode_button />
|
|
||||||
<.package_search_button session_id={@session_id} runtime={@runtime} socket={@socket} />
|
<.package_search_button session_id={@session_id} runtime={@runtime} socket={@socket} />
|
||||||
<.cell_link_button cell_id={@cell_view.id} />
|
<.cell_link_button cell_id={@cell_view.id} />
|
||||||
<.setup_cell_info />
|
<.setup_cell_info />
|
||||||
|
|
Loading…
Reference in a new issue