Skip to content

Commit efa6a3c

Browse files
authored
Merge branch 'main' into wdio-upgrade
2 parents d22b945 + 6cf2ef4 commit efa6a3c

10 files changed

Lines changed: 1343 additions & 478 deletions
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
22

3-
pipelines:
4-
18514:
5-
retail:
6-
source:
7-
credscan:
8-
lastModifiedDate: 2024-09-20
9-
eslint:
10-
lastModifiedDate: 2024-09-20
11-
bandit:
12-
lastModifiedDate: 2024-09-20
13-
psscriptanalyzer:
14-
lastModifiedDate: 2024-09-20
15-
armory:
16-
lastModifiedDate: 2024-09-20
17-
binary:
18-
credscan:
19-
lastModifiedDate: 2024-09-20
20-
binskim:
21-
lastModifiedDate: 2024-09-20
22-
prefast:
23-
lastModifiedDate: 2024-09-20
24-
roslyn:
25-
lastModifiedDate: 2024-09-20
3+
pipelines:
4+
18514:
5+
retail:
6+
source:
7+
credscan:
8+
lastModifiedDate: 2024-09-20
9+
eslint:
10+
lastModifiedDate: 2024-09-20
11+
bandit:
12+
lastModifiedDate: 2024-09-20
13+
psscriptanalyzer:
14+
lastModifiedDate: 2024-09-20
15+
armory:
16+
lastModifiedDate: 2024-09-20
17+
binary:
18+
credscan:
19+
lastModifiedDate: 2024-09-20
20+
binskim:
21+
lastModifiedDate: 2025-06-11
22+
prefast:
23+
lastModifiedDate: 2025-06-11
24+
roslyn:
25+
lastModifiedDate: 2024-09-20

apps/fluent-tester/src/theme/CustomThemes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class TesterThemeReference extends ThemeReference {
4545
constructor() {
4646
super(
4747
baseTheme,
48-
(parent) => applyTheme(parent, this._themeName, this.options.appearance),
48+
() => applyTheme(this._themeName, this.options.appearance),
4949
(parent) => applyBrand(parent, this._brand),
5050
);
5151
this.baseTheme = baseTheme;

apps/fluent-tester/src/theme/applyTheme.ts

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,20 @@
1-
import type { PartialTheme, Theme, ThemeOptions } from '@fluentui-react-native/framework';
1+
import type { PartialTheme, ThemeOptions } from '@fluentui-react-native/framework';
22
import { createOfficeTheme, getThemingModule } from '@fluentui-react-native/win32-theme';
33

4-
export type ThemeNames = 'Default' | 'Office' | 'Caterpillar' | 'Apple';
4+
export type ThemeNames = 'Default' | 'Office' | 'Apple';
55

66
export const themeChoices = [
77
{ label: 'Default', value: 'Default' },
88
{ label: 'Office', value: 'Office' },
9-
{ label: 'Caterpillar', value: 'Caterpillar' },
109
];
1110

12-
function applyCaterpillarTheme(parent: Theme): PartialTheme {
13-
return parent.host?.appearance === 'dark'
14-
? {
15-
colors: {
16-
buttonBackground: '#111111',
17-
buttonBackgroundHovered: '#ffcd11',
18-
buttonBackgroundPressed: '#eeeeee',
19-
buttonText: '#ffffff',
20-
buttonTextPressed: '#111111',
21-
buttonTextHovered: '#000000',
22-
},
23-
components: {
24-
Button: {
25-
borderWidth: 0,
26-
tokens: {
27-
borderWidth: 0,
28-
},
29-
},
30-
},
31-
}
32-
: {
33-
colors: {
34-
buttonBackground: '#ffcd11',
35-
buttonBackgroundHovered: '#111111',
36-
buttonBackgroundPressed: '#eeeeee',
37-
buttonText: '#000000',
38-
buttonTextPressed: '#111111',
39-
buttonTextHovered: '#ffffff',
40-
},
41-
components: {
42-
Button: {
43-
borderWidth: 0,
44-
tokens: {
45-
borderWidth: 0,
46-
},
47-
},
48-
},
49-
};
50-
}
51-
5211
const themingModule = getThemingModule()[0];
5312

5413
/** apply the currently active theme layering */
55-
export function applyTheme(parent: Theme, name: ThemeNames, appearance: ThemeOptions['appearance']): PartialTheme {
14+
export function applyTheme(name: ThemeNames, appearance: ThemeOptions['appearance']): PartialTheme {
5615
switch (name) {
5716
case 'Office':
5817
return themingModule ? createOfficeTheme({ appearance, paletteName: 'Dialogs_FluentSV' }).theme : {};
59-
case 'Caterpillar':
60-
return applyCaterpillarTheme(parent);
6118
default:
6219
return {};
6320
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Bump our version of use-subscription",
4+
"packageName": "@fluentui-react-native/experimental-appearance-additions",
5+
"email": "ruaraki@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": "patch",
3+
"comment": "Bump our version of use-subscription",
4+
"packageName": "@fluentui-react-native/experimental-native-font-metrics",
5+
"email": "ruaraki@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": "patch",
3+
"comment": "remove caterpillar theme",
4+
"packageName": "@fluentui-react-native/tester",
5+
"email": "gulnazsayed@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

docs/pages/Theming/CustomTheme.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ const theme = new ThemeReference(createDefaultTheme(),
3333
</ThemeProvider>
3434
```
3535

36-
A good example of a custom theme from our repo is [the Caterpillar theme in the Tester App](../../../apps/fluent-tester/src/theme/applyTheme.ts).
37-
3836
### `ThemeReference` from scratch
3937

4038
You can create your own `ThemeReference` and pass it into the `ThemeProvider`. To create a `ThemeReference` you'll need to create a new instance of `ThemeReference`. You can find the type definition [here](../../../packages/framework/theme/src/themeReference.ts).

packages/experimental/AppearanceAdditions/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"dependencies": {
3232
"@fluentui-react-native/framework": "workspace:*",
33-
"use-subscription": ">=1.0.0 <1.6.0"
33+
"use-subscription": "^1.11.0"
3434
},
3535
"devDependencies": {
3636
"@babel/core": "^7.20.0",
@@ -39,7 +39,7 @@
3939
"@fluentui-react-native/scripts": "workspace:*",
4040
"@react-native/babel-preset": "^0.74.0",
4141
"@react-native/metro-config": "^0.74.0",
42-
"@types/use-subscription": "1.0.0",
42+
"@types/use-subscription": "^1.0.0",
4343
"react": "18.2.0",
4444
"react-native": "^0.74.0"
4545
},

packages/experimental/NativeFontMetrics/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
"directory": "packages/experimental/NativeFontMetrics"
3030
},
3131
"dependencies": {
32-
"use-subscription": ">=1.0.0 <1.6.0"
32+
"use-subscription": "^1.11.0"
3333
},
3434
"devDependencies": {
3535
"@babel/core": "^7.20.0",
3636
"@fluentui-react-native/eslint-config-rules": "workspace:*",
3737
"@fluentui-react-native/scripts": "workspace:*",
3838
"@react-native/babel-preset": "^0.74.0",
3939
"@react-native/metro-config": "^0.74.0",
40-
"@types/use-subscription": "1.0.0",
40+
"@types/use-subscription": "^1.0.0",
4141
"react": "18.2.0",
4242
"react-native": "^0.74.0"
4343
},

0 commit comments

Comments
 (0)