Skip to content

fix(react, vue): inline modals apply ion-page class - #27481

Merged
liamdebeasi merged 13 commits into
mainfrom
FW-4353
May 24, 2023
Merged

liamdebeasi merged 13 commits into
mainfrom
FW-4353

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented May 15, 2023 •

Copy link
Copy Markdown
Contributor

Issue number: resolves #27470


What is the current behavior?

Passing multiple elements in to an inline modal causes .ion-page to not get set. This causes content to get pushed off the bottom of the modal equal to the height of the header. React has some special CSS that prevents this:

className: 'ion-delegate-host',
style: {
display: 'flex',
flexDirection: 'column',

However, I think this should be delegated to .ion-page instead so the behavior is consistent across frameworks. For example, Angular uses .ion-page:

template: `<div class="ion-delegate-host ion-page" *ngIf="isCmpOpen || keepContentsMounted">

What is the new behavior?

  • Inline overlays in Ionic React and Ionic Vue wrap child content in .ion-delegate-host.ion-page.
  • Removed the custom flex styles from Ionic React as .ion-page has its own styles.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Revised Design Doc: https://github.com/ionic-team/ionic-framework-design-documents/pull/84

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added package: react @ionic/react package package: vue @ionic/vue package labels May 15, 2023
@liamdebeasi liamdebeasi changed the title Fw 4353 fix(react, vue): inline overlays apply ion-page class May 15, 2023
@liamdebeasi
liamdebeasi requested a review from sean-perkins May 15, 2023 15:03
@liamdebeasi liamdebeasi changed the title fix(react, vue): inline overlays apply ion-page class fix(react, vue): inline modals apply ion-page class May 15, 2023
@liamdebeasi
liamdebeasi marked this pull request as ready for review May 16, 2023 13:48
'div',
{
id: 'ion-react-wrapper',
ref: this.wrapperRef,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All overlays in React still need a wrapper because of how we handle teleporting in react

Comment on lines -139 to -141
display: 'flex',
flexDirection: 'column',
height: '100%',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These styles were only needed for ion-modal and are now accomplished by the .ion-page class. See #24510

@liamdebeasi
liamdebeasi requested a review from sean-perkins May 23, 2023 14:34

@sean-perkins sean-perkins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, great work!

@liamdebeasi
liamdebeasi added this pull request to the merge queue May 24, 2023
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 24, 2023
@liamdebeasi
liamdebeasi added this pull request to the merge queue May 24, 2023
Merged via the queue into main with commit 02678f3 May 24, 2023
@liamdebeasi
liamdebeasi deleted the FW-4353 branch May 24, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: react @ionic/react package package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: List in inline modal last item is cut off

3 participants