diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50a3df2..e7752e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,13 @@ jobs: - run: dotnet test -c Release -f ${{ matrix.target-framework }} --no-build working-directory: tests/HerePlatform.Blazor.Tests + js-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - run: node --version + - run: node --test tests/HerePlatform.Blazor.Tests.Js/*.test.mjs + restclient-tests: runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/release-blazor.yml b/.github/workflows/release-blazor.yml index 146be1c..843ea2e 100644 --- a/.github/workflows/release-blazor.yml +++ b/.github/workflows/release-blazor.yml @@ -14,6 +14,7 @@ jobs: package: blazor csproj-path: HerePlatform.Blazor/HerePlatform.Blazor.csproj test-directory: tests/HerePlatform.Blazor.Tests + js-test-directory: tests/HerePlatform.Blazor.Tests.Js title-prefix: HerePlatform.NET.Blazor secrets: nuget-api-key: ${{ secrets.NUGET_API_KEY }} diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index af4a10a..1ca9afa 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -18,6 +18,11 @@ on: description: 'Display name for GitHub Release title' required: true type: string + js-test-directory: + description: 'Path to the node:test directory (*.test.mjs); empty to skip' + required: false + type: string + default: '' secrets: nuget-api-key: required: true @@ -42,6 +47,9 @@ jobs: - run: dotnet build -c Release --no-restore - run: dotnet test -c Release --no-build working-directory: ${{ inputs.test-directory }} + - name: Run JS tests + if: inputs.js-test-directory != '' + run: node --test ${{ inputs.js-test-directory }}/*.test.mjs - name: Extract version from tag run: | if [[ ! "$GITHUB_REF_NAME" =~ ^${{ inputs.package }}/v ]]; then diff --git a/CHANGELOG.md b/CHANGELOG.md index bd62bdc..ee5a78c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### [Unreleased] +### [1.4.1] - 2026-09-24 + +#### Changed + +- `AutosuggestInputContext.PreventDefaultKeyDown`: the `[Obsolete]` message now states why the property is no + longer needed and what to do instead — remove `@onkeydown:preventDefault` from custom templates and only splat + `@attributes="context.InputAttributes"` +- Changelog and component docs now mark 1.3.0 as a known regression and point 1.3.0 users to 1.3.1 or later + ### [1.4.0] - 2026-09-20 #### Added @@ -30,7 +39,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 per-element flag and cannot be limited to single keys. The browser default is now suppressed key-selectively by a `keydown` listener on the input, and only for `Enter` (implicit form submit) and `ArrowUp`/`ArrowDown` (caret jump), and only while the dropdown is open. Enter semantics are unchanged: - it still picks the active suggestion, or the first one when none is active + it still picks the active suggestion, or the first one when none is active. This fixes the known + regression in 1.3.0 — upgrade from 1.3.0 is strongly recommended. A narrower form of the same defect + existed in 1.0.0–1.2.0: after navigating the list with the arrow keys, the default template swallowed + every keystroke until the dropdown closed; this is fixed as well #### Deprecated @@ -44,8 +56,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > **Known broken — do not use.** With the default input template — and with every custom `InputTemplate` > that followed the 1.3.0 guidance to apply `@onkeydown:preventDefault` — an open suggestion dropdown -> suppressed every keystroke, leaving the input uneditable after the first suggestions appeared. -> Fixed in the following release. +> suppressed every keystroke (typing, Backspace/Delete, Tab), leaving the input uneditable after the first +> suggestions appeared. This affects every `HereAutosuggest` without a custom `InputTemplate`. Fixed in +> 1.3.1: upgrade, and remove any `@onkeydown:preventDefault` binding from custom input templates. The +> `PreventDefaultKeyDown` guidance below is withdrawn. #### Added @@ -65,7 +79,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `HereAutosuggest` with a custom `InputTemplate`: pressing Enter while the dropdown was open selected a suggestion AND submitted a surrounding `