Skip to content

Commit 0f2db7d

Browse files
AtishayMsftatisjai
andauthored
Fix RTL playwright add monosize measure (#285)
Co-authored-by: Atishay Jain (from Dev Box) <[email protected]>
1 parent a2b07c5 commit 0f2db7d

File tree

9 files changed

+1144
-9
lines changed

9 files changed

+1144
-9
lines changed

.github/workflows/bundlesize.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ jobs:
2828

2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: 18
31+
node-version: '20.x'
3232
cache: yarn
3333
cache-dependency-path: ./repo/yarn.lock
3434

3535
- name: "Install dependencies and build upto react-charting"
3636
run: |
3737
cd repo
38-
yarn && yarn buildto @fluentui/react-charting
38+
yarn && yarn nx run react-charting:build
3939
4040
- name: "Run monosize on react-charting"
4141
run: |
42-
cd repo/packages/react-charting
42+
cd repo/packages/charts/react-charting
4343
yarn monosize measure
4444
mv -f ./dist/bundle-size/monosize.json ./../../../
4545
cd ./../../../

.github/workflows/plotlyTestCoverage.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,17 @@ jobs:
152152
cd contrib_repo/apps/plotly_examples
153153
mv playwright-report.json reports/playwright-report-v8.json
154154
git add reports/playwright-report-v8.json
155+
156+
- name: "Run monosize on react-charting"
157+
run: |
158+
cd repo1/packages/charts/react-charting
159+
yarn monosize measure
160+
161+
- name: Upload monosize JSON report as artifact
162+
uses: actions/upload-artifact@v4
163+
with:
164+
name: monosize-report
165+
path: repo1/packages/charts/react-charting/dist/bundle-size/monosize.json
155166

156167
- name: Create branch name for scheduled report
157168
if: github.event_name == 'schedule'

apps/plotly_examples/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const App: React.FC = () => {
5454

5555
return (
5656
<div>
57-
<FluentProvider theme={value === "Light" ? webLightTheme : webDarkTheme} targetDocument={document} dir={isRTL ? 'rtl' : 'ltr'}>
57+
<FluentProvider theme={value === "Light" ? webLightTheme : webDarkTheme} targetDocument={document}>
5858
<PortalCompatProvider>
5959
<Subtitle2> Theme:</Subtitle2>&nbsp;&nbsp;
6060
<Dropdown

apps/plotly_examples/src/components/DeclarativeChart.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const dataTypeRanges = {
5959
'plotly_express_basic': [{ min: 377, max: 427 }, {min: 760, max: 766}],
6060
'plotly_express_detailed': [{ min: 428, max: 569 }],
6161
'plotly_express_colors': [{ min: 570, max: 749 }, { min: 768, max: 787 }],
62-
'advanced_scenarios': [{min: 788, max: 839}]
62+
'advanced_scenarios': [{min: 788, max: 839}, {min: 847, max: 847}]
6363
};
6464

6565
// Use require.context to load all JSON files from the split_data folder
@@ -85,7 +85,7 @@ const DeclarativeChartBasicExample: React.FC<IDeclarativeChartProps> = () => {
8585
const [selectedDataTypes, setSelectedDataTypes] = React.useState<DataType[]>(getSelection("DataType_filter", 'All').split(',') as DataType[]);
8686

8787
const declarativeChartRef = React.useRef<IDeclarativeChart>(null);
88-
// const declarativeChartV9Ref = React.useRef<IDeclarativeChart>(null);
88+
const declarativeChartV9Ref = React.useRef<IDeclarativeChart>(null);
8989
let lastKnownValidLegends: string[] | undefined = selectedLegends;
9090

9191
React.useEffect(() => {
@@ -357,7 +357,7 @@ const DeclarativeChartBasicExample: React.FC<IDeclarativeChartProps> = () => {
357357
<DeclarativeChartV9
358358
chartSchema={inputSchema}
359359
onSchemaChange={_handleChartSchemaChanged}
360-
componentRef={declarativeChartRef}
360+
componentRef={declarativeChartV9Ref}
361361
/>
362362
) : (
363363
<div style={{ color: 'red', height: '180px', textAlign: 'center', paddingTop: '80px'}}>{ `${selectedChoice}: Error: ${chartType.errorMessage}`}</div>

apps/plotly_examples/src/components/aggregated_chart_types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,5 +844,6 @@
844844
"843": "VerticalStackedBar",
845845
"844": "GroupedVerticalBar",
846846
"845": "VerticalStackedBar",
847-
"846": "VerticalStackedBar"
847+
"846": "VerticalStackedBar",
848+
"847": "Others"
848849
}

0 commit comments

Comments
 (0)