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

bug: collapsible large title header in modal is hidden with inline modals #28867

Closed
3 tasks done
wibimaster opened this issue Jan 23, 2024 · 8 comments · Fixed by #29164
Closed
3 tasks done

bug: collapsible large title header in modal is hidden with inline modals #28867

wibimaster opened this issue Jan 23, 2024 · 8 comments · Fixed by #29164
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@wibimaster
Copy link

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Since #28277

In a page with :

<ion-header></ion-header>
<ion-content>
  <ion-header collapse="condense"></ion-header>
</ion-content>

If a modal is open, the opacity: 0 is applied on the background header (was not the case before).
And, the style is not removed when the modal is closed.

Expected Behavior

The style should not be applied when open a modal (or, at least, be removed after modal close).

Steps to Reproduce

  • Open a modal
  • Close the modal

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 7.6.5-dev.11704916749.1e64a3a7
@angular-devkit/build-angular : 17.1.0
@angular-devkit/schematics : 17.1.0
@angular/cli : 17.1.0
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 5.6.0
@capacitor/android : 5.6.0
@capacitor/core : 5.6.0
@capacitor/ios : 5.6.0

Utility:

cordova-res : not installed globally
native-run : 2.0.0

System:

NodeJS : v20.9.0 (C:\Program Files\nodejs\node.exe)
npm : 10.3.0
OS : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jan 23, 2024
@liamdebeasi liamdebeasi self-assigned this Jan 23, 2024
@liamdebeasi liamdebeasi changed the title bug: Header opacity forced to 0 when open a modal bug: collapsible large title header in modal is hidden with inline modals Jan 23, 2024
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Jan 23, 2024
@liamdebeasi liamdebeasi added triage ionitron: needs reproduction a code reproduction is needed from the issue author and removed package: core @ionic/core package type: bug a confirmed bug report labels Jan 23, 2024
Copy link

ionitron-bot bot commented Jan 23, 2024

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

@ionitron-bot ionitron-bot bot removed the triage label Jan 23, 2024
@liamdebeasi
Copy link
Contributor

Can you provide a runnable sample I can use to reproduce the issue? I think I know what the issue is, but I want to be certain.

@liamdebeasi liamdebeasi removed their assignment Jan 23, 2024
@wibimaster
Copy link
Author

Can you provide a runnable sample I can use to reproduce the issue? I think I know what the issue is, but I want to be certain.

Yep: https://github.com/wibimaster/debug-ionic-28867
Branch main, just clone, npm i and run ionic serve

I have created an Ionic Angular project
ionic start debug blank --type=angular --capacitor
Then updated the @ionic/angular branch
npm i --save @ionic/angular@7.6.5-dev.11704916749.1e64a3a7
Then updated home.page.ts and home.page.html to have a modal card, iOS style

Open it, close it, and the bug is here :)

@averyjohnston averyjohnston added triage and removed ionitron: needs reproduction a code reproduction is needed from the issue author labels Jan 24, 2024
@DavidStrausz
Copy link
Contributor

You can use the following workaround until a fix is released. For me it's only happening when forcing iOS mode in an otherwise MD application for an ion-header element (mode="ios"). So you may want to apply the workaround only for md.

ion-header:not(.header-collapse-main):has(
      ~ ion-content ion-header[collapse='condense'],
      ~ ion-content ion-header.header-collapse-condense
    ) {
    opacity: 1;
  }

@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Jan 26, 2024
@ionitron-bot ionitron-bot bot removed the triage label Jan 26, 2024
@liamdebeasi
Copy link
Contributor

Hi everyone,

Here is a dev build with a proposed fix if anyone is interested in testing: 7.8.1-dev.11710452743.1ca99e5e

@DavidStrausz
Copy link
Contributor

Thanks @liamdebeasi, the dev build fixes the issue in my apps!

github-merge-queue bot pushed a commit that referenced this issue Mar 15, 2024
Issue number: resolves #28867

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

I missed an edge case in
#28277 that caused an
MD headers in an MD app to be hidden due to the presence of an iOS
header (via `mode="ios"`). This was happening because I forgot to scope
the selector in `header.ios.scss` to only iOS headers.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The headers in the relevant selector are now scoped to the iOS headers
which avoids this bug while preserving the anti-flicker mechanism added
in the linked PR.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build: `7.8.1-dev.11710452743.1ca99e5e`

---------

Co-authored-by: ionitron <hi@ionicframework.com>
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #29164, and a fix will be available in an upcoming release of Ionic Framework. Feel free to keep testing the dev build, and let me know if you have any questions.

Copy link

ionitron-bot bot commented Apr 14, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants