From 2e561e9ad31aade638ab92125420a5f99f92c407 Mon Sep 17 00:00:00 2001 From: fonsp Date: Fri, 6 Nov 2020 15:54:28 +0000 Subject: [PATCH] some things --- frontend/components/Editor.js | 10 ++++++++++ frontend/components/TreeView.js | 11 +++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/frontend/components/Editor.js b/frontend/components/Editor.js index a87f868b8c..0c133991aa 100644 --- a/frontend/components/Editor.js +++ b/frontend/components/Editor.js @@ -466,6 +466,16 @@ export class Editor extends Component { loading: false, }) console.info("All cells loaded! 🚂 enjoy the ride") + // do one autocomplete to trigger its precompilation + this.client.send( + "complete", + { + query: "sq", + }, + { + notebook_id: this.state.notebook.notebook_id, + } + ) }) } ) diff --git a/frontend/components/TreeView.js b/frontend/components/TreeView.js index 9febb34532..6f5a6aabc2 100644 --- a/frontend/components/TreeView.js +++ b/frontend/components/TreeView.js @@ -95,15 +95,18 @@ export const TreeView = ({ mime, body, cell_id, all_completed_promise, requests, >${body.elements.map((r) => (r === "more" ? more : html`${r[0]}${mimepair_output(r[1])}`))}` break - break case "Dict": - case "NamedTuple": inner = html`${body.prefix}${body.elements.map((r) => (r === "more" ? more : html`${mimepair_output(r[0])}${mimepair_output(r[1])}`))}${body.elements.map((r) => (r === "more" ? more : html`${mimepair_output(r[0])}${mimepair_output(r[1])}`))}` + break + case "NamedTuple": + inner = html`${body.elements.map((r) => (r === "more" ? more : html`${r[0]}${mimepair_output(r[1])}`))}` break case "struct": - inner = html`${body.prefix} ${body.elements.map((r) => html`${r[0]}${mimepair_output(r[1])}`)} ` + inner = html`${body.prefix}${body.elements.map((r) => html`${r[0]}${mimepair_output(r[1])}`)}` break }