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 ModalFrontstageButton component (backport #1156) #1158

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 16, 2024

Changes

This PR adds backButton property to ModalFrontstageInfo interface to allow specifying of a custom back button for a modal frontstage. Additionally ModalFrontstageButton component is added to maintain visual consistency between modal frontstages.

ModalFrontstageButton uses iTwinUI IconButton instead of outdated custom implementation.
Additionally, ModalFrontstageButton is used as a default back button if no backButton is provided via ModalFrontstageInfo.

Testing

Added additional story.


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

* Ability to override backButton of a modal frontstage.

* Add ModalFrontstageButton

* Remove unused BackButton

* rush change

* NextVersion.md

* Extract API

* Update snaps

(cherry picked from commit b8a94f9)

# Conflicts:
#	docs/changehistory/NextVersion.md
#	ui/appui-react/src/appui-react/layout/widget/tools/button/Back.tsx
@mergify mergify bot requested a review from a team as a code owner December 16, 2024 09:04
@mergify mergify bot added the conflicts label Dec 16, 2024
Copy link
Contributor Author

mergify bot commented Dec 16, 2024

Cherry-pick of b8a94f9 has failed:

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

You are currently cherry-picking commit b8a94f948.
  (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/summary/appui-react.exports.csv
	new file:   common/changes/@itwin/appui-react/modal-frontstage-back_2024-12-13-14-49.json
	modified:   docs/storybook/src/frontstage/Modal.stories.tsx
	modified:   docs/storybook/src/frontstage/Modal.tsx
	modified:   e2e-tests/tests/configurableui/configurable-ui.test.ts-snapshots/configurable-ui-test-1-chromium-linux.png
	modified:   e2e-tests/tests/content/content-layout.test.ts-snapshots/content-layout-test-1-chromium-linux.png
	modified:   e2e-tests/tests/content/split-pane.test.ts-snapshots/content-layout-test-1-chromium-linux.png
	modified:   e2e-tests/tests/frontstage/modal-frontstage.test.ts-snapshots/modal-frontstage-test-1-chromium-linux.png
	modified:   e2e-tests/tests/picker/view-selector.test.ts-snapshots/view-selector-test-1-chromium-linux.png
	modified:   ui/appui-react/src/appui-react.ts
	modified:   ui/appui-react/src/appui-react/framework/FrameworkFrontstages.ts
	modified:   ui/appui-react/src/appui-react/frontstage/ModalFrontstage.scss
	modified:   ui/appui-react/src/appui-react/frontstage/ModalFrontstage.tsx
	renamed:    ui/appui-react/src/appui-react/layout/widget/tools/button/Back.scss -> ui/appui-react/src/appui-react/frontstage/ModalFrontstageButton.scss
	new file:   ui/appui-react/src/appui-react/frontstage/ModalFrontstageButton.tsx
	modified:   ui/appui-react/src/appui-react/widget-panels/ModalFrontstageComposer.tsx
	modified:   ui/appui-react/src/test/frontstage/ModalFrontstage.test.tsx
	deleted:    ui/appui-react/src/test/layout/widget/tools/Back.test.tsx

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   docs/changehistory/NextVersion.md
	deleted by them: ui/appui-react/src/appui-react/layout/widget/tools/button/Back.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 16, 2024 09:37
@GerardasB GerardasB self-assigned this Dec 16, 2024
@GerardasB GerardasB merged commit c73fda4 into release/5.0.x Dec 16, 2024
18 checks passed
@GerardasB GerardasB deleted the mergify/bp/release/5.0.x/pr-1156 branch December 16, 2024 09:52
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