diff --git a/assets/js/hooks/cell_editor/live_editor.js b/assets/js/hooks/cell_editor/live_editor.js index 26e512561..79fb85d33 100644 --- a/assets/js/hooks/cell_editor/live_editor.js +++ b/assets/js/hooks/cell_editor/live_editor.js @@ -430,10 +430,13 @@ export default class LiveEditor { // to not distract the user too much as they are typing return wait(350).then(() => { const node = document.createElement("div"); - const detail = document.createElement("div"); - detail.classList.add("cm-completionInfoDetail"); - detail.innerHTML = highlight(item.detail, this.language); - node.appendChild(detail); + + if (item.detail) { + const detail = document.createElement("div"); + detail.classList.add("cm-completionInfoDetail"); + detail.innerHTML = highlight(item.detail, this.language); + node.appendChild(detail); + } if (item.documentation) { const docs = document.createElement("div"); diff --git a/assets/js/hooks/cell_editor/live_editor/codemirror/theme.js b/assets/js/hooks/cell_editor/live_editor/codemirror/theme.js index c43521cf7..f4c906a46 100644 --- a/assets/js/hooks/cell_editor/live_editor/codemirror/theme.js +++ b/assets/js/hooks/cell_editor/live_editor/codemirror/theme.js @@ -238,8 +238,11 @@ function buildEditorTheme(colors, { dark }) { }, "& .cm-completionInfoDocs": { - borderTop: `1px solid ${colors.separator}`, padding: "6px", + + "&:not(:first-child)": { + borderTop: `1px solid ${colors.separator}`, + }, }, },