Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix save restore of frontstage layout (backport #846) #847

Merged
merged 2 commits into from
May 21, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 20, 2024

Changes

This PR fixes #842 caused when React18 is used with StrictMode.
React and testing library versions were updated.

Testing

Added additional unit tests.


This is an automatic backport of pull request #846 done by [Mergify](https://mergify.com).

* Bump react & react-dom versions.

* Use createRoot in test-app.

* Bump rtl version.

* Move useSaveFrontstageSettings to separate module.

* Use lodash debounce.

* Tests.

* Remove deprecated @testing-library/react-hooks

* React to @testing-library/react-hooks removal.

* Fix build issues.

* Bump vitest

* Fix core-react tests.

* Remove unused jsdom-global

* Fix component-react tests

* Fix appui-react tests

* Fix imodel-components-react tests

* Update useSaveFrontstageSettings tests.

* rush change

* Extract API.

* Remove .only

* Fix appui-test-providers build issues.

* Fix linter issues.

* extract api

* Fix act warnings in PopupManager

* Fix widget lifecycle e2e tests.

* Update snaps - editor values were not displayed correctly.

* Fix

(cherry picked from commit bd5d72f)

# Conflicts:
#	common/config/rush/pnpm-lock.yaml
@mergify mergify bot requested review from a team as code owners May 20, 2024 16:51
@mergify mergify bot added the conflicts label May 20, 2024
Copy link
Contributor Author

mergify bot commented May 20, 2024

Cherry-pick of bd5d72f has failed:

On branch mergify/bp/release/4.13.x/pr-846
Your branch is up to date with 'origin/release/4.13.x'.

You are currently cherry-picking commit bd5d72f0e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   common/api/appui-react.api.md
	modified:   common/api/components-react.api.md
	modified:   common/api/core-react.api.md
	modified:   common/api/imodel-components-react.api.md
	modified:   common/api/summary/appui-react.exports.csv
	modified:   common/api/summary/components-react.exports.csv
	modified:   common/api/summary/core-react.exports.csv
	modified:   common/api/summary/imodel-components-react.exports.csv
	new file:   common/changes/@itwin/appui-react/fix-save-restore_2024-05-20-11-01.json
	new file:   common/changes/@itwin/components-react/fix-save-restore_2024-05-20-11-01.json
	new file:   common/changes/@itwin/core-react/fix-save-restore_2024-05-20-11-01.json
	new file:   common/changes/@itwin/imodel-components-react/fix-save-restore_2024-05-20-11-01.json
	modified:   common/config/rush/browser-approved-packages.json
	modified:   common/config/rush/common-versions.json
	modified:   common/config/rush/repo-state.json
	modified:   common/config/rush/variants/core-3x/common-versions.json
	modified:   docs/storybook/package.json
	modified:   e2e-tests/tests/editors/editors.test.ts-snapshots/Editor-Primitive-number-numeric-input-UiAbstract-InputEditorSize-UiAbstract-Range-default-visual-1-chromium-linux.png
	modified:   e2e-tests/tests/editors/editors.test.ts-snapshots/Editor-Primitive-number-numeric-input-UiAbstract-InputEditorSize-default-visual-1-chromium-linux.png
	modified:   e2e-tests/tests/editors/editors.test.ts-snapshots/Editor-Primitive-number-numeric-input-UiAbstract-Range-default-visual-1-chromium-linux.png
	modified:   e2e-tests/tests/editors/editors.test.ts-snapshots/Editor-Primitive-number-numeric-input-default-visual-1-chromium-linux.png
	modified:   e2e-tests/tests/widget-state.test.ts
	modified:   test-apps/appui-test-app/appui-test-providers/package.json
	modified:   test-apps/appui-test-app/appui-test-providers/src/ui/providers/ComponentExamplesProvider.tsx
	modified:   test-apps/appui-test-app/appui-test-providers/src/ui/widgets/LayoutWidget.tsx
	modified:   test-apps/appui-test-app/connected/package.json
	modified:   test-apps/appui-test-app/connected/src/frontend/index.tsx
	modified:   test-apps/appui-test-app/standalone/README.md
	modified:   test-apps/appui-test-app/standalone/package.json
	modified:   test-apps/appui-test-app/standalone/src/frontend/index.tsx
	modified:   ui/appui-react/package.json
	modified:   ui/appui-react/src/appui-react/accudraw/AccuDrawInputField.tsx
	modified:   ui/appui-react/src/appui-react/childwindow/InternalChildWindowManager.tsx
	modified:   ui/appui-react/src/appui-react/frontstage/FrontstageDef.tsx
	modified:   ui/appui-react/src/appui-react/widget-panels/Frontstage.tsx
	new file:   ui/appui-react/src/appui-react/widget-panels/useSaveFrontstageSettings.tsx
	modified:   ui/appui-react/src/test/TestUtils.ts
	modified:   ui/appui-react/src/test/accudraw/AccuDrawFieldContainer.test.tsx
	modified:   ui/appui-react/src/test/backstage/BackstageComposer.test.tsx
	modified:   ui/appui-react/src/test/backstage/BackstageManager.test.tsx
	modified:   ui/appui-react/src/test/backstage/useDefaultBackstageItems.test.ts
	modified:   ui/appui-react/src/test/cursor/cursorpopup/CursorPopup.test.tsx
	modified:   ui/appui-react/src/test/cursor/cursorprompt/CursorPrompt.test.tsx
	modified:   ui/appui-react/src/test/frontstage/FrontstageDef.test.tsx
	modified:   ui/appui-react/src/test/hooks/useActiveViewport.test.tsx
	modified:   ui/appui-react/src/test/layout/base/DragManager.test.tsx
	modified:   ui/appui-react/src/test/layout/base/NineZone.test.tsx
	modified:   ui/appui-react/src/test/layout/base/usePointerCaptor.test.tsx
	modified:   ui/appui-react/src/test/layout/outline/PanelOutline.test.tsx
	modified:   ui/appui-react/src/test/layout/target/PanelTarget.test.tsx
	modified:   ui/appui-react/src/test/layout/target/SectionTarget.test.tsx
	modified:   ui/appui-react/src/test/layout/target/TabTarget.test.tsx
	modified:   ui/appui-react/src/test/layout/target/useAllowedWidgetTarget.test.tsx
	modified:   ui/appui-react/src/test/layout/widget-panels/CursorOverlay.test.tsx
	modified:   ui/appui-react/src/test/layout/widget-panels/Grip.test.tsx
	modified:   ui/appui-react/src/test/layout/widget-panels/Panel.test.tsx
	modified:   ui/appui-react/src/test/layout/widget-panels/usePanelsAutoCollapse.test.tsx
	modified:   ui/appui-react/src/test/layout/widget/ContentRenderer.test.tsx
	modified:   ui/appui-react/src/test/layout/widget/FloatingWidget.test.tsx
	modified:   ui/appui-react/src/test/layout/widget/PanelWidget.test.tsx
	modified:   ui/appui-react/src/test/layout/widget/TabBar.test.tsx
	modified:   ui/appui-react/src/test/popup/PopupManager.test.tsx
	modified:   ui/appui-react/src/test/preview/PreviewFeatures.test.tsx
	modified:   ui/appui-react/src/test/theme/ThemeManager.test.tsx
	modified:   ui/appui-react/src/test/toolbar/useActiveToolIdSynchedItems.test.ts
	modified:   ui/appui-react/src/test/toolsettings/ToolUiProvider.test.tsx
	modified:   ui/appui-react/src/test/widget-panels/Frontstage.test.tsx
	modified:   ui/appui-react/src/test/widget-panels/ToolSettings.test.tsx
	new file:   ui/appui-react/src/test/widget-panels/useSaveFrontstageSettings.test.tsx
	modified:   ui/appui-react/src/test/widget-panels/useTransientState.test.tsx
	modified:   ui/appui-react/src/test/widget-panels/useWidgetDirection.test.tsx
	modified:   ui/components-react/package.json
	modified:   ui/components-react/src/components-react/favorite/FavoritePropertiesRenderer.ts
	modified:   ui/components-react/src/components-react/inputs/ParsedInput.tsx
	modified:   ui/components-react/src/test/common/UseAsyncValue.test.tsx
	modified:   ui/components-react/src/test/common/UseDebouncedAsyncValue.test.tsx
	modified:   ui/components-react/src/test/filter-builder/FilterBuilderState.test.ts
	modified:   ui/components-react/src/test/propertygrid/component/VirtualizedPropertyGridWithDataProvider.test.tsx
	modified:   ui/components-react/src/test/toolbar/Toolbar.test.tsx
	modified:   ui/components-react/src/test/toolbar/useConditionalSynchedItems.test.ts
	modified:   ui/components-react/src/test/tree/controlled/TreeHooks.test.tsx
	modified:   ui/components-react/src/test/tree/controlled/component/ControlledTree.test.tsx
	modified:   ui/components-react/src/test/useTranslation.test.ts
	modified:   ui/core-react/package.json
	modified:   ui/core-react/src/core-react/inputs/Input.tsx
	modified:   ui/core-react/src/core-react/inputs/iconinput/IconInput.tsx
	modified:   ui/core-react/src/core-react/inputs/numberinput/NumberInput.tsx
	modified:   ui/core-react/src/core-react/tree/Node.tsx
	modified:   ui/core-react/src/test/elementseparator/ElementSeparator.test.tsx
	modified:   ui/core-react/src/test/l10n/usePackageTranslation.test.tsx
	modified:   ui/core-react/src/test/searchbox/SearchBox.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useCrossOriginPopup.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useDisposable.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useEffectSkipFirst.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useEventListener.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useInterval.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useLifecycleLogging.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useOnOutsideClick.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useRefEffect.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useRefs.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useResizeObserver.test.tsx
	modified:   ui/core-react/src/test/utils/hooks/useThrottledFn.test.tsx
	modified:   ui/imodel-components-react/package.json
	modified:   ui/imodel-components-react/src/imodel-components-react/color/ColorPickerButton.tsx
	modified:   ui/imodel-components-react/src/imodel-components-react/color/ColorPickerPopup.tsx
	modified:   ui/imodel-components-react/src/imodel-components-react/inputs/QuantityNumberInput.tsx
	modified:   ui/imodel-components-react/src/test/quantityformat/QuantityFormatPanel.test.tsx
	modified:   ui/imodel-components-react/src/test/timeline/SolarTimeline.test.tsx
	modified:   ui/imodel-components-react/src/test/timeline/TimelineComponent.test.tsx

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   common/config/rush/pnpm-lock.yaml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@GerardasB GerardasB merged commit 983150b into release/4.13.x May 21, 2024
18 checks passed
@GerardasB GerardasB deleted the mergify/bp/release/4.13.x/pr-846 branch May 21, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant