Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(accordion): ionChange will only emit from user committed changes #25922

Merged
merged 11 commits into from
Sep 13, 2022

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Sep 12, 2022

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 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 check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: N/A Internal ticket

What is the new behavior?

  • ionChange will now fire as a result of user-generated actions only.
  • The one exception is when an app passes an array of values to a single-select accordion. When that happens, we set the value to be the first item in the array and re-emit ionChange.

Does this introduce a breaking change?

  • Yes
  • No

ionChange will no longer be emitted when the value of ion-accordion-group is modified externally. ionChange will only be emitted from user committed changes, such as clicking or tapping the accordion header.

Other information

@github-actions github-actions bot added the package: core @ionic/core package label Sep 12, 2022
@github-actions github-actions bot added package: angular @ionic/angular package package: vue @ionic/vue package labels Sep 12, 2022
@@ -31,7 +31,10 @@ export class IonAccordion {
import type { AccordionGroupChangeEventDetail as IAccordionGroupAccordionGroupChangeEventDetail } from '@ionic/core';
export declare interface IonAccordionGroup extends Components.IonAccordionGroup {
/**
* Emitted when the value property has changed.
* Emitted when the value property has changed
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was auto-generated. The formatting looks weird, but should be fine?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this should be fine. Intellisense still formats the text correctly. Just a quirk of the output target generator (we would have to split on line breaks and generate per line - which is possible, but the raw output works as is for now).

@liamdebeasi liamdebeasi marked this pull request as ready for review September 12, 2022 17:49
@liamdebeasi liamdebeasi requested a review from a team as a code owner September 12, 2022 17:49
Copy link
Contributor

@sean-perkins sean-perkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work here 👍

@@ -31,7 +31,10 @@ export class IonAccordion {
import type { AccordionGroupChangeEventDetail as IAccordionGroupAccordionGroupChangeEventDetail } from '@ionic/core';
export declare interface IonAccordionGroup extends Components.IonAccordionGroup {
/**
* Emitted when the value property has changed.
* Emitted when the value property has changed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this should be fine. Intellisense still formats the text correctly. Just a quirk of the output target generator (we would have to split on line breaks and generate per line - which is possible, but the raw output works as is for now).

@sean-perkins sean-perkins requested a review from a team September 12, 2022 21:15
@amandaejohnston
Copy link
Contributor

Holding on review until tests are passing; seeing a bunch of random failures 🤔 Not sure what's going on there.

@liamdebeasi
Copy link
Contributor Author

Good to review now. There were some issues with installing dependencies for Playwright. Possibly related to https://www.githubstatus.com/incidents/8blgv351d71j.

@liamdebeasi liamdebeasi merged commit 4eea9fa into feature-7.0 Sep 13, 2022
@liamdebeasi liamdebeasi deleted the FW-2029 branch September 13, 2022 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants