From d0690b0216fa5cae8c958112efde9c500895758a Mon Sep 17 00:00:00 2001 From: Jonathon Herbert Date: Wed, 10 Jul 2024 17:23:16 +0100 Subject: [PATCH] Add description to frontend; factor typeahead suggestions out of Typeahead service --- build.sbt | 2 +- project/build.properties | 2 +- prosemirror-client/src/cqlInput/CqlInput.ts | 18 +-- .../src/cqlInput/TypeaheadPopover.ts | 5 +- prosemirror-client/src/cqlInput/testUtils.ts | 0 prosemirror-client/src/services/CqlService.ts | 2 +- src/main/scala/Handler.scala | 12 +- src/main/scala/HttpServer.scala | 9 +- src/main/scala/lang/Cql.scala | 7 +- src/main/scala/lang/Typeahead.scala | 114 +++--------------- .../scala/lang/TypeaheadHelpersCapi.scala | 106 ++++++++++++++++ .../scala/lang/TypeaheadQueryClient.scala | 8 -- .../scala/lang/TypeaheadQueryClientCapi.scala | 40 ------ src/test/scala/lang/CqlTest.scala | 5 +- .../scala/lang/TestTypeaheadHelpers.scala | 35 ++++++ .../scala/lang/TypeaheadQueryClientTest.scala | 15 --- src/test/scala/lang/TypeaheadTest.scala | 42 +++++-- 17 files changed, 229 insertions(+), 193 deletions(-) create mode 100644 prosemirror-client/src/cqlInput/testUtils.ts create mode 100644 src/main/scala/lang/TypeaheadHelpersCapi.scala delete mode 100644 src/main/scala/lang/TypeaheadQueryClient.scala delete mode 100644 src/main/scala/lang/TypeaheadQueryClientCapi.scala create mode 100644 src/test/scala/lang/TestTypeaheadHelpers.scala delete mode 100644 src/test/scala/lang/TypeaheadQueryClientTest.scala diff --git a/build.sbt b/build.sbt index d9dc159..80db5aa 100644 --- a/build.sbt +++ b/build.sbt @@ -35,7 +35,7 @@ val circeVersion = "0.14.4" lazy val cql = project.in(file(".")) .enablePlugins(RiffRaffArtifact) .settings( - scalaVersion := "3.3.1", + scalaVersion := "3.4.2", libraryDependencies ++= Seq( "org.apache.pekko" %% "pekko-actor-typed" % PekkoVersion, "org.apache.pekko" %% "pekko-stream" % PekkoVersion, diff --git a/project/build.properties b/project/build.properties index 04267b1..ee4c672 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.9 +sbt.version=1.10.1 diff --git a/prosemirror-client/src/cqlInput/CqlInput.ts b/prosemirror-client/src/cqlInput/CqlInput.ts index 2420141..4b0c756 100644 --- a/prosemirror-client/src/cqlInput/CqlInput.ts +++ b/prosemirror-client/src/cqlInput/CqlInput.ts @@ -2,8 +2,8 @@ import { CqlServiceInterface } from "../services/CqlService"; import { QueryChangeEventDetail } from "./dom"; import { createEditor } from "./editor"; -const baseFontSize = "28px"; -const baseBorderRadius = "5px"; +const baseFontSize = 28; +const baseBorderRadius = 5; const template = document.createElement("template"); template.innerHTML = `