Skip to content

New Dialog using the new Pan and Transition Views #1576

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 15 commits into from
Nov 13, 2021
Merged

Conversation

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

Description

New Dialog using the new Pan and Transition Views
This will have conflicts with #1574
This is not feature complete, but not bad.
Missing features (or things I did not test yet): alignments, fix Android measureInWindow bug, header (do we need it? probably not), default style(?), onOrientationChange, useSafeArea.

Changelog

New Dialog using the new Pan and Transition Views

@ethanshar
Copy link
Collaborator

I think we talked about it already..
It'll be great if we can refactor the existing Dialog component and use the new infra without having a new component or any migration

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

I think we talked about it already.. It'll be great if we can refactor the existing Dialog component and use the new infra without having a new component or any migration

We did talk about it; I did say that it might not be possible if we want to remove the older pan views (but this can be done in v7).
However I do think refactoring is not the best course of action since we have a lot of logic that we may not need and if we want cleaner code I think this is a better way: small PRs that will get us to the same APIs, and then switch the implementation.
WDYT?

@ethanshar
Copy link
Collaborator

We did talk about it; I did say that it might not be possible if we want to remove the older pan views (but this can be done in v7). However I do think refactoring is not the best course of action since we have a lot of logic that we may not need and if we want cleaner code I think this is a better way: small PRs that will get us to the same APIs, and then switch the implementation. WDYT?

So yes, let's go with small PRs
And.. as discussed let's try to replace enums with string values (eg `'up' | 'down' | 'left'....)

@M-i-k-e-l M-i-k-e-l requested a review from ethanshar October 27, 2021 12:54
Comment on lines +27 to +28
up: -y - height,
down: Constants.windowHeight - y,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did u change to up/down?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So it will be backwards compatible with the old enum and remove some awkward "translations" between the two enums.

Copy link
Collaborator

@ethanshar ethanshar Nov 9, 2021

Choose a reason for hiding this comment

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

I see.. bummer I prefer top/bottom on up/down
If the relevant components are in Incubator I don't mind changing it to top/bottom everywhere, I don't consider it a breaking change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It'll require a migration (public, private, apps...) because we're using up\down here.
Or some code I removed to translate it (and you did not like, if I recall correctly).
I figured we can use the old convention, at least for now, and a migration can be done in any time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok 👍

@M-i-k-e-l M-i-k-e-l requested a review from ethanshar November 3, 2021 13:25
@ethanshar
Copy link
Collaborator

Approved, build is still running you can merge once it's done

@M-i-k-e-l M-i-k-e-l merged commit d77c202 into master Nov 13, 2021
@M-i-k-e-l M-i-k-e-l deleted the feat/new-dialog branch November 13, 2021 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants