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

Add ToolUtilities to define tool icon as a React element (backport #1150) #1152

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 11, 2024

Changes

Add ToolUtilities.defineIcon helper that defines an icon as a React element for a given ToolType.

For additional information and usage notes see NextVersion.md

Testing

Added additional unit tests and tested via test-app.


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

* Add ToolUtilities

* Update Tool types to include iconElement property.

* NextVersion.md

* Add note

* Extract API

* Add unit tests

* Update test

* rush change

* Update snaps

(cherry picked from commit 87ca8e3)

# Conflicts:
#	docs/changehistory/NextVersion.md
#	ui/appui-react/src/appui-react/toolbar/ToolbarItemUtilities.tsx
@mergify mergify bot requested a review from a team as a code owner December 11, 2024 15:39
@mergify mergify bot added the conflicts label Dec 11, 2024
Copy link
Contributor Author

mergify bot commented Dec 11, 2024

Cherry-pick of 87ca8e3 has failed:

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

You are currently cherry-picking commit 87ca8e386.
  (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:   apps/test-app/src/frontend/appui/frontstages/MainFrontstage.tsx
	modified:   common/api/appui-react.api.md
	modified:   common/api/imodel-components-react.api.md
	modified:   common/api/summary/appui-react.exports.csv
	modified:   common/api/summary/imodel-components-react.exports.csv
	new file:   common/changes/@itwin/appui-react/tool-icons_2024-12-11-13-21.json
	new file:   common/changes/@itwin/imodel-components-react/tool-icons_2024-12-11-13-21.json
	modified:   e2e-tests/tests/toolbar/toolbar-composer.test.ts-snapshots/toolbar-composer-test-1-chromium-linux.png
	new file:   ui/appui-react/src/appui-react/icons/SvgViewLayouts.tsx
	renamed:    ui/appui-react/src/appui-react/tools/KeyinPaletteTools.ts -> ui/appui-react/src/appui-react/tools/KeyinPaletteTools.tsx
	renamed:    ui/appui-react/src/appui-react/tools/OpenSettingsTool.ts -> ui/appui-react/src/appui-react/tools/OpenSettingsTool.tsx
	renamed:    ui/appui-react/src/appui-react/tools/RestoreLayoutTool.ts -> ui/appui-react/src/appui-react/tools/RestoreLayoutTool.tsx
	new file:   ui/appui-react/src/test/toolbar/ToolbarItemUtilities.test.tsx
	modified:   ui/imodel-components-react/src/imodel-components-react.ts
	new file:   ui/imodel-components-react/src/imodel-components-react/ToolUtilities.ts
	new file:   ui/imodel-components-react/src/test/ToolUtilities.test.tsx

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   docs/changehistory/NextVersion.md
	both modified:   ui/appui-react/src/appui-react/toolbar/ToolbarItemUtilities.tsx

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 enabled auto-merge (squash) December 11, 2024 16:02
@GerardasB GerardasB merged commit 7bae04d into release/5.0.x Dec 11, 2024
18 checks passed
@GerardasB GerardasB deleted the mergify/bp/release/5.0.x/pr-1150 branch December 11, 2024 16:24
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