-
Notifications
You must be signed in to change notification settings - Fork 26
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
Bug - Loop Item tag not always visible in Loop Item block #1608
Conversation
This seems to break the blocks inside of the Looper. broken-query.mp4I'm also not 100% sure why the changes in the PR would fix the mentioned issue? Any context there? |
This issue prevents the Loop Item tag from being hidden because the loop doesn't see anything. I had previously set up some fallback context, but the hasResolvedData check when rendering caused it to not get used. So by doing this, loopItemsContext always wraps the output, no matter if the query is empty or not. This ensures there's always a loopItem, loopIndex, and previewId for loop items, even if the query is empty. I made a tweak just now to make sure the currentPostId was being used here, just in case. With this change, I'm seeing everything work as expected. Can you have another look and confirm? |
I'm still having issues selecting blocks with this PR. To replicate:
|
@tomusborne I made a small tweak and it looks like we're in business. It appears there was a dep missing and I moved this other variable out of the memo for better stability. In my testing I'm no longer seeing this issue as you mentioned after this change. |
I'm still seeing weirdness here. loop-weirdness.mp4At this point I'm thinking maybe we should just always show the Loop Item/Index options and ditch the conditional visibility until another date. |
Closes https://github.com/tomusborne/generateblocks-pro/issues/785