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

Update the ArrayObserver to better account for sort and reverse #7062

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

janechu
Copy link
Collaborator

@janechu janechu commented Jan 14, 2025

Pull Request

📖 Description

This change updates the ArrayObserver to use some array tracking when applying sort or reverse. This will retain state to overcome the problem seen in #6919. No updates are required by developers.

🎫 Issues

Closes #6919

✅ Checklist

General

  • I have included a change request file using $ npm run change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@janechu janechu requested a review from chrisdholt as a code owner January 14, 2025 22:51
@janechu janechu self-assigned this Jan 22, 2025
Copy link
Contributor

@marchbox marchbox left a comment

Choose a reason for hiding this comment

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

This generally LGTM. My only comment is there are several (array as any), I wonder if it makes sense to type it since it's also different from the argument type array: any[].

@janechu
Copy link
Collaborator Author

janechu commented Jan 24, 2025

This generally LGTM. My only comment is there are several (array as any), I wonder if it makes sense to type it since it's also different from the argument type array: any[].

We are typing it as any in other areas of this file because we are attaching things to the array outside of the normal Array typing, I agree it isn't great... let's extend the typed interface as a separate issue.

Copy link
Member

@chrisdholt chrisdholt left a comment

Choose a reason for hiding this comment

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

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: make repeat directive optionally accept a key
4 participants