102 Commits

Author SHA1 Message Date
d52fca084c fix(config): allow LogLevel to work with isolatedModules and update all warns and errors to respect logLevel (#30350)
Issue number: internal

---------

## What is the current behavior?
- `LogLevel` throws error `Error: Cannot access ambient const enums when
'isolatedModules' is enabled`
- Several existing console warns and errors are not calling the function
that respects the `logLevel` config

## What is the new behavior?
- Remove `const` from the `enum` to work with `isolatedModules`
- Update `console.warn`s to `printIonWarning`
- Update `console.error`s to `printIonError`

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

## Other information

Dev build: `8.5.5-dev.11744729748.174bf7e0`

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-04-16 16:23:16 +00:00
4fd05b6416 fix(nav): getLength is part of the public API (#28832)
resolves #28826

BREAKING CHANGE: `getLength` returns `Promise<number>` instead of `<number>`. This method was not previously available in Nav's TypeScript interface, but developers could still access it by casting Nav as `any`. Developers should ensure they `await` their `getLength` call before accessing the returned value.
2024-01-16 11:54:25 -05:00
d0d9e35c37 refactor: remove extra typescript dependency (#28220) 2023-09-26 09:01:53 -04:00
9500769f11 fix(nav): improve reliability of swipe back gesture when quickly swiping back (#27904)
Issue number: resolves #27893

---------

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

This is another instance of
https://github.com/ionic-team/ionic-framework/issues/22895. The
`progressCallback` function is fires asynchronously, so it's possible
for the gesture start and end callbacks to run before the animation is
ever set in `progressCallback`. When this happens, the animation gets
locked up.

I previously fixed this in
https://github.com/ionic-team/ionic-framework/pull/23527 for
`ion-router-outlet`, but I did not fix it for `ion-nav`.

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

- If the gesture has ended by the time `progressCallback` fires, reset
the animation to the beginning so it does not get locked up.

## 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.2.2-dev.11690896715.12338339`
2023-08-02 18:48:34 +00:00
1f06be4a31 fix(nav): root component is mounted with root params (#27676)
Issue number: Resolves #27146

---------

<!-- 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 an `ion-nav` is presented multiple times in an overlay, the user's
`root` component will attempt to be attached twice. This results in the
view being mounted without the `rootParams` being defined, causing an
exception in a user's application.

This behavior occurs due to the `root` watch callback firing twice. The
second time the `ion-nav` is presented in an overlay, the watch callback
will execute _before_ `componentDidLoad` fires. This results in the
watch callback firing twice, once from the underlying change detection
and the second time from [manually calling the
function](https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/nav/nav.tsx#L115)
from `componentDidLoad`.

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

- `ion-nav` includes a new flag to track when `componentDidLoad`
executes. This allows us to prevent the behavior of the `rootChanged`
callback from happening when the component has not loaded.
- `ion-nav` consistently attaches the `rootParams` to the `root`
component.

## 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.0.15-dev.11687924603.10a1e477`.

### How to test

You can install against the reproduction app in the linked issue to
verify the behavior before and after.
- Before, the app will throw an exception when presenting the modal the
second time.
- After, the app will not throw an exception when presenting the modal
the second time. Information that you fill out on the main screen form
will be rendered inside the modal content.
2023-06-28 15:27:25 +00:00
0a0345a84a refactor(many): use utils import (#27160) 2023-04-12 13:25:14 -07:00
1a8bd6d8c6 chore(deps): update to stencil v3 (#26663) 2023-01-31 18:07:22 -05:00
b78b454e08 revert(): revert base components feature (#26692)
The Ionic Framework team would like to re-evaluate our approach to improving customization options when building mobile applications. We are looking at other solutions that a) make customizing an app UI easier and b) are applicable to a broader set of developers.
2023-01-30 11:52:36 -05:00
18f109c7da feat(base-components): add ability to remove ios and md theme (#26669) 2023-01-24 16:18:35 -05:00
ae6aa0cb8e chore(eslint): add strict-boolean-expressions rule (#25768) 2022-08-23 11:50:02 -05:00
db28794f0b fix(nav): pop() will unmount views within a modal (#25638)
Resolves #25637, #21831
2022-07-25 14:13:00 -04:00
afadf1940b docs(nav,route-outlet): use animation builder (#25451) 2022-06-13 10:29:29 -04:00
5676bab316 lint(eslint): migrate to eslint and prettier (#25046) 2022-04-04 11:12:53 -04:00
c40ff12052 chore(nav): code cleanup (#24730) 2022-02-09 13:22:53 -05:00
f9415ef8a6 fix(nav): custom animation is now used correctly (#23779)
resolves #23777
2021-08-18 08:34:34 -04:00
ae47d77710 chore(api): internal updates required for stencil 2 upgrade (#21889)
Stencil 2 is removing deprecated APIs, and these are the remaining ones Ionic has been using.
2020-08-06 10:33:22 -05:00
eb592b8917 fix(nav): insertPages method correctly inserts multiple pages with props (#21725)
fixes #21724
2020-07-22 12:06:29 -04:00
77464ef21a feat(router): add navigation hooks (#21709) 2020-07-17 11:08:16 -04:00
f34d3752e3 feat(all): add support for configuring animations on a per-page basis (#21433) 2020-06-08 15:49:14 -04:00
b3b3312711 feat(modal): add card-style presentation with swipe to close gesture (#19428)
resolves #18660
2019-12-10 16:02:41 -05:00
96a5e600e5 feat(animation): cubic-bezier easing conversion utility (experimental) (#19788)
resolves #19789
2019-10-31 10:16:33 -04:00
df1bc1e627 refactor(gesture): update Gesture API to latest (#19671) 2019-10-17 14:18:39 -04:00
32b97582cb refactor(): remove old animation utility (#19586)
Use Ionic Animations instead
2019-10-11 13:47:52 -04:00
f4818a1f3a refactor(animation): update animation API (#19529) 2019-10-02 19:52:46 +02:00
5a2c441b3c fix(animation): add cubic-bezier conversions for gesture animations (#19134)
* enable linear easing switch on progressEnd

* Add easing to menu

* remove console log

* Add tests

* clean up code

* update comments
2019-08-19 13:18:49 -04:00
fd65765bdf fix(nav): prevent completing transition from being interrupted (#19113)
* do not enable swipe to begin before previous one has ended

* update defaults

* use canStart instead

* pause animations on finish

* remove old pause code
2019-08-16 13:33:39 -04:00
30ca46ab12 feat(animation): add animation utility (#18918)
* Add new keyframes proof of concept

* update esm import

* add base before and after methods, add tests

* add base before and after hooks

* update clean up methods, add tests

* add web animations support, change to arrow functions

* remove console logs

* add from, to, fromTo, and other properties

* add more tests, fix onFinish functionality, being testing with nav transitions

* add progress methods, use force linear

* run linter

* Add playSync

* integrate animations with framework components

* onFinish now supports multiple callbacks

* change const to let

* testing reverse

* add support for both animation utilities

* bug fix

* export createAnimation, a few tweaks

* add base tests

* fix issue with onFinish being called out of order. added tests

* fix race conditions in tests

* clean up

* fix bug where onFinish not calling for empty elements array,  update test

* clean up

* fix treeshaking, remove old comments

* remove old tests

* Add test for animationbuilder backwards compat

* update typings for menu controller

* mock web animations in tests

* run build

* fix type errors

* sync with master

* use requestAnimationFrame instead of writeTask

* fix flaky tests, fix menu

* fix ordering

* update webdriver

* fix wrong version

* Revert "fix wrong version"

This reverts commit be91296e9701399f8d784b08d09a3c475ca15df7.

Revert chromedriver update

* Revert "update webdriver"

This reverts commit e49bc9d76e335a0af5828725065399bd6795fa37.

Revert chromedriver update

* expose raw animation object, add tests

* add stylesheet recycling

* finalize before and after hook tests

* a few styling changes

* fix lint warnings

* get rid of old code

* Fix progressStep overflow bug

* disable reuse stylesheet

* small updates

* fix old animation create

* setStyleProperty helper

* reuse keyframe styles

* keyframes

* fix css animation issue with display: none, add tests

* add comment

* fix issue with progress animations and css animations

* clean up

* clean up pt2

* fix tests

* fix linter

* add fill for overlays

* fix swipe to go back

* clean up css animations when done

* fix edge cases with css animations

* fix menu open and close

* add reset function

* clean up reset fn

* Fix issue where animation always being reset

* allow updating animations on the fly

* add clear onfinish method

* fix linter

* add callback options, expand force direction

* ensure opts is defined

* fix css animations open and close for menus

* remove test

* add extra check

* clean up

* fix css anim bug swipe to go back

* fix pause

* setup alt animation to avoid flickering

* clean up

* reset flags on destroy

* add ability to change duration on progressEnd

* fix flicker on duration change for css animations

* fix ios transition

* remove unneeded recursion

* increase durability of updating css animations on the fly

* fix gesture anim

* fix web anim as well. more work for cleanup

* simplify progressEnd for css animations

* fix swipe to go back race condition

* clean up

* Add todo

* fix one more bug
2019-08-12 10:05:04 -04:00
34dfc3ce98 refactor(all): updating to newest stencil apis (#18578)
* chore(): update ionicons

* refactor(all): updating to newest stencil apis

* fix lint issues

* more changes

* moreee

* fix treeshaking

* fix config

* fix checkbox

* fix stuff

* chore(): update ionicons

* fix linting errors
2019-06-23 11:26:42 +02:00
b40f7d36d5 fix(): update to Stencil One 🎉🎊 2019-06-19 21:33:50 +02:00
464ec3b70a docs(components): update method and parameter descriptions (#18075) 2019-04-23 12:59:25 -04:00
b31b9f45de docs(breaking): add breaking changes and copy editing (#17214)
- adds col auto to grid
- updates overlays to point to the same usage
- copy editing
- adds more info on the tabs changes
- documents event changes closes ionic-team/ionic-docs#258
- update nav event documentation

references #16819
2019-01-23 15:25:11 -05:00
59bd823d05 fix(gesture): destroy gesture handler when it's done (#17184)
fixes #16433
fixes #16974
2019-01-21 02:01:44 +01:00
d3b866b290 refactor(all): remove ionChange in non-inputs (#17101)
fixes #17071
2019-01-14 21:43:24 +01:00
8b140306ef refactor(animation): remove ion-animation-controller (#16842) 2018-12-21 13:17:42 +01:00
119e0c1fd2 refactor(all): avoid using export const enum (#16614)
* refactor(all): avoid using export const enum

fixes #16497

* add tslint
2018-12-06 21:19:49 +01:00
108691dc44 fix(angular): add swipe-to-go-back gesture 2018-11-14 13:22:31 +01:00
ecc2c55370 docs(all): possible values are extracted by stencil (#16190)
* docs(all): possible values are extracted by stencil

* add defaults

* remove all hardcoded defaults

* update stencil
2018-11-02 00:06:40 +01:00
a72fced6fe fix(all): docs for all missing props 2018-10-11 16:24:08 -05:00
9d109d68c8 fix(all): disable animations in e2e tests 2018-10-08 10:18:31 -05:00
24f33730a0 feat(nav): animation is customizable
fixes #15851
2018-10-04 18:06:19 +02:00
7d50305b7f docs(all): fix "aditional" typo (#15672)
* docs(nav): fix typo

* docs: fix more `aditional` typings
2018-09-24 11:45:04 -05:00
6e5c035b39 chore(tslint): disable 'no-floating-promises' 2018-09-14 00:50:44 +02:00
4876df928d chore(): tslint checks 2018-09-06 21:49:35 +02:00
ba2230510e refactor(all): strict boolean conditions 2018-09-01 17:23:03 +02:00
1d46973785 refactor(all): make all method return a promise 2018-08-28 22:20:10 +02:00
57d23753a6 feat(all): strong typed ComponentProps 2018-08-27 00:47:10 +02:00
8b768fb73d fix(overlay): expose "animated" API
fixes #14775
2018-08-26 19:06:50 +02:00
7917ba96ef refactor(all): consistent gesture events 2018-08-26 01:26:36 +02:00
3ffa3cd7db fix(platform): better detect platforms + css API
fixes #15165
fixes #15116
2018-08-25 16:53:31 +02:00
5b6eb2c7eb refactor(nav, menu): swipeEnabled => swipeGesture 2018-08-13 18:32:24 +02:00