Skip to content

Commit aebd883

Browse files
committed
Merge branch 'master' into users/machi/dropdown-typeahead
2 parents 77b220c + 8ee8c7e commit aebd883

124 files changed

Lines changed: 1314 additions & 153 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "prevent text input from submitting its associated form twice when Enter is pressed",
4+
"packageName": "@fluentui/web-components",
5+
"email": "machi@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "remove tooltip id from target’s aria-describedby attribute when the tooltip is removed from DOM",
4+
"packageName": "@fluentui/web-components",
5+
"email": "machi@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "feat(web-components): add SSR support via Declarative Shadow DOM modules",
4+
"packageName": "@fluentui/web-components",
5+
"email": "863023+radium-v@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@
7474
"@microsoft/eslint-plugin-sdl": "1.0.1",
7575
"@microsoft/fast-build": "0.6.0",
7676
"@microsoft/fast-element": "2.10.4",
77-
"@microsoft/fast-test-harness": "0.1.0",
78-
"@microsoft/focusgroup-polyfill": "^1.4.1",
77+
"@microsoft/fast-html": "1.0.0-alpha.53",
78+
"@microsoft/fast-test-harness": "0.3.0",
79+
"@microsoft/focusgroup-polyfill": "1.5.0",
7980
"@microsoft/load-themed-styles": "1.10.26",
8081
"@microsoft/loader-load-themed-styles": "2.0.17",
8182
"@microsoft/tsdoc": "0.15.1",

packages/web-components/docs/web-components.api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,8 +1013,6 @@ export class BaseTextInput extends FASTElement {
10131013
autocomplete?: string;
10141014
autofocus: boolean;
10151015
// @internal
1016-
beforeinputHandler(e: InputEvent): boolean | void;
1017-
// @internal
10181016
changeHandler(e: InputEvent): boolean | void;
10191017
checkValidity(): boolean;
10201018
clickHandler(e: MouseEvent): boolean | void;

packages/web-components/package.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,21 @@
4646
"./theme/*.js": "./dist/esm/theme/*.js",
4747
"./*/base.js": "./dist/esm/*/*.base.js",
4848
"./*/define.js": "./dist/esm/*/define.js",
49+
"./*/define-async.js": "./dist/esm/*/define-async.js",
4950
"./*/definition.js": "./dist/esm/*/*.definition.js",
5051
"./*/options.js": "./dist/esm/*/*.options.js",
5152
"./*/styles.js": "./dist/esm/*/*.styles.js",
53+
"./*/styles.css": "./dist/esm/*/*.styles.css",
5254
"./*/template.js": "./dist/esm/*/*.template.js",
55+
"./*/template.html": "./dist/esm/*/*.template.html",
5356
"./*/index.js": "./dist/esm/*/index.js",
5457
"./*.js": "./dist/esm/*/define.js",
5558
"./custom-elements.json": "./custom-elements.json",
5659
"./package.json": "./package.json"
5760
},
5861
"sideEffects": [
5962
"define.*",
63+
"define-async.*",
6064
"define-all.*",
6165
"index-rollup.*",
6266
"index-all-rollup.*",
@@ -75,7 +79,11 @@
7579
"compile:benchmark": "rollup -c rollup.bench.js",
7680
"clean": "node ./scripts/clean dist",
7781
"generate-api": "api-extractor run --local",
78-
"build": "yarn compile && yarn rollup -c && yarn generate-api && yarn analyze",
82+
"build": "yarn compile && yarn build:rollup && yarn build:ssr && yarn generate-api && yarn analyze",
83+
"build:ssr:templates": "fast-test-harness generate-templates --tag-prefix=fluent",
84+
"build:ssr:styles": "fast-test-harness generate-stylesheets",
85+
"build:ssr": "yarn build:ssr:templates && yarn build:ssr:styles",
86+
"build:rollup": "rollup -c",
7987
"lint": "eslint . --ext .ts",
8088
"lint:fix": "eslint . --ext .ts --fix",
8189
"format": "prettier -w src/**/*.{ts,html} src/*.{ts,html} --ignore-path ../../.prettierignore",
@@ -106,8 +114,14 @@
106114
},
107115
"peerDependencies": {
108116
"@microsoft/fast-element": "^2.0.0",
117+
"@microsoft/fast-html": "^1.0.0-alpha.53",
109118
"@microsoft/focusgroup-polyfill": "^1.4.1"
110119
},
120+
"peerDependenciesMeta": {
121+
"@microsoft/fast-html": {
122+
"optional": true
123+
}
124+
},
111125
"beachball": {
112126
"disallowedChangeTypes": [
113127
"major",
Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,42 @@
11
import defaultConfig from '@microsoft/fast-test-harness/playwright.config.mjs';
2-
import { defineConfig } from '@playwright/test';
2+
import { defineConfig, devices } from '@playwright/test';
33

44
const CI = process.env.CI === 'true';
55

6+
// Duplicate each browser project across CSR and SSR rendering modes so a
7+
// single `playwright test` run exercises both. Per-test overrides
8+
// (e.g. `test.use({ ssr: true })`) still take precedence over the
9+
// project-level value.
10+
//
11+
// TODO: Remove this local axis once the equivalent change lands in
12+
// @microsoft/fast-test-harness/playwright.config.mjs.
13+
const browsers = [
14+
{ name: 'chromium', use: devices['Desktop Chrome'] },
15+
{ name: 'firefox', use: devices['Desktop Firefox'] },
16+
{
17+
name: 'webkit',
18+
use: {
19+
...devices['Desktop Safari'],
20+
deviceScaleFactor: 1,
21+
},
22+
},
23+
];
24+
25+
const modes = [
26+
{ suffix: 'csr', ssr: false },
27+
{ suffix: 'ssr', ssr: true },
28+
];
29+
30+
const projects = browsers.flatMap(browser =>
31+
modes.map(mode => ({
32+
name: `${browser.name}-${mode.suffix}`,
33+
use: { ...browser.use, ssr: mode.ssr },
34+
})),
35+
);
36+
637
export default defineConfig({
738
...defaultConfig,
39+
projects,
840
reporter: CI ? 'github' : 'list',
941
testMatch: 'src/**/*.spec.ts',
1042
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { PartialFASTElementDefinition } from '@microsoft/fast-element';
2+
import { tagName } from './accordion-item.options.js';
3+
4+
/**
5+
* The async definition configuration for the fluent-accordion-item 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+
*/
12+
export const definition: PartialFASTElementDefinition = {
13+
name: tagName,
14+
templateOptions: 'defer-and-hydrate',
15+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { RenderableFASTElement } from '@microsoft/fast-html';
2+
import { definition } from './accordion-item.definition-async.js';
3+
import { AccordionItem } from './accordion-item.js';
4+
5+
RenderableFASTElement(AccordionItem).defineAsync(definition);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { type PartialFASTElementDefinition } from '@microsoft/fast-element';
2+
import { tagName } from './accordion.options.js';
3+
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+
*/
12+
export const declarativeDefinition: PartialFASTElementDefinition = {
13+
name: tagName,
14+
templateOptions: 'defer-and-hydrate',
15+
} as const;

0 commit comments

Comments
 (0)