Skip to content

Feat/incubator dialog more props and fixes #2251

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

Merged
merged 11 commits into from
Sep 18, 2022

Conversation

M-i-k-e-l
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l commented Sep 12, 2022

Description

You can look at individual commits for simplicity.

Incubator.Dialog - add support for a few things (custom elements, onPress on the header + width and height in the dialog) and a couple of fixes.
Add API for DialogHeader.
Start migration in ActionSheet and a couple of screens (and support it on Incubator.WheelPicker.

Naming: I am not sure about a couple of styles names (see TODO), suggestions are welcome.

WOAUILIB-2317
WOAUILIB-3072

Changelog

Incubator.Dialog - add support for a few things, a couple of fixes and start a migration for ActionSheet.

@M-i-k-e-l M-i-k-e-l added the Important for Next Release PR that must be included in the release version label Sep 12, 2022
@ethanshar
Copy link
Collaborator

@M-i-k-e-l
Please avoid big PRs in the future, unless all changes are coupled, I think you can have broken them into a series of small PRs

@M-i-k-e-l
Copy link
Collaborator Author

@ethanshar

Please avoid big PRs in the future, unless all changes are coupled, I think you can have broken them into a series of small PRs

I understand, but each commit is a change which can be viewed individually and while they are not exactly coupled, in order to have higher confidence in the changes, I wanted to perform a few migrations (while doing other migrations later on).

Copy link
Contributor

@lidord-wix lidord-wix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, I wrote some comments :)

Comment on lines +252 to +254
if (onModalDismissed) {
LogService.deprecationWarn({component: 'ActionSheet', oldProp: 'onModalDismissed', newProp: 'onDismiss'});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today users maybe use both props for two different purposes, are we omitting the onModalDismissed prop?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onModalDismissed comes from the ActionSheet, it is no longer needed with the new Dialog.
We cannot omit it because that will cause a TS error, I'll add deprecated to it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, but if a user uses our ActionSheet and passes those both props, with a different callback for each (for some reason) he won't be able to do so anymore.
I agree it's a bit rare and not something that we should care about much, but at least mention somewhere that it's a breaking change.. don't you think?

Copy link
Collaborator Author

@M-i-k-e-l M-i-k-e-l Sep 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the user does not have to send the migrateDialog prop, this will only be "mandatory" in v7, where we can break the user. If they choose to migrate, they can fix the logic they have.
Not sure if this is clear, but this is not our private ActionSheet.

Copy link
Contributor

@lidord-wix lidord-wix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, please see my last comment before you merge :)

@M-i-k-e-l M-i-k-e-l merged commit aaaf4c3 into master Sep 18, 2022
@M-i-k-e-l M-i-k-e-l deleted the feat/incubator-dialog-more-props-and-fixes branch September 18, 2022 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Important for Next Release PR that must be included in the release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants