34 Commits

Author SHA1 Message Date
bf34e0e247 test: migrate form control usages to modern syntax (#28897)
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. -->

Several tests were still using the legacy form syntax.

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

- Migrated tests in `core`, `angular`, and `vue` to use the modern form
syntax (`react` did not have form controls).

I opted not to migrate `item/test/highlight` and `item/test/counter`
because those tests are going to be removed in the future once the
deprecate item APIs are removed.

## 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: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-01-30 16:14:02 +00:00
5bc439961f fix(vue): tabs and parameterized routes work with latest vue (#28846)
Issue number: resolves #28774

---------

<!-- 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 two issues causing Ionic Vue apps to not behave as intended
with certain versions of Vue:

1. In Vue 3.3 a [breaking change
shipped](https://github.com/vuejs/core/issues/9916) that changes the
default behavior of the `watch` inside of IonRouterOutlet to be a
shallow watcher instead of a deep watcher. This caused the router outlet
to not consistent re-render. While the change was later reverted by the
Vue team, they expressed that the change [may re-land in a future minor
release](https://github.com/vuejs/core/issues/9965#issuecomment-1875067499).
As a result, we will need to account for this inside of Ionic.
2. In Vue 3.2 a [custom elements improvement
shipped](https://github.com/vuejs/core/blob/main/changelogs/CHANGELOG-3.2.md#3238-2022-08-30)
that changed how custom elements are referred to in VNodes.

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

- The affected `watch` call now is now explicitly a deep watcher. This
change is backwards compatible as well as forward compatible with
upcoming Vue changes.
- Updated IonTabs to account for the new VNode behavior for custom
elements. Ionic still supports version of Vue that do not have this
improvement, so we need to account for both behaviors for now. I also
added a tech debt ticket to remove the old checks when we drop support
for older versions of Vue.
- Updated E2E test dependencies. During this update some of our tests
needed to be updated to account for newer versions of Vue/Vitest.
Overall I was able to simplify a lot of our tests as a result.

I plan to add renovatebot to these E2E test apps, but I will handle that
in a separate 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.
  4. Update the BREAKING.md file with the breaking change.
5. 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.6-dev.11705526292.1bc0acb5`

Note: Both of the issues cause tests to fail when using the latest
dependencies in the Vue E2E test app. However, I need to use the latest
dependencies so I can demonstrate that my changes do fix the reported
issues. As a result, I have both fixes in the same PR.
2024-01-19 21:29:56 +00:00
e51deed21c Merge remote-tracking branch 'origin/main' into sync-76-125 2023-12-05 09:11:57 -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
0854a11a25 fix(angular,vue): range form value updates while dragging knob (#28422)
Issue number: Resolves #28256

---------

<!-- 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 the form integrations for Angular and Vue, the value of a range does
not update while the knob is actively being dragged, only when the knob
is released.

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

The form integrations now update the range's value when the `ionInput`
event fires, rather than `ionChange`.

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

I wasn't sure how to add reliable automated tests for this behavior. The
difference only applies when actively dragging the knob, and we've had
issues with such gestures being flaky in the past. I did add value
displays to the test apps so the behavior can be manually tested.
2023-10-30 10:18:53 -05:00
9050a9fbf5 fix(vue): respect keepContentsMounted if passed as attribute (#28167)
Issue number: resolves #28165

---------

<!-- 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 overlay implementation in Vue only checks for truthy
`keepContentsMounted` values. When setting this prop as an attribute,
the value of it is `''` which is falsy. As a result, content does not
get mounted.

One of Vue's ESLint rules states that this should be supported:
https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand.html

Part of the issue may also be that Vue does not know the type of this
property and so it assume "any":

> The shorthand form is not always equivalent! If a prop accepts
multiple types, but Boolean is not the first one, a shorthand prop won't
pass true.

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

- The overlay wrapper now checks for `''` values. If
`keepContentsMounted === ''` then the inner contents will be mounted
because this means the prop is being set using the attribute shorthand.

## 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.3.5-dev.11694621267.1e5f63c2`
2023-09-14 18:10:11 +00:00
02678f3652 fix(react, vue): inline modals apply ion-page class (#27481)
Issue number: resolves #27470

---------

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

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:
eb2772c0ce/packages/react/src/components/createInlineOverlayComponent.tsx (L137-L140)

However, I think this should be delegated to `.ion-page` instead so the
behavior is consistent across frameworks. For example, Angular uses
`.ion-page`:
eb2772c0ce/angular/src/directives/overlays/modal.ts (L82)

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

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

Revised Design Doc:
https://github.com/ionic-team/ionic-framework-design-documents/pull/84
2023-05-24 13:37:02 +00:00
ca9b9b65d2 chore: sync script deletes existing tgz packages (#27045)
<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

## Pull request checklist

Please check if your PR fulfills the following requirements:
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug
fixes / features)
- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See the [contributing
guide](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation)
for details.
- [ ] Build (`npm run build`) was run locally and any changes were
pushed
- [ ] Lint (`npm run lint`) has passed locally and any fixes were made
for failures


## Pull request type

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

<!-- Please try to limit your pull request to one type, submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [x] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe): 


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

When testing changes locally, you can have an existing test app that you
sync the package contents to. If you have done this across different
versions of Ionic, it can install the wrong .tgz file instead of the
local changes.

Experienced here:
https://github.com/ionic-team/ionic-framework/pull/27040#pullrequestreview-1362136995

<!-- Issues are required for both bug fixes and features. -->
Issue URL: N/A


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

- Sync script deletes all .tgz files local to the directory before
locally packing and installing the contents of the parent local packages

## 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: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-04-05 20:13:43 +00:00
f8667830dc test(breadcrumbs): check color attribute renders in the DOM (#27080)
Co-authored-by: liamdebeasi <liamdebeasi@users.noreply.github.com>
2023-04-03 11:35:14 -07:00
141ced5010 fix(breadcrumbs): color attribute shows on DOM for Vue (#27068)
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2023-03-30 17:11:22 -04:00
abadeedc9e Revert "bug(breadcrumbs): color attribute shows on DOM for Vue (#27040)" (#27069)
This reverts commit dd419c0066d312f45c741bbe399d9764faf64841.

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2023-03-30 13:50:34 -04:00
dd419c0066 bug(breadcrumbs): color attribute shows on DOM for Vue (#27040)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-03-30 09:57:02 -07:00
92c1da571d chore(): sync with main 2023-03-15 10:03:38 -04:00
1eb9a085b2 fix(react/vue): properly switch ionicon based on the mode when ios/md is set (#26924)
closes #26207
2023-03-14 15:03:28 -04:00
7d9ce7420a fix(vue): input components update refs on ionInput (#26876)
resolves #26700
2023-03-02 09:09:25 -05:00
e71dc912fe chore(): sync with main 2023-02-01 09:37:33 -05:00
7c0089718a fix(vue): cache attached view reference (#26694)
Resolves #26695
2023-01-30 15:58:03 -05:00
fc561e37ef chore(): sync with main 2023-01-27 14:52:52 -05:00
227b2aea00 chore(ci): sync scripts now account for dependencies (#26686) 2023-01-27 14:37:05 -05:00
e8fb9e7328 chore(): sync with main 2023-01-23 13:38:16 -05:00
6b16a0c020 fix(vue): unmount teleported components (#26647)
Resolves #26644
2023-01-20 11:23:27 -05:00
08c0a5520a feat(alert): add ability to use alert inline (#26316) 2022-11-18 13:32:27 -06:00
c149b42d0b Merge remote-tracking branch 'origin/main' into sync-7-11-15-22 2022-11-15 15:40:21 -05:00
0f8b26f767 refactor(ci): do not cache node modules (#26265) 2022-11-14 13:55:46 -05:00
003de44d92 feat(toast): add ability to use toast inline (#26215) 2022-11-07 16:21:35 -06:00
92b763a538 feat(action-sheet): use action sheet overlay inline (#26172) 2022-11-02 16:47:43 -04:00
84990cec88 fix(vue): loading is created as an inline component (#26191) 2022-11-02 13:59:31 -04:00
4cb32b6c6b test(vue): test app now uses vite and vitest (#26045) 2022-09-30 14:22:46 -04:00
6bb9d8a5d7 Merge remote-tracking branch 'origin/main' into 7.0-sync-09-16-22 2022-09-16 15:20:33 -04:00
e06a7d0f73 chore(vue): migrate to cypress 10 (#25950) 2022-09-16 11:16:58 -04:00
1fc0c830db Merge remote-tracking branch 'origin/main' into sync-v7-09-09-2022 2022-09-09 13:05:11 -04:00
2d3661ae38 fix(vue): custom animation plays when replacing (#25863)
resolves #25831
2022-09-06 09:07:33 -04:00
20dd8ad1e4 chore(): sync with main 2022-09-02 14:44:56 -04:00
65af865db7 test(vue): add multi-version testing (#25785) 2022-08-23 16:05:34 -04:00