Repository navigation
docs(header, footer, tab-bar): document the scrollEffect prop #4845
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
base: major-10.0
Are you sure you want to change the base?
Changes from all commits
acbeb4c
68f0173
ae78843
b9508a8
23f833b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
brandyscarney marked this conversation as resolved.
Resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,7 +158,7 @@ Open `/src/app/tab2/tab2.page.html`. It contains: | |
| </ion-header> | ||
|
|
||
| <ion-content [fullscreen]="true"> | ||
| <ion-header collapse="condense"> | ||
| <ion-header scrollEffect="condense"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The text above this block says it's what the generated file contains, but the starters still generate
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wasn't tracked, it is now internally. The change is in ionic-team/starters#1936 against the new |
||
| <ion-toolbar> | ||
| <ion-title size="large">Tab 2</ion-title> | ||
| </ion-toolbar> | ||
|
|
@@ -168,7 +168,7 @@ Open `/src/app/tab2/tab2.page.html`. It contains: | |
| </ion-content> | ||
| ``` | ||
|
|
||
| `ion-header` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to iOS [Collapsible Large Title](../api/title.mdx#collapsible-large-titles) support). Rename both `ion-title` elements to: | ||
| `ion-header` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to [Collapsible Large Title](../api/title.mdx#collapsible-large-titles) support). Rename both `ion-title` elements to: | ||
|
|
||
| ```html | ||
| <ion-header [translucent]="true"> | ||
|
|
@@ -179,7 +179,7 @@ Open `/src/app/tab2/tab2.page.html`. It contains: | |
| </ion-header> | ||
|
|
||
| <ion-content [fullscreen]="true"> | ||
| <ion-header collapse="condense"> | ||
| <ion-header scrollEffect="condense"> | ||
| <ion-toolbar> | ||
| <!-- CHANGE: Update title --> | ||
| <ion-title size="large">Photo Gallery</ion-title> | ||
|
|
@@ -200,7 +200,7 @@ We put the visual aspects of our app into `<ion-content>`. In this case, it’s | |
| </ion-header> | ||
|
|
||
| <ion-content> | ||
| <ion-header collapse="condense"> | ||
| <ion-header scrollEffect="condense"> | ||
| <ion-toolbar> | ||
| <ion-title size="large">Photo Gallery</ion-title> | ||
| </ion-toolbar> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,17 +37,17 @@ import Translucent from '@site/static/usage/v10/header/translucent/index.mdx'; | |
|
|
||
| ## Condensed Header {/* #condensed-header */} | ||
|
|
||
| Ionic provides the functionality found in native iOS applications to show a large toolbar title and then collapse it to a small title when scrolling. This can be done by adding two headers, one above the content and one inside of the content, and then setting the `collapse` property to `"condense"` on the header inside of the content. This effect will only apply when the mode is "ios". | ||
| Ionic provides the functionality found in native iOS applications to show a large toolbar title and then collapse it to a small title when scrolling. This can be done by adding two headers, one above the content and one inside of the content, and then setting the `scrollEffect` property to `"condense"` on the header inside of the content. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the v10 updating guide needs a header/footer entry for this, since switching from
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in b9508a8. |
||
|
|
||
| import Condense from '@site/static/usage/v10/header/condense/index.mdx'; | ||
|
|
||
| <Condense /> | ||
|
|
||
| ## Fade Header {/* #fade-header */} | ||
|
|
||
| Many native iOS applications have a fade effect on the toolbar. This can be achieved by setting the `collapse` property on the header to `"fade"`. When the page is first loaded, the background and border on the header will be hidden. As the content is scrolled, the header will fade back in. This effect will only apply when the mode is "ios". | ||
| Many native iOS applications have a fade effect on the toolbar. This can be achieved by setting the `scrollEffect` property on the header to `"fade"`. When the page is first loaded, the background and border on the header will be hidden. As the content is scrolled, the header will fade back in. | ||
|
|
||
| This functionality can be combined with a [Condensed Header](#condensed-header) as well. The `collapse` property with a value set to `"fade"` should be on the header outside of the content. | ||
| This functionality can be combined with a [Condensed Header](#condensed-header) as well. The `scrollEffect` property with a value set to `"fade"` should be on the header outside of the content. | ||
|
|
||
| import Fade from '@site/static/usage/v10/header/fade/index.mdx'; | ||
|
|
||
|
|
@@ -61,6 +61,14 @@ import CustomScrollTarget from '@site/static/usage/v10/header/custom-scroll-targ | |
|
|
||
| <CustomScrollTarget /> | ||
|
|
||
| ## Hide Header {/* #hide-header */} | ||
|
|
||
| The header can slide out of view as the content is scrolled down, giving the content more room, and slide back in as soon as the content is scrolled up. This can be achieved by setting the `scrollEffect` property on the header to `"hide"`. | ||
|
|
||
| import Hide from '@site/static/usage/v10/header/hide/index.mdx'; | ||
|
|
||
| <Hide /> | ||
|
|
||
| ## Borders {/* #borders */} | ||
|
|
||
| In `"md"` mode, the header will have a `box-shadow` on the bottom. In `"ios"` mode, it will receive a `border` on the bottom. These can be removed by adding the `.ion-no-border` class to the header. | ||
|
|
||
|
brandyscarney marked this conversation as resolved.
Resolved
|
|
brandyscarney marked this conversation as resolved.
Resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The paragraph under this block still says the large title "displays on iOS devices", but with
scrollEffectit condenses in every theme now. I think we can just drop "on iOS devices" from it. The React and Vue quickstarts have the same sentence, and I think the Your First App pages have a similar "due to iOS Collapsible Large Title support" line that could lose the "iOS" too. Since this PR removes the iOS-only note from the title page, the tutorials would end up contradicting it otherwise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in ae78843.