diff --git a/src/web/TODO.md b/src/web/TODO.md index 10182493..853692f6 100644 --- a/src/web/TODO.md +++ b/src/web/TODO.md @@ -1 +1,4 @@ - UI tests + +Observations: +- dragging an op to rec list will always drop it at the end of the list, even if you drag it 'between' items diff --git a/src/web/components/c-operation-li.mjs b/src/web/components/c-operation-li.mjs index a95f3c3e..bbbe4ef5 100644 --- a/src/web/components/c-operation-li.mjs +++ b/src/web/components/c-operation-li.mjs @@ -1,4 +1,5 @@ import url from "url"; +import Utils from "../../core/Utils.mjs"; /** * c(ustom element)-operation-li ( list item ) @@ -285,14 +286,16 @@ export class COperationLi extends HTMLElement { let opName = "", pos = 0; - this.charIndicesToHighlight.forEach(idxs => { - const [start, length] = idxs; + this.charIndicesToHighlight.forEach(charIndices => { + const [start, length] = charIndices; if (typeof start !== "number") return; - opName += this.name.slice(pos, start) + "" + + opName += + this.name.slice(pos, start) + "" + this.name.slice(start, start + length) + ""; pos = start + length; }); opName += this.name.slice(pos, this.name.length); + span.innerHTML = opName; } else { span.innerText = this.name; diff --git a/src/web/waiters/OperationsWaiter.mjs b/src/web/waiters/OperationsWaiter.mjs index 16208c7a..aa94ff15 100755 --- a/src/web/waiters/OperationsWaiter.mjs +++ b/src/web/waiters/OperationsWaiter.mjs @@ -110,7 +110,6 @@ class OperationsWaiter { } ); - cOpList.build(); searchResultsEl.append(cOpList); } } diff --git a/src/web/waiters/RecipeWaiter.mjs b/src/web/waiters/RecipeWaiter.mjs index a4bb1178..65408c63 100755 --- a/src/web/waiters/RecipeWaiter.mjs +++ b/src/web/waiters/RecipeWaiter.mjs @@ -38,12 +38,12 @@ class RecipeWaiter { // tweak these values for better user experiences per device type and UI if (this.app.isMobileView()) { - swapThreshold = 0.60; - animation = 400; + swapThreshold = 0.30; + animation = 300; delay = 50; } else { - swapThreshold = 0.10; - animation = 200; + swapThreshold = 1; + animation = 100; delay = 0; }