Skip to content

Commit

Permalink
Merge branch 'master' into fix-popout-widget-resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
ignas-k committed Apr 11, 2024
2 parents 2adb124 + 689eb55 commit 4be10b2
Show file tree
Hide file tree
Showing 573 changed files with 12,970 additions and 16,670 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
workflow_dispatch:
push:
branches:
- master
- release/*
pull_request:

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
variant: ["''", "core-3x"]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout branch
uses: actions/checkout@v2

- name: Configure git
run: |
git config --local user.email [email protected]
git config --local user.name imodeljs-admin
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Rush install
run: node common/scripts/install-run-rush.js install --variant ${{ matrix.variant }}

- name: Rush build
run: node common/scripts/install-run-rush.js build -v -p max

- name: core-react tests
run: npm run cover
working-directory: ui/core-react

- name: components-react tests
run: npm run cover
working-directory: ui/components-react

- name: imodel-components-react tests
run: npm run cover
working-directory: ui/imodel-components-react

- name: appui-react tests
run: npm run cover
working-directory: ui/appui-react
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ node_modules
package-lock.json

# build output
.nyc_output
lib
build
dist
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# build output
lib
build
coverage

# rush specific
.rush
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Orta.vscode-jest",
"streetsidesoftware.code-spell-checker",
"unifiedjs.vscode-mdx",
"vitest.explorer",
"yzhang.markdown-all-in-one"
]
}
72 changes: 28 additions & 44 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,76 +15,60 @@
},
// UI TESTS
{
"name": "[UI] Tests: Components React",
"name": "@itwin/components-react open tests",
"presentation": {
"group": "4_UI"
"group": "1_tests"
},
"cwd": "${workspaceFolder}/ui/components-react",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/ui/components-react/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"../.mocharc.json",
"--no-timeouts",
"lib/cjs/test/**/*.test.js"
],
"skipFiles": ["<node_internals>/**/*.js", "node_modules/rxjs/**/*"],
"outFiles": ["${workspaceFolder}/{core,ui}/*/lib/**/*.js"]
"autoAttachChildProcesses": true,
"program": "${workspaceFolder}/ui/components-react/node_modules/vitest/vitest.mjs",
"args": ["run", "../../${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
},
{
"name": "[UI] Tests: Core React",
"name": "@itwin/core-react open tests",
"presentation": {
"group": "4_UI"
"group": "1_tests"
},
"cwd": "${workspaceFolder}/ui/core-react",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/ui/core-react/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"../.mocharc.json",
"--no-timeouts",
"lib/cjs/test/**/*.test.js"
],
"outFiles": ["${workspaceFolder}/{core,ui}/*/lib/**/*.js"]
"autoAttachChildProcesses": true,
"program": "${workspaceFolder}/ui/core-react/node_modules/vitest/vitest.mjs",
"args": ["run", "../../${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
},
{
"name": "[UI] Tests: IModel Components React",
"name": "@itwin/imodel-components-react open tests",
"presentation": {
"group": "4_UI"
"group": "1_tests"
},
"cwd": "${workspaceFolder}/ui/imodel-components-react",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/ui/imodel-components-react/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"../.mocharc.json",
"--no-timeouts",
"lib/cjs/test/**/*.test.js"
],
"outFiles": ["${workspaceFolder}/{core,ui}/*/lib/cjs/**/*.js"]
"autoAttachChildProcesses": true,
"program": "${workspaceFolder}/ui/imodel-components-react/node_modules/vitest/vitest.mjs",
"args": ["run", "../../${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
},
{
"name": "[UI] Tests: AppUI React",
"name": "@itwin/appui-react open tests",
"presentation": {
"group": "4_UI"
"group": "1_tests"
},
"cwd": "${workspaceFolder}/ui/appui-react",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/ui/appui-react/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"../.mocharc.json",
"--no-timeouts",
"lib/cjs/test/**/*.test.js"
],
"outFiles": [
"${workspaceFolder}/{core,clients,ui,presentation}/*/lib/**/*.js"
],
"outputCapture": "std"
"autoAttachChildProcesses": true,
"program": "${workspaceFolder}/ui/appui-react/node_modules/vitest/vitest.mjs",
"args": ["run", "../../${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
},
// TEST APPS
{
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"files.trimTrailingWhitespace": true,
"files.associations": {
"*.snap": "javascript",
".nycrc": "json",
"certa.json": "jsonc"
},
"cSpell.enableFiletypes": [
Expand Down
4 changes: 2 additions & 2 deletions common/api/appui-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1795,10 +1795,10 @@ export interface FloatingViewportContentProps {
viewportRef?: React_2.Ref<ScreenViewport>;
}

// @alpha (undocumented)
// @public (undocumented)
export function FloatingViewportContentWrapper({ children, }: FloatingViewportContentWrapperProps): React_2.JSX.Element;

// @alpha (undocumented)
// @public (undocumented)
export interface FloatingViewportContentWrapperProps {
// (undocumented)
readonly children?: React_2.ReactNode;
Expand Down
2 changes: 0 additions & 2 deletions common/api/components-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

```ts

/// <reference types="react" />

import type { ActionButton } from '@itwin/appui-abstract';
import { AlternateDateFormats } from '@itwin/appui-abstract';
import { BeEvent } from '@itwin/core-bentley';
Expand Down
32 changes: 17 additions & 15 deletions common/api/core-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { Localization as Localization_2 } from '@itwin/core-common';
import { MessageSeverity } from '@itwin/appui-abstract';
import { ProgressRadial } from '@itwin/itwinui-react';
import * as React_2 from 'react';
import * as ReactAutosuggest from 'react-autosuggest';
import ReactAutosuggest from 'react-autosuggest';
import { RelativePosition } from '@itwin/appui-abstract';

// @public
Expand Down Expand Up @@ -143,7 +143,7 @@ export const calculateProximityScale: (proximity: number, snap?: boolean, thresh
// @internal
export const calculateToolbarOpacity: (proximityScale: number) => number;

// @public
// @public @deprecated
export function Centered(props: CommonDivProps): React_2.JSX.Element;

// @public
Expand Down Expand Up @@ -473,15 +473,15 @@ export interface DialogProps extends Omit_2<React_2.AllHTMLAttributes<HTMLDivEle
// @public
export function DisabledText(props: TextProps): React_2.JSX.Element;

// @public
// @public @deprecated
export function Div(props: DivProps): React_2.JSX.Element;

// @public
// @public @deprecated
export interface DivProps extends CommonDivProps {
mainClassName: string;
}

// @public
// @public @deprecated
export const DivWithOutsideClick: {
new (props: (CommonDivProps & WithOnOutsideClickProps) | Readonly<CommonDivProps & WithOnOutsideClickProps>): {
outsideClickContainerDiv?: HTMLDivElement | null | undefined;
Expand Down Expand Up @@ -611,7 +611,7 @@ export interface ExpansionToggleProps extends CommonProps {
onClick?: (e: React_2.MouseEvent<HTMLDivElement>) => void;
}

// @public
// @public @deprecated
export function FillCentered(props: CommonDivProps): React_2.JSX.Element;

// @alpha
Expand All @@ -628,7 +628,7 @@ export interface FilteredTextProps extends CommonProps {
// @internal
export const flattenChildren: (children: React_2.ReactNode) => React_2.ReactNode;

// @public
// @public @deprecated
export function FlexWrapContainer(props: CommonDivProps): React_2.JSX.Element;

// @internal
Expand All @@ -645,10 +645,10 @@ export interface FocusTrapProps extends React_2.AllHTMLAttributes<any> {
returnFocusOnDeactivate: boolean;
}

// @public
// @public @deprecated
export function Gap(props: GapProps): React_2.JSX.Element;

// @public
// @public @deprecated
export interface GapProps extends CommonProps {
// (undocumented)
size?: string;
Expand All @@ -672,6 +672,12 @@ export const getDisplayName: (component: React_2.ComponentType<any>) => string;
// @internal
export const getObjectClassName: (obj: any) => string;

// @internal (undocumented)
export function getResizeObserver(): {
new (callback: ResizeObserverCallback): ResizeObserver;
prototype: ResizeObserver;
};

// @internal
export const getToolbarBackdropFilter: (filterBlur: number) => string;

Expand Down Expand Up @@ -1417,10 +1423,6 @@ export function ResizableContainerObserver({ onResize, children, }: {
children?: React_2.ReactNode;
}): React_2.JSX.Element;

// @internal (undocumented)
const ResizeObserver_2: ResizeObserverType;
export { ResizeObserver_2 as ResizeObserver }

// @internal (undocumented)
export type ResizeObserverType = default_2;

Expand All @@ -1431,7 +1433,7 @@ export class ScrollPositionMaintainer implements IDisposable {
dispose(): void;
}

// @public
// @public @deprecated
export function ScrollView(props: CommonDivProps): React_2.JSX.Element;

// @public
Expand Down Expand Up @@ -1840,7 +1842,7 @@ export interface UnderlinedButtonProps {
title?: string;
}

// @beta
// @public
export function useCrossOriginPopup(visible: boolean, url: string | undefined, title: string, width: number, height: number, onClose: () => void): void;

// @public @deprecated
Expand Down
4 changes: 2 additions & 2 deletions common/api/summary/appui-react.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ beta;FloatingContentControl
beta;FloatingViewportContent(props: FloatingViewportContentProps): React_2.JSX.Element
beta;FloatingViewportContentControl
beta;FloatingViewportContentProps
alpha;FloatingViewportContentWrapper({ children, }: FloatingViewportContentWrapperProps): React_2.JSX.Element
alpha;FloatingViewportContentWrapperProps
public;FloatingViewportContentWrapper({ children, }: FloatingViewportContentWrapperProps): React_2.JSX.Element
public;FloatingViewportContentWrapperProps
alpha;FocusToolSettings
beta;FrameworkAccuDraw
public;FrameworkBackstage
Expand Down
12 changes: 11 additions & 1 deletion common/api/summary/core-react.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ internal;calculateBoxShadowOpacity: (proximityScale: number) => number
internal;calculateProximityScale: (proximity: number, snap?: boolean, threshold?: number) => number
internal;calculateToolbarOpacity: (proximityScale: number) => number
public;Centered(props: CommonDivProps): React_2.JSX.Element
deprecated;Centered(props: CommonDivProps): React_2.JSX.Element
public;CheckBoxInfo
public;CheckBoxState
public;CheckListBox
Expand Down Expand Up @@ -47,8 +48,11 @@ public;DialogAlignment
public;DialogProps
public;DisabledText(props: TextProps): React_2.JSX.Element
public;Div(props: DivProps): React_2.JSX.Element
deprecated;Div(props: DivProps): React_2.JSX.Element
public;DivProps
deprecated;DivProps
public;DivWithOutsideClick:
deprecated;DivWithOutsideClick:
public;ElementResizeObserver({ watchedElement, render, }:
public;ElementSeparator: (props: ElementSeparatorProps) => React_2.JSX.Element
public;ElementSeparatorProps
Expand All @@ -58,21 +62,26 @@ public;ExpandableListProps
public;ExpansionToggle(props: ExpansionToggleProps): React_2.JSX.Element
public;ExpansionToggleProps
public;FillCentered(props: CommonDivProps): React_2.JSX.Element
deprecated;FillCentered(props: CommonDivProps): React_2.JSX.Element
alpha;FilteredText(props: FilteredTextProps): React_2.JSX.Element
alpha;FilteredTextProps
internal;flattenChildren: (children: React_2.ReactNode) => React_2.ReactNode
public;FlexWrapContainer(props: CommonDivProps): React_2.JSX.Element
deprecated;FlexWrapContainer(props: CommonDivProps): React_2.JSX.Element
internal;focusIntoContainer(focusContainer: HTMLDivElement, initialFocusElement?: React_2.RefObject
internal;FocusTrap(props: FocusTrapProps): React_2.JSX.Element | null
internal;FocusTrapProps
public;Gap(props: GapProps): React_2.JSX.Element
deprecated;Gap(props: GapProps): React_2.JSX.Element
public;GapProps
deprecated;GapProps
public;GetAutoSuggestDataFunc = (value: string) => AutoSuggestData[]
internal;getBestBWContrastColor(hexColor: string): "black" | "white"
public;getCssVariable(variableName: string, htmlElement?: HTMLElement): string
public;getCssVariableAsNumber(variableName: string, htmlElement?: HTMLElement): number
internal;getDisplayName: (component: React_2.ComponentType
internal;getObjectClassName: (obj: any) => string
internal;getResizeObserver():
internal;getToolbarBackdropFilter: (filterBlur: number) => string
internal;getToolbarBackgroundColor: (opacity: number) => string
internal;getToolbarBoxShadow: (opacity: number) => string
Expand Down Expand Up @@ -165,6 +174,7 @@ public;ResizableContainerObserver({ onResize, children, }:
internal;ResizeObserverType = default_2
public;ScrollPositionMaintainer
public;ScrollView(props: CommonDivProps): React_2.JSX.Element
deprecated;ScrollView(props: CommonDivProps): React_2.JSX.Element
public;SearchBox
public;SearchBoxProps
public;SettingsContainer: ({ tabs, onSettingsTabSelected, currentSettingsTab, settingsManager, showHeader, }: SettingsContainerProps) => React_2.JSX.Element
Expand Down Expand Up @@ -209,7 +219,7 @@ public;UiStateStorageResult
public;UiStateStorageStatus
public;UnderlinedButton(props: UnderlinedButtonProps): React_2.JSX.Element
public;UnderlinedButtonProps
beta;useCrossOriginPopup(visible: boolean, url: string | undefined, title: string, width: number, height: number, onClose: () => void): void
public;useCrossOriginPopup(visible: boolean, url: string | undefined, title: string, width: number, height: number, onClose: () => void): void
public;useDisposable
deprecated;useDisposable
public;useEffectSkipFirst(callback: () => (void | (() => void | undefined)) | void, deps?: any[]): void
Expand Down
Loading

0 comments on commit 4be10b2

Please sign in to comment.