From 5d94a1324f2c74320b6fdac781542c4d21a57d8b Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Wed, 20 Sep 2023 08:48:05 -0400 Subject: [PATCH 1/3] refactor: debounce the journal input text entry --- app/components/find-journal/index.hbs | 2 +- app/components/find-journal/index.js | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/components/find-journal/index.hbs b/app/components/find-journal/index.hbs index 53075d7e..9e591579 100644 --- a/app/components/find-journal/index.hbs +++ b/app/components/find-journal/index.hbs @@ -1,7 +1,7 @@ {{! template-lint-disable no-action }} Date: Tue, 26 Sep 2023 12:54:14 -0400 Subject: [PATCH 2/3] bump debounce period to 750 --- app/components/find-journal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/find-journal/index.js b/app/components/find-journal/index.js index dc492e65..e7b97464 100644 --- a/app/components/find-journal/index.js +++ b/app/components/find-journal/index.js @@ -4,7 +4,7 @@ import Component from '@glimmer/component'; import { dropTask } from 'ember-concurrency-decorators'; import { timeout } from 'ember-concurrency'; -const DEBOUNCE_MS = 250; +const DEBOUNCE_MS = 750; export default class FindJournal extends Component { @service store; From 259b67eedffa3abb93bbcaae3e3ed79d19b4ec3e Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Tue, 26 Sep 2023 12:55:43 -0400 Subject: [PATCH 3/3] fix comment --- .tool-versions | 1 + app/components/find-journal/index.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..27552eba --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 18.15.0 diff --git a/app/components/find-journal/index.js b/app/components/find-journal/index.js index e7b97464..8557eaf6 100644 --- a/app/components/find-journal/index.js +++ b/app/components/find-journal/index.js @@ -13,9 +13,10 @@ export default class FindJournal extends Component { autocomplete; /** - * lookupDOI - Set publication, publication journal, and doiInfo based on DOI. + * Search for journals by autocompleting based on the term prefix. * - * @param {boolean} setPublication DOI lookup should set the Publication object on the submission + * @param {string} term The search term + * @returns {array} array of Journals */ @dropTask searchJournals = function* (term) {