Skip to content

Commit d9b43de

Browse files
committed
address PR feedback
1 parent 7a8fb3a commit d9b43de

6 files changed

Lines changed: 21 additions & 18 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RenderableFASTElement } from '@microsoft/fast-html';
2-
import { AccordionItem } from './accordion-item.js';
32
import { definition } from './accordion-item.definition-async.js';
3+
import { AccordionItem } from './accordion-item.js';
44

55
RenderableFASTElement(AccordionItem).defineAsync(definition);

packages/web-components/src/accordion/accordion.definition-async.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import { type PartialFASTElementDefinition } from '@microsoft/fast-element';
22
import { tagName } from './accordion.options.js';
33

4+
/**
5+
* The async definition configuration for the fluent-accordion element.
6+
*
7+
* @public
8+
* @remarks
9+
* This is used in server-side rendering (SSR) scenarios where the template
10+
* is provided as a deferred option to be hydrated later.
11+
*/
412
export const declarativeDefinition: PartialFASTElementDefinition = {
513
name: tagName,
614
templateOptions: 'defer-and-hydrate',

packages/web-components/src/dropdown/dropdown.base.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,7 @@ export class BaseDropdown extends FASTElement {
446446
public get enabledOptions(): DropdownOption[] {
447447
return (
448448
this.listbox?.enabledOptions ??
449-
Array.from(this.querySelectorAll('*')).filter<DropdownOption>(
450-
(o): o is DropdownOption => isDropdownOption(o) && !o.disabled,
451-
)
449+
Array.from(this.querySelectorAll('*')).filter((o): o is DropdownOption => isDropdownOption(o) && !o.disabled)
452450
);
453451
}
454452

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RenderableFASTElement } from '@microsoft/fast-html';
2-
import { Menu } from './menu.js';
32
import { definition } from './menu.definition-async.js';
3+
import { Menu } from './menu.js';
44

55
RenderableFASTElement(Menu).defineAsync(definition);

packages/web-components/src/textarea/textarea.spec.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,15 @@ test.describe('TextArea', () => {
151151
}) => {
152152
const { element } = fastPage;
153153

154-
await page.addInitScript({
155-
content: `
156-
const originalSupports = CSS.supports.bind(CSS);
157-
window.__originalCSSSupports = originalSupports;
158-
CSS.supports = (property, value) => {
159-
if (property === 'field-sizing: content' || (property === 'field-sizing' && value === 'content')) {
160-
console.log('Mocking CSS.supports to return false for', property);
161-
return false;
162-
}
163-
return originalSupports(property, value);
164-
};
165-
`,
154+
await page.addInitScript(() => {
155+
const originalSupports = CSS.supports.bind(CSS);
156+
(window as any).__originalCSSSupports = originalSupports;
157+
(CSS as any).supports = (property: string, value: string) => {
158+
if (property === 'field-sizing: content' || (property === 'field-sizing' && value === 'content')) {
159+
return false;
160+
}
161+
return originalSupports(property, value);
162+
};
166163
});
167164

168165
// Ensures the next navigation creates a new context where the patched CSS.supports is in effect.

packages/web-components/src/tree-item/tree-item.base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { attr, css, type ElementStyles, FASTElement, observable, Updates } from '@microsoft/fast-element';
1+
import { attr, css, type ElementStyles, FASTElement, observable } from '@microsoft/fast-element';
22
import { toggleState } from '../utils/element-internals.js';
33
import { isTreeItem } from './tree-item.options.js';
44

0 commit comments

Comments
 (0)