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

Fix bug with collection item scope #2741

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Fix bug with collection item scope #2741

merged 2 commits into from
Jan 21, 2025

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Jan 21, 2025

We didn't properly pop this stack of iteration states. This led to items being grouped incorrectly.

Checklist

  • I have added tests
  • [/] I have updated the docs and cheatsheet
  • [/] I have not broken the cheatsheet

@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner January 21, 2025 12:10
let currentIterationState: IterationState | undefined;

// Find current iteration state and pop all states not containing the separator
while (iterationStatesStack.length > 0) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the logic that was missing before

@@ -0,0 +1,180 @@
{
language: {},
choices: {
Copy link
Member

Choose a reason for hiding this comment

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

User behavior was with the cursor after the {, "take item" selected both language and choices instead of just choices.

@phillco phillco added this pull request to the merge queue Jan 21, 2025
Merged via the queue into main with commit 8874c87 Jan 21, 2025
15 checks passed
@phillco phillco deleted the itemFix branch January 21, 2025 18:30
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.

2 participants