Skip to content

Commit

Permalink
Merge branch 'main' into users/fvisser/body-plus-1-font-token
Browse files Browse the repository at this point in the history
  • Loading branch information
rajsite authored Mar 20, 2024
2 parents 70a36e6 + 6997496 commit 77ef65d
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 61 deletions.
15 changes: 15 additions & 0 deletions angular-workspace/projects/ni/nimble-angular/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@ni/nimble-angular",
"entries": [
{
"date": "Wed, 20 Mar 2024 16:45:59 GMT",
"version": "20.5.1",
"tag": "@ni/nimble-angular_v20.5.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@ni/nimble-angular",
"comment": "Bump @ni/nimble-components to v22.1.1",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 18 Mar 2024 17:12:34 GMT",
"version": "20.5.0",
Expand Down
10 changes: 9 additions & 1 deletion angular-workspace/projects/ni/nimble-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @ni/nimble-angular

This log was last generated on Mon, 18 Mar 2024 17:12:34 GMT and should not be manually modified.
This log was last generated on Wed, 20 Mar 2024 16:45:59 GMT and should not be manually modified.

<!-- Start content -->

## 20.5.1

Wed, 20 Mar 2024 16:45:59 GMT

### Patches

- Bump @ni/nimble-components to v22.1.1

## 20.5.0

Mon, 18 Mar 2024 17:12:34 GMT
Expand Down
4 changes: 2 additions & 2 deletions angular-workspace/projects/ni/nimble-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-angular",
"version": "20.5.0",
"version": "20.5.1",
"description": "Angular components for the NI Nimble Design System",
"scripts": {
"invoke-publish": "cd ../../../ && npm run build:library && cd dist/ni/nimble-angular && npm publish"
Expand Down Expand Up @@ -31,7 +31,7 @@
"@angular/forms": "^15.2.10",
"@angular/localize": "^15.2.10",
"@angular/router": "^15.2.10",
"@ni/nimble-components": "^22.1.0"
"@ni/nimble-components": "^22.1.1"
},
"dependencies": {
"tslib": "^2.2.0"
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/nimble-blazor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-blazor",
"version": "14.5.0",
"version": "14.5.1",
"description": "Blazor components for the NI Nimble Design System",
"scripts": {
"postinstall": "node build/generate-playwright-version-properties/source/index.js",
Expand Down
15 changes: 15 additions & 0 deletions packages/nimble-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@ni/nimble-components",
"entries": [
{
"date": "Wed, 20 Mar 2024 16:45:59 GMT",
"version": "22.1.1",
"tag": "@ni/nimble-components_v22.1.1",
"comments": {
"patch": [
{
"author": "[email protected]",
"package": "@ni/nimble-components",
"commit": "83f7fd9e601eed789e8f6eb61a9d4a87a1d1835b",
"comment": "Remove ListOptionOwner from Combobox to address issue found in Angular"
}
]
}
},
{
"date": "Wed, 20 Mar 2024 15:46:00 GMT",
"version": "22.1.0",
Expand Down
10 changes: 9 additions & 1 deletion packages/nimble-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @ni/nimble-components

This log was last generated on Mon, 18 Mar 2024 17:12:34 GMT and should not be manually modified.
This log was last generated on Wed, 20 Mar 2024 16:45:59 GMT and should not be manually modified.

<!-- Start content -->

## 22.1.1

Wed, 20 Mar 2024 16:45:59 GMT

### Patches

- Remove ListOptionOwner from Combobox to address issue found in Angular ([ni/nimble@83f7fd9](https://github.com/ni/nimble/commit/83f7fd9e601eed789e8f6eb61a9d4a87a1d1835b))

## 22.1.0

Mon, 18 Mar 2024 17:12:34 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ni/nimble-components",
"version": "22.1.0",
"version": "22.1.1",
"description": "Styled web components for the NI Nimble Design System",
"scripts": {
"build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",
Expand Down
25 changes: 2 additions & 23 deletions packages/nimble-components/src/combobox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ import { iconExclamationMarkTag } from '../icons/exclamation-mark';

import { styles } from './styles';
import type { ErrorPattern } from '../patterns/error/types';
import type {
DropdownPattern,
ListOptionOwner
} from '../patterns/dropdown/types';
import type { DropdownPattern } from '../patterns/dropdown/types';
import { DropdownAppearance } from '../patterns/dropdown/types';
import type { AnchoredRegion } from '../anchored-region';
import { template } from './template';
import type { ListOption } from '../list-option';

declare global {
interface HTMLElementTagNameMap {
Expand All @@ -37,7 +33,7 @@ declare global {
*/
export class Combobox
extends FoundationCombobox
implements DropdownPattern, ErrorPattern, ListOptionOwner {
implements DropdownPattern, ErrorPattern {
@attr
public appearance: DropdownAppearance = DropdownAppearance.underline;

Expand Down Expand Up @@ -211,23 +207,6 @@ export class Combobox
return returnValue;
}

/**
* @internal
*/
public registerOption(option: ListOption): void {
if (this.options.includes(option)) {
return;
}

// Adding an option to the end, ultimately, isn't the correct
// thing to do, as this will mean the option's index in the options,
// at least temporarily, does not match the DOM order. However, it
// is expected that a successive run of `slottedOptionsChanged` will
// correct this order issue. See 'https://github.com/ni/nimble/issues/1915'
// for more info.
this.options.push(option);
}

protected override focusAndScrollOptionIntoView(): void {
if (this.open) {
super.focusAndScrollOptionIntoView();
Expand Down
29 changes: 1 addition & 28 deletions packages/nimble-components/src/combobox/tests/combobox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
waitAnimationFrame
} from '../../utilities/tests/component';
import { checkFullyInViewport } from '../../utilities/tests/intersection-observer';
import { ListOption, listOptionTag } from '../../list-option';
import { listOptionTag } from '../../list-option';

async function setup(
position?: string,
Expand Down Expand Up @@ -127,33 +127,6 @@ describe('Combobox', () => {
await disconnect();
});

it('option added directly to DOM synchronously registers with Combobox', async () => {
const { element, connect, disconnect } = await setup();
await connect();
element.selectedIndex = 0;
await waitForUpdatesAsync();
const newOption = new ListOption('foo', 'foo');
const registerOptionSpy = spyOn(
element,
'registerOption'
).and.callThrough();
registerOptionSpy.calls.reset();
element.insertBefore(newOption, element.options[0]!);

expect(registerOptionSpy.calls.count()).toBe(1);
expect(element.options).toContain(newOption);

// While the option is registered synchronously as shown above,
// properties like selectedIndex will only be correct asynchronously
// See https://github.com/ni/nimble/issues/1915
expect(element.selectedIndex).toBe(0);
await waitForUpdatesAsync();
// This assertion shows that after 'slottedOptionsChanged' runs, the
// 'selectedIndex' state has been corrected to expected DOM order.
expect(element.selectedIndex).toBe(1);
await disconnect();
});

const ariaTestData: {
attrName: string,
propSetter: (x: Combobox, value: string) => void
Expand Down

0 comments on commit 77ef65d

Please sign in to comment.