13432 Commits

Author SHA1 Message Date
15e368c378 feat(theme): improved color contrast with color palette (#28791)
Issue number: Internal

---------

<!-- 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. -->

The team would like to ensure that Ionic Framework components that use
an Ionic color (primary, secondary, etc) on top of a contrast color pass
minimum contrast ratios as defined in the WCAG.

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

- Introduces a revised set of Ionic colors that pass AA color contrast
guidelines when with the appropriate contrast.

## 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. -->

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
Co-authored-by: Sean Perkins <sean@ionic.io>
Co-authored-by: Shawn Taylor <shawn@ionic.io>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2024-01-08 15:30:35 -05:00
2c20a6bdb4 chore(breaking): update picker component heading level (#28725)
Issue number: N/A

---------

<!-- 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. -->

The picker heading level is currently an `h2`, where the other component
headings are `h4`.

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

- Updates the heading level for Picker to `h4`. 

## 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. -->
2023-12-18 16:45:25 -05:00
e0895e7a95 chore: sync with main
chore: sync with main
2023-12-18 11:09:00 -05:00
7cec5337a4 chore: sync 2023-12-18 10:46:20 -05:00
e574ffe85a chore(picker): mark ionInputModeChange as internal (#28701) 2023-12-13 17:51:23 -05:00
516b84475e fix(input, textarea, select): reduce padding on slotted buttons (#28676)
Issue number: N/A

---------

<!-- 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. -->

Buttons slotted in the start/end slots of input, textarea, or select
have a lot of excess padding that can cause them to look misaligned from
other pieces such as the control's label, especially when using
`fill="clear"`.

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

Padding removed, and a border radius added so that non-clear buttons as
well as the focus state on clear buttons still look okay. Existing
screenshot tests have also been updated to include buttons (non-clear
ones so you can see the border radius in the screenshots).

Let me know if you think this should go on a feature branch instead. I
chose `main` because the current experience looks somewhat broken and we
just did a minor release recently, but this could be considered a
notable enough behavior change.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

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

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-12-13 22:49:17 +00:00
bc51dd05cf fix(item): label does not expand indefinitely (#28700)
Issue number: N/A

---------

<!-- 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. -->


While working on an unrelated task, I noticed the list items in the list
starter app run off the page. This is due to the text wrapping behavior
in v7.6 where we allows the labels to grow/shrink. However, we do not
set a limit on how much they can grow. This means that child elements
inside of `ion-label` with long text can cause the label container to
grow indefinitely.

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

- Labels in item have a max-width of 100%

## 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.6.1-dev.11702498225.1ad6eda6`

| before | after |
| - | - |
| ![localhost_8102_home(Samsung Galaxy
S8+)](https://github.com/ionic-team/ionic-framework/assets/2721089/cadf8c5f-5813-4c8d-b236-752fde3d37cc)
| ![localhost_8102_home(Samsung Galaxy S8+)
(1)](https://github.com/ionic-team/ionic-framework/assets/2721089/ccb4277c-046d-46f8-b7f8-eda63c72fdb9)
|

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-12-13 22:05:30 +00:00
ae6c353b51 docs(test): add locale best practice (#28699)
This best practice currently resides in our internal testing process
docs. I think this is valuable information for contributors to have as
well, so I've added it to our public best practices doc.
2023-12-13 18:33:52 +00:00
ec07e70d99 chore: update PR template for breaking changes (#28698)
The team had feedback during a sprint retro that the breaking change
process documentation was a bit spread out. In particular, some team
members were not clear that you need to a) update the breaking.md file
and b) add the "BREAKING CHANGE" comment to the commit description.

This PR adds both of these things are comments for awareness.
2023-12-13 18:27:12 +00:00
cd5c099dd3 feat(picker): add inline picker (#28689)
Issue number: resolves #24905, resolves #26840, resolves #15710

---------

<!-- 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. -->

The current picker is only displayed as an overlay which makes it
impossible to use inline with the rest of the application. Additionally,
there are several bugs and missing features. For example, it is
impossible to know when the value of the picker column has changed using
public APIs. This is valuable for updating other columns in response to
that data.

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

- Introduces `ion-picker` as an inline wheel picker component. The
overlay picker is still available using `ion-picker-legacy`.
- The implementation of this component resolves linked bugs. It also
resolves linked features by exposing an `ionChange` event for developers
to listen for.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## 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.5.8-dev.11702398696.1ab62ea9`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Shawn Taylor <shawn@ionic.io>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2023-12-13 13:03:58 -05:00
fb23bf74d5 merge release-7.6.1
Release 7.6.1
2023-12-13 10:28:59 -05:00
f6531fa2be chore: bump package-lock 2023-12-13 09:31:00 -05:00
150ea1a8ad v7.6.1 v7.6.1 2023-12-13 14:27:51 +00:00
92f1b8627a fix(react): avoid type collision with @types/react@18.2.43 and greater (#28687)
Issue number: N/A

---------

<!-- 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. -->

Ionic React projects using `@types/react@18.2.43` or greater will run
into a type-check error on build with `IonRouterOutlet` and potentially
other components:

```
Property 'placeholder' is missing in type '{ children: Element[]; }' but required in type 'Pick<IonRouterOutlet & { basePath?: string | undefined; ref?: Ref<any> | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<...>, "color" | ... 254 more ... | "ionPage">'.
```

Definitely typed decided to make a breaking type change in a patch
release:
b954269038


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

- Patches the type to allow for compatibility between React v16, 17 and
18.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

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

### Testing

1. Create a new Ionic react project with the "list" template.
2. Run `npm run build`
3. Observe: Exception posted above
4. Install the dev-build
5. Run `npm run build`
6. Observe: No exception, build passes
7. You can additionally serve the app to verify no runtime
exceptions/broken behavior.

Dev-build: `7.6.1-dev.11702322681.17e39348`
2023-12-12 22:53:55 +00:00
666a01dd6e fix(button): wrap text by default (#28682)
Issue number: resolves #8700

BREAKING CHANGE: Button text now wraps by default.
2023-12-12 13:15:13 -05:00
8ee23d20d5 fix(menu): allow styling of the box shadow and transform when visible inside of a split pane (#28691)
Issue number: resolves #21530

---------

## What is the current behavior?
The `box-shadow` and `transform` properties cannot be styled on a menu
when it is inside of a split pane and visible due to the following:

1) The `box-shadow` and `transform` properties are set to `none` with
`!important`
2) The menu itself is not on "top" of the split pane content so the
content hides any box shadow

## What is the new behavior?

- Removes all uses of `!important` in split pane and menu
- Developers will need to change the `z-index` from `0` to `1` on the
`ion-menu` so the menu will sit on top of the split pane and show the
`box-shadow`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

I considered putting the test for this in `split-pane` but I thought
since it was styling the `ion-menu` it should go in menu. I can move
this if others think it makes more sense in `split-pane`.

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-12-12 17:49:47 +00:00
8f66acdffb chore(deps): Bump @stencil/core from 4.8.1 to 4.8.2 in /core (#28692)
Bumps [@stencil/core](https://github.com/ionic-team/stencil) from 4.8.1
to 4.8.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ionic-team/stencil/releases"><code>@​stencil/core</code>'s
releases</a>.</em></p>
<blockquote>
<h2>🐳 v4.8.2 (2023-12-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> make sure typesDir exist before writing
to it (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5109">#5109</a>)
(<a
href="9e4e27e58a">9e4e27e</a>)</li>
<li><strong>compiler:</strong> reapply changes to style import
transformer (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5125">#5125</a>)
(<a
href="https://redirect.github.com/ionic-team/stencil/issues/5131">#5131</a>)
(<a
href="735d45afdd">735d45a</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/5016">#5016</a></li>
<li><strong>runtime:</strong> hide slotted content with no destination
in scoped components (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5135">#5135</a>)
(<a
href="77bce27e02">77bce27</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/4284">#4284</a></li>
<li><strong>runtime:</strong> relocate slotted content when slot parent
element tag changes (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5120">#5120</a>)
(<a
href="4303d6af1b">4303d6a</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/4284">#4284</a></li>
<li><strong>runtime:</strong> update <code>textContent</code> patch to
mimic Shadow Root (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5146">#5146</a>)
(<a
href="55c56d69a6">55c56d6</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/3977">#3977</a></li>
<li><strong>testing:</strong> make Puppeteer an optional dependency (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5145">#5145</a>)
(<a
href="43cf0dc532">43cf0dc</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ionic-team/stencil/blob/main/CHANGELOG.md"><code>@​stencil/core</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>🐳 <a
href="https://github.com/ionic-team/stencil/compare/v4.8.1...v4.8.2">4.8.2</a>
(2023-12-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler:</strong> make sure typesDir exist before writing
to it (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5109">#5109</a>)
(<a
href="9e4e27e58a">9e4e27e</a>)</li>
<li><strong>compiler:</strong> reapply changes to style import
transformer (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5125">#5125</a>)
(<a
href="https://redirect.github.com/ionic-team/stencil/issues/5131">#5131</a>)
(<a
href="735d45afdd">735d45a</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/5016">#5016</a></li>
<li><strong>runtime:</strong> hide slotted content with no destination
in scoped components (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5135">#5135</a>)
(<a
href="77bce27e02">77bce27</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/4284">#4284</a></li>
<li><strong>runtime:</strong> relocate slotted content when slot parent
element tag changes (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5120">#5120</a>)
(<a
href="4303d6af1b">4303d6a</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/4284">#4284</a></li>
<li><strong>runtime:</strong> update <code>textContent</code> patch to
mimic Shadow Root (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5146">#5146</a>)
(<a
href="55c56d69a6">55c56d6</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/3977">#3977</a></li>
<li><strong>testing:</strong> make Puppeteer an optional dependency (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5145">#5145</a>)
(<a
href="43cf0dc532">43cf0dc</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="70884f87e8"><code>70884f8</code></a>
Release v4.8.2 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5157">#5157</a>)</li>
<li><a
href="6abe250702"><code>6abe250</code></a>
fix(compiler): make style getter behavior consistent between default and
nati...</li>
<li><a
href="55c56d69a6"><code>55c56d6</code></a>
fix(runtime): update <code>textContent</code> patch to mimic Shadow Root
(<a
href="https://redirect.github.com/ionic-team/stencil/issues/5146">#5146</a>)</li>
<li><a
href="476c7b6794"><code>476c7b6</code></a>
chore(deps): update dependency cspell to v8.1.3 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5151">#5151</a>)</li>
<li><a
href="fa5e9f617c"><code>fa5e9f6</code></a>
chore(deps): update dependency terser to v5.26.0 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5156">#5156</a>)</li>
<li><a
href="15eb129ee5"><code>15eb129</code></a>
chore(deps): update dependency puppeteer to v21.6.0 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5154">#5154</a>)</li>
<li><a
href="0868b0052c"><code>0868b00</code></a>
chore(deps): update typescript-eslint to v6.13.2 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5153">#5153</a>)</li>
<li><a
href="d6d5cdae5b"><code>d6d5cda</code></a>
chore(deps): update dependency <code>@​types/node</code> to v20.10.4 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5150">#5150</a>)</li>
<li><a
href="43cf0dc532"><code>43cf0dc</code></a>
fix(testing): make Puppeteer an optional dependency (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5145">#5145</a>)</li>
<li><a
href="3c5787579c"><code>3c57875</code></a>
chore(esbuild): build mock-doc with esbuild (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5012">#5012</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ionic-team/stencil/compare/v4.8.1...v4.8.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@stencil/core&package-manager=npm_and_yarn&previous-version=4.8.1&new-version=4.8.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 15:41:57 +00:00
6f9ee6024b chore: add resolves to PR template (#28693)
I've noticed a few instances where the team forgets to add the
"resolves" keyword (or similar "closes"/"fixes" keywords) when linking a
PR to an issue. GitHub will not link the PR with the issue and will not
close the issue on PR merge unless one of these keywords is used.

I've updated the PR template to add the "resolves" keyword so team
members don't need to worry about remembering to add it.
2023-12-12 15:14:21 +00:00
dc51b33db5 chore: remove safari 11 code (#28690)
Older versions of WebKit used an old `constant()` syntax for safe area
variables: https://caniuse.com/?search=env

As of Safari 11.3, `env()` is supported instead. We haven't supported
Safari 11 in years, so I think this is safe to remove.
2023-12-11 21:15:16 +00:00
a17b963182 fix(react): replacing route uses new route direction and animation (#28671)
Issue number: resolves #24260

---------

<!-- 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?

When replacing a route (`router.push(newRoute, 'none', 'replace')`) the
`RouterDirection` from the route being replaced is being used (if it
exists) instead of the new one the user specifies.

## What is the new behavior?

User-specified `RouteDirection` is used, if it exists. If it doesn't it
falls back to the `RouteDirection` of the route being replaced.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

Please see the following comment for why I think the current behavior is
incorrect, and why this change is needed:
https://github.com/ionic-team/ionic-framework/issues/24260#issuecomment-1078960780

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-12-11 21:09:41 +00:00
8f7d87c680 fix(input, textarea): clearOnInput ignores key modifiers (#28639)
Issue number: resolves #28633

---------

<!-- 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. -->

In https://github.com/ionic-team/ionic-framework/pull/28005 I introduced
a fix that causes "clearOnEdit" to not clear input/textarea when the Tab
key was pressed. However, there were several edge cases I missed. For
instance, pressing the "shift" key and then the "tab" key would still
clear the input because "shift" was not explicitly excluded.

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

- Input and textarea now explicitly ignores modifier keys that do not
change the value of the input
- `didInputClearOnEdit` is not set to `true` when an ignored key is
pressed. Otherwise, pressing an ignored key and then an accepted key
would not cause the input to be cleared. For example, pressing "shift",
releasing "shift", then pressing "A" should cause the input to still get
cleared.
- Added test coverage

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

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

Playwright bug report for
a9f34a54f1:
https://github.com/microsoft/playwright/issues/28495
2023-12-11 20:35:25 +00:00
fc88613fef fix(react): use custom animation when going back after a replace (#28674)
Issue number: resolves #28673

---------

<!-- 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. -->

When reviewing https://github.com/ionic-team/ionic-framework/pull/28671
I noticed a bug where the custom animation was not used when going back
after a replace.

`handleNavigate` will override whatever is in `incomingRouteParams`.
Since we were passing `routeAnimation` (which is `undefined`), it was
overriding the animation we set in `handleNavigateBack`.

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

- `routeAnimation` is no longer overridden

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## 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.6.1-dev.11702048520.13c82dad`
2023-12-11 17:31:27 +00:00
e886e3ff2f fix(datetime): prefer wheel sets working value on confirmation (#28520)
Issue number: resolves #25839

---------

<!-- 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. -->

Confirming the working day when a datetime using a wheel picker without
an initial value will result in a value of `undefined` instead of the
displayed working day the user sees.

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

- `preferWheel` uses the working value on confirmation

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## 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.5.7-dev.11701896424.13d40ac9`

Co-authored-by: liamdebeasi <liamdebeasi@users.noreply.github.com>
2023-12-08 19:34:49 +00:00
37290df7ef test(radio): skip flaky radio tabbing test (#28668)
Skips the keyboard navigation test in the radio a11y due to it being
flaky:
https://github.com/ionic-team/ionic-framework/actions/runs/7131071726
2023-12-07 18:18:26 +00:00
c680ad9988 chore(deps-dev): Bump @axe-core/playwright from 4.8.1 to 4.8.2 in /core (#28658)
Bumps [@axe-core/playwright](https://github.com/dequelabs/axe-core-npm)
from 4.8.1 to 4.8.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/dequelabs/axe-core-npm/blob/develop/CHANGELOG.md"><code>@​axe-core/playwright</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>Change Log</h1>
<p>All notable changes to this project will be documented in this file.
See <a href="https://conventionalcommits.org">Conventional Commits</a>
for commit guidelines.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/dequelabs/axe-core-npm/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@axe-core/playwright&package-manager=npm_and_yarn&previous-version=4.8.1&new-version=4.8.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 15:23:37 +00:00
ffa3073211 chore: note item behavior in 7.6 notes (#28664)
We got some feedback in
https://github.com/ionic-team/ionic-framework/pull/28146#issuecomment-1845005089
that it would be helpful to note the new item wrapping behavior in v7.6.
I've updated the Github release, and this PR updates the Changelog file.
2023-12-07 14:49:57 +00:00
ec9228f54f merge release-7.6.0
Release 7.6.0
2023-12-06 10:45:17 -05:00
f3799f332b chore(): update package lock files 2023-12-06 15:33:57 +00:00
90ce7f00fa v7.6.0 v7.6.0 2023-12-06 15:33:45 +00:00
77e2147733 chore: sync with main
chore: sync with main
2023-12-06 10:26:44 -05:00
ede9c6e3c8 Merge remote-tracking branch 'origin/main' into sync-76-final 2023-12-06 10:16:26 -05:00
e20acb98ac merge release-7.5.8
Release 7.5.8
2023-12-06 10:15:48 -05:00
5573fde6a2 chore(): update package lock files 2023-12-06 15:04:35 +00:00
507d5ee1da v7.5.8 v7.5.8 2023-12-06 15:04:23 +00:00
e71e7a0690 fix(select): do not collapse to width: 0 when placed in flex container (#28631)
Issue number: Internal

---------

<!-- 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. -->

We currently apply a workaround to `ion-select` so it can wrap correctly
inside of `ion-item`:
357b8b2beb/core/src/components/select/select.scss (L99-L103)

However, this causes issues when a parent element has `display: flex`
because the `ion-select` width becomes 0.

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

- In order to get the desired behavior, we need the `ion-select` (and
other elements in the default slot) to either truncate or wrap within
its own container and then have the entire container (i.e. the entire
`ion-select`) wrap to the next line once the container is too small.

To achieve this, I needed to set a min-width on `.item-inner` to define
the point at which the element should wrap to the next line. I also
changed the flex basis from `auto` to `0` which means the initial main
size of the flex item will be 0px. In reality, this will be
`--inner-min-width` since we also set `min-width:
var(--inner-min-width)`. I used `0` for simplicity but I can change this
to use the CSS variable if that's more clear. Since we also set
`flex-grow: 1` we indicate that the element can grow from that basis
(but it cannot shrink).

I chose `--inner-min-width: 4rem` to minimize the number of diffs. We
can certainly change this, but it may cause some diffs as certain
elements will start wrapping sooner. I also chose to use `rem` because
having a fixed min-width means that fewer characters are going to fit in
the same space as text scales.

I made this a CSS variable but left it undocumented. If developers need
a way of changing this `min-width` they can request it and we can easily
expose this variable. However, I think `4rem` is small enough that this
should be sufficient.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

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

The visual diffs here are correct. The table below shows the screenshot
group and an explanation for why the changes are correct.


| Path | Example | Details |
| - | - | - |
| `disabled` |
[Link](https://github.com/ionic-team/ionic-framework/pull/28631/files#diff-d529716f95f7a7aa82c88588104220775b728af67077f48cd47a8afa04423143)
| The searchbar is able to shrink slightly to fit on the same line as
the checkbox at the bottom. |
| `highlight` |
[Link](https://github.com/ionic-team/ionic-framework/pull/28631/files#diff-0b64f24c91393923701d1ced4e330a1c6b926d72ee461b8ab1e135e708be3457)
| We're changing how small the main content can get, so the input is
only wrapping once it gets to `--inner-min-width`. |
| `legacy/fill` |
[Link](https://github.com/ionic-team/ionic-framework/pull/28631/files#diff-2ef8dbfa5e69e2b96c3e1ed29ab962f08cf5ba2aaf2af773e40bd143e38a4bef)
| We're changing how small the main content can get, so the input is
only wrapping once it gets to `--inner-min-width`. |
| `slotted-inputs` |
[Link](https://github.com/ionic-team/ionic-framework/pull/28631/files#diff-2f173c7303969d6a6c58f30a618cebc3caf918d3761fc83df5642fd48dfabd7b)
| We're changing how small the main content can get, so the range is
only wrapping once it gets to `--inner-min-width`. |

`slotted-inputs` note: I'd argue many of these examples are not best
practices. For example, adding a range in the start slot and the end
slot is a bit unusual. I'm not aware of any native apps that implement
this pattern.

popover note: I [removed the `ion-item` from the `popover/test/async`
test](331fcb859c).
There was a diff because the min-width increased, but IMO that component
should not be used in the popover test since we want to test the
popover, not the item.

--------

Demo:

| `feature-7.6` | `branch` |
| - | - |
| <video
src="https://github.com/ionic-team/ionic-framework/assets/2721089/693d4947-fa33-460d-bc7f-7b96b6338032"></video>
| <video
src="https://github.com/ionic-team/ionic-framework/assets/2721089/df35ca73-87aa-4e76-9bb7-99f0f2810640"></video>
|

(In this demo I updated the `ion-select` to wrap within its own
container first instead of truncate. We may want to consider doing this
by default, but I think this is out of scope for this task)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
2023-12-05 18:33:02 -05:00
7871b56ecc fix(angular): add missing menu controller methods (#28618)
Issue number: resolves #20053 

---------

<!-- 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. -->

There are a few methods that that are missing for the menu in the
Angular packages. This leads to users to not being able to use methods
like `isAnimating()`.

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

- The missing methods have been added by implementing `MenuControllerI`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## 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.5.8-dev.11701461830.1be851fd
2023-12-05 18:43:12 +00:00
8c235fd30c fix(infinite-scroll): remaining in threshold after ionInfinite can trigger event again on scroll (#28569)
Issue number: resolves #18071

---------

<!-- 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. -->

When adding elements to the DOM in the `ionInfinite` callback, scrolling
again would sometimes not cause `ionInfinite` to trigger again. We [set
the didFire flag to
`true`](388d19e04f/core/src/components/infinite-scroll/infinite-scroll.tsx (L126))
before calling `ionInfinite`. This flag ensures that `ionInfinite` is
not called multiple times if users continue to scroll after
`ionInfinite` is fired but before the `complete` method is called.

The [didFire flag is
reset](388d19e04f/core/src/components/infinite-scroll/infinite-scroll.tsx (L131))
once the user scrolls outside of the threshold. Normally this is fine:
If an application adds several new items to a list the current scroll
position will be outside of the threshold. However, if the scroll
position remains in the threshold (such as if an application append a
small number of new items to a list) then the `didFire` flag will not
get reset.

Additionally, there are some instances where the scroll position
restoration when `position="top"` may not work which can cause this bug
to trigger as well. For example, if users quickly scroll to the top, the
scroll position will not be restored correctly and the scroll position
will still be at the top of the screen. That is another instance where
this bug can trigger even if a large number of items were added to the
DOM.

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

- The `didFire` flag is reset when the `complete` method is called. This
ensures that even if the scroll position is still in the threshold
`ionInfinite` can fire again.


Note that developers may notice `ionInfinite` firing more times as a
result of this change. This can happen when appending a small number of
items to the DOM such that the scroll position remains in the threshold.
Previously `ionInfinite` would not fire again, but now it does since
users are scrolling in the threshold. I decided to target this change
for a minor release to minimize any surprises for developers.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## 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.5.4-dev.11700602203.1e7155a1`

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2023-12-05 12:20:49 -05:00
c1465bd1b0 chore: sync feature-7.6 with main
chore: sync feature-8.0 with main
2023-12-05 09:36:22 -05:00
65106ce21a chore: sync feature-7.6 with main
chore: sync feature-7.6 with main
2023-12-05 09:36:11 -05:00
8dc3d1a16d Merge remote-tracking branch 'origin/main' into sync-80-125 2023-12-05 09:12:24 -05:00
e51deed21c Merge remote-tracking branch 'origin/main' into sync-76-125 2023-12-05 09:11:57 -05:00
e2cbc9c15f chore(deps): Bump @stencil/core from 4.8.0 to 4.8.1 in /core (#28632)
Bumps [@stencil/core](https://github.com/ionic-team/stencil) from 4.8.0
to 4.8.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ionic-team/stencil/releases"><code>@​stencil/core</code>'s
releases</a>.</em></p>
<blockquote>
<h2>🍹 v4.8.1 (2023-12-04)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>runtime:</strong> apply nonce to data styles before DOM
insert (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5112">#5112</a>)
(<a
href="df46fdc0cb">df46fdc</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/5102">#5102</a></li>
<li><strong>runtime:</strong> call form-associated lifecycle callbacks
w/ <code>this</code> (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5104">#5104</a>)
(<a
href="1ac8aa3da1">1ac8aa3</a>)</li>
<li><strong>testing:</strong> re-add Puppeteer <code>asElement()</code>
calls (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5114">#5114</a>)
(<a
href="0c843f8d19">0c843f8</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/5113">#5113</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ionic-team/stencil/blob/main/CHANGELOG.md"><code>@​stencil/core</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>🍹 <a
href="https://github.com/ionic-team/stencil/compare/v4.8.0...v4.8.1">4.8.1</a>
(2023-12-04)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>runtime:</strong> apply nonce to data styles before DOM
insert (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5112">#5112</a>)
(<a
href="df46fdc0cb">df46fdc</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/5102">#5102</a></li>
<li><strong>runtime:</strong> call form-associated lifecycle callbacks
w/ <code>this</code> (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5104">#5104</a>)
(<a
href="1ac8aa3da1">1ac8aa3</a>)</li>
<li><strong>testing:</strong> re-add Puppeteer <code>asElement()</code>
calls (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5114">#5114</a>)
(<a
href="0c843f8d19">0c843f8</a>),
closes <a
href="https://redirect.github.com/ionic-team/stencil/issues/5113">#5113</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="28f794ea0d"><code>28f794e</code></a>
Release v4.8.1 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5130">#5130</a>)</li>
<li><a
href="2fd398a6cf"><code>2fd398a</code></a>
chore(deps): update dependency <code>@​rollup/pluginutils</code> to
v5.1.0 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5126">#5126</a>)</li>
<li><a
href="84feb5aee2"><code>84feb5a</code></a>
chore(deps): update typescript-eslint to v6.13.1 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5128">#5128</a>)</li>
<li><a
href="cf4a70150c"><code>cf4a701</code></a>
fix(compiler): revert changes to style import transformer (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5125">#5125</a>)</li>
<li><a
href="df32ceb4ae"><code>df32ceb</code></a>
chore(deps): update dependency fs-extra to v11.2.0 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5127">#5127</a>)</li>
<li><a
href="4cdb725fb7"><code>4cdb725</code></a>
chore(deps): update dependency dts-bundle-generator to v9 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5129">#5129</a>)</li>
<li><a
href="3ef8fa070a"><code>3ef8fa0</code></a>
chore(deps): update dependency <code>@​types/eslint</code> to v8.44.8
(<a
href="https://redirect.github.com/ionic-team/stencil/issues/5122">#5122</a>)</li>
<li><a
href="1342eec577"><code>1342eec</code></a>
chore(deps): update dependency <code>@​types/node</code> to v20.10.1 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5123">#5123</a>)</li>
<li><a
href="7591dce85e"><code>7591dce</code></a>
fix(compiler): ensure not to import duplicate style identifier (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5119">#5119</a>)</li>
<li><a
href="7302e3f81a"><code>7302e3f</code></a>
chore(deps): update node.js to v20.10.0 (<a
href="https://redirect.github.com/ionic-team/stencil/issues/5117">#5117</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/ionic-team/stencil/compare/v4.8.0...v4.8.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@stencil/core&package-manager=npm_and_yarn&previous-version=4.8.0&new-version=4.8.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 00:58:11 +00:00
4847488090 chore(ci): update labeler workflow for labeler@v5 (#28627)
Issue number: N/A

---------

<!-- 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. -->

The labeler action is currently failing:
https://github.com/ionic-team/ionic-framework/actions/runs/7090913880/job/19298918578?pr=28622.
This is happening due to a breaking change in v5 of the action.

We currently pull from `main` for this action so we are now receiving v5
of the action:
fe3c3d500a/.github/workflows/label.yml (L16)

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

- This PR updates the action explicitly to v5 so we don't unexpectedly
take on breaking changes
- This PR also updates the labeler yaml file to account for the v5
breaking changes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-12-04 21:31:12 +00:00
fe3c3d500a docs(input, searchbar, textarea): improve docs for managing focus (#28614)
Issue number: Related to #18132 

---------

<!-- 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. -->
The documentation about the `autofocus` prop is unclear and does not
accurately reflect how it actually works across browsers and devices.

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

- The documentation for `autofocus` and `setFocus` are more detailed.
- The documentation links to the relevant page in the docs.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-12-04 13:24:34 +00:00
1705d064cc fix(react): router creates new view instances of parameterized routes (#28616)
Issue number: Resolves #26524 

---------

<!-- 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. -->

## Definitions

**Parameterized routes**: A route that includes one or more variables in
the path segments, such as `/form/:index`.

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

When an application routes from a parameterized route, to an
intermediary route, to the same parameterized route, but with a
different value/url, Ionic's routing logic is incorrectly reusing the
view item from the first instance of the parameterized route instead of
calculating that the matched path is different. This results in the
wrong view item being recycled and rendered.

Another way of representing it:
- User navigates to `/form/0` which resolves `FormPage`
- User enters `0` into the form and submits the form
- User navigates to `/link`, which resolves `LinkPage`
- User navigates to `/form/1`, which resolves `FormPage`
- However, instead of creating a new instance of `FormPage` it is
reusing the instance of `FormPage` from `/form/0` which includes the
form having `0` in the input.
  - The user now sees a "new view", but with cached data in the form.

This is not expected or desired. 


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

- Ionic's routing logic will validate if the entering view item matches
the match route data before reusing it. This results in new instances of
the view item being constructed when using parameterized routes.


https://github.com/ionic-team/ionic-framework/assets/13732623/e7e3d03f-2848-4429-9f60-9074d0761e45


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## 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.5.8-dev.11701383555.17254408`
2023-12-01 22:11:41 +00:00
357b8b2beb feat(input, textarea, select): add start and end slots (#28583)
Issue number: Resolves #26297

---------

<!-- 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. -->

With the modern form control syntax, it is not possible to add icon
buttons or other decorators to the sides of `ion-input`, `ion-textarea`,
or `ion-select`, as you can with `ion-item`.

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

`start` and `end` slots added to each component.

This PR is a combination of several others that were already approved.
If needed, it might be easiest to review the PRs individually by looking
at the commit history here.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

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

Docs PR: https://github.com/ionic-team/ionic-docs/pull/3271

Dev build: `7.5.4-dev.11701112913.1ea61220`

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-12-01 14:54:10 -06:00
b757970d23 feat(radio): add shadow part for label (#28607)
Issue number: Part of #28300 

---------

<!-- 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. -->
Developers are unable to adjust margin, width, etc. of the radio label

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

- Radio label has a shadow part.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
As part of this work, I investigated moving `pointer-events: none` up
the DOM tree so developers wouldn't be able to override it with the
shadow part. In my testing, I was unable to see any difference in
behavior with vs without `pointer-events: none`. Therefore, I removed it
entirely.
2023-12-01 11:38:29 -05:00
f9f5654ab0 feat(checkbox): add shadow part for label (#28604)
Issue number: Part of #28300 

---------

<!-- 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. -->
Developers are unable to adjust margin, width, etc. of the checkbox
label

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

- Checkbox label has a shadow part.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
As part of this work, I investigated moving `pointer-events: none` up
the DOM tree so developers wouldn't be able to override it with the
shadow part. In my testing, I was unable to see any difference in
behavior with vs without `pointer-events: none`. Therefore, I removed it
entirely.
2023-12-01 11:26:05 -05:00
60303aad23 fix(vue): nav component accepts kebab-case component properties (#28615)
Issue number: resolves #28611

---------

<!-- 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. -->
It's not possible to pass props that are not camelCase to the `IonNav`
component.

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

- It is now possible to set a props with kebab-case instead of camelCase
(for example, `root-params` instead of `rootParams`)

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
⚠️ This is my first PR for ionic so I hope I didn't miss important steps
into the process. I also checked on my project that the fix is working
well. Thank you! 🙂

---------

Co-authored-by: Sean Perkins <sean@ionic.io>
2023-12-01 15:30:13 +00:00
a34188f7db feat(toggle): expose label wrapper as shadow part (#28585) 2023-11-30 14:03:51 -05:00