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

Release version 6.3 #2421

Merged
merged 45 commits into from
Aug 16, 2022
Merged

Release version 6.3 #2421

merged 45 commits into from
Aug 16, 2022

Conversation

jkaltoft
Copy link
Collaborator

@jkaltoft jkaltoft commented Aug 16, 2022

Changelog

Features

Upgrade to Ionic 6

This change allows us to remove all the custom animation logic
that was copied from Ionics code base, and enhanced with some
logic for reducing the opacity of underlying modals. This was no longer
working with Ionic 6, and had to be refactored or removed.

The cost of this change is that modal backdrop opacity now stacks,
so the background gets darker and darker with nested modals.
Text is already centered due to the empty state component
which wraps all alert content.
We are scaling and moving the modal in unexpected ways to position
the action sheet. Previously we were able to hide the modal shadow
element that has the wrong size and position via CSS but it is now
encapsulated and not exposed via a part in Ionic 6. Therefore it is
removed instead.
This way all the modal elements that use the custom properties
(modal shadow, modal content etc) get the proper sizes and so on.
The modal-wrapper component and its ion-modal parent
is now separated by a shadow-dom, which means that nativeElement.closest
no longer works, and an alternative approach for adding the full-height
css class is needed.

The solution has also been slightly refactored so the class is added to
the ion-modal element instead, now the using custom css properties of
that component.
These are now set via ion-modal --border-radius elsewhere and should
properly cascade throughout the modal as a result of that.
Leave it to ionic to make the modal go all the way to the edge on small
devices, effectively hiding the box shadow
As we are no longer testing the specific ionic implementation we can
remove the different size scenarios as none of tests are based on
the screen dimensions anymore.
We now use the default backdrop behavior from Ionic and should
therefore not need to test this.
Instead of duplicating tests for both phone and tablet/desktop we
now only test the special cases whenever it should be different on
phone.

Unfortunately I also accidentally bundled in a general cleanup with this
commit. Sorry future someone, I owe you!
This way we avoid custom functionality to traverse the DOM from the
modal wrapper that is now placed inside a slot.
The animations are directly based on the default enter/leave from Ionic.
These are copied over to be able to adjust the backdrop opacity
so it does not stack with multiple modals (see following commit).
It has now been refactored to work with the new Ionic 6 animations
implemented in the previous commit.
@github-actions github-actions bot temporarily deployed to pr-v6-3-0 August 16, 2022 08:21 Inactive
@github-actions github-actions bot temporarily deployed to pr-v6-3-0 August 16, 2022 08:23 Inactive
@jkaltoft jkaltoft marked this pull request as ready for review August 16, 2022 08:25
@jkaltoft jkaltoft merged commit 01cfed6 into main Aug 16, 2022
@jkaltoft jkaltoft deleted the release/v6.3.0 branch August 16, 2022 08:30
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