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) Broken bookmarks button #3859

Merged
merged 1 commit into from
May 26, 2024

Conversation

Roardom
Copy link
Collaborator

@Roardom Roardom commented May 24, 2024

This must have been broken for a long time. This also fixes the issue when ticking checkboxes too quickly the state being reset. It required both making sure small-bookmark-button.blade.php was surrounded by an element completely, as well as adding wire:key to the inner row loop. Adding wire:key to the component itself doesn't work because the attributes aren't passed through...

@Roardom
Copy link
Collaborator Author

Roardom commented May 24, 2024

Nevermind, the bug is triggered by selecting a couple of filters, and then bookmarks look like this...

image

This doesn't look like an easy fix...

This must have been broken for a long time. This also fixes the issue when ticking checkboxes too quickly the state being reset. It required both making sure `small-bookmark-button.blade.php` was surrounded by an element completely, as well as adding wire:key to the inner row loop. Adding wire:key to the component itself doesn't work because the attributes aren't passed through...
@Roardom
Copy link
Collaborator Author

Roardom commented May 24, 2024

Figured it out.

@Roardom Roardom changed the title (Update) re-enable bookmarks icon on torrent search (Fix) Broken bookmarks button May 24, 2024
@LostRager
Copy link
Contributor

Does this mess with selecting torrents to be deleted in the similar view?

@Roardom
Copy link
Collaborator Author

Roardom commented May 25, 2024

Does this mess with selecting torrents to be deleted in the similar view?

I selected a few torrents in similar view rapidly and got no errors in the console. Is there something specific you want me to check for?

@LostRager
Copy link
Contributor

Does this mess with selecting torrents to be deleted in the similar view?

I selected a few torrents in similar view rapidly and got no errors in the console. Is there something specific you want me to check for?

It broke for me, but i have an altered similar page so its probably just my fault then.
When i selected a torrent, all torrents disappeared and got the error: Uncaught Snapshot missing on Livewire component with id: xxxx

No worries then. all good :)

@Roardom
Copy link
Collaborator Author

Roardom commented May 25, 2024

That's exactly the error the bookmark button was causing. Go through every loop in your blade and add a wire:key="unique-string" to the wrapping element inside the loop, as well as adding :key="unique-string" to any livewire component. Also make sure any livewire components are wrapped in a single element. I can't trigger that error on this branch however. You can also view the html in the dev console and it will be completely messed up caused from livewire doing bad diffing. Hopefully that can help you narrow it down.

@HDVinnie HDVinnie merged commit f3eaf44 into HDInnovations:8.x.x May 26, 2024
5 checks passed
@HDVinnie HDVinnie deleted the re-enable-bookmarks branch May 26, 2024 19:10
@LostRager
Copy link
Contributor

LostRager commented May 26, 2024

Seems like there are still issues with this.
image
from blu.

I have the same issue on my install.

Happends when searching for torrents.

@HDVinnie
Copy link
Collaborator

Seems like there are still issues with this. image from blu.

I have the same issue on my install.

Happends when searching for torrents.

BLU small bookmark seems fine for me. It was just updated to latest v8 branch and there hasn't been a new release so fresh install wouldn't have it.

@LostRager
Copy link
Contributor

Seems like there are still issues with this. image from blu.
I have the same issue on my install.
Happends when searching for torrents.

BLU small bookmark seems fine for me. It was just updated to latest v8 branch and there hasn't been a new release so fresh install wouldn't have it.

Sent a dm on discord with a video.

@HDVinnie
Copy link
Collaborator

@Roardom @LostRager is correct. Still broken. Seems to happen when searching by name

@Roardom
Copy link
Collaborator Author

Roardom commented May 27, 2024

😞

I'll try and figure this out

@Roardom
Copy link
Collaborator Author

Roardom commented May 27, 2024

@LostRager After a ridiculously long time spent debugging, I've discovered that removing x-cloak from this line (

<form class="form" x-cloak x-show="isToggledOn">
) removes the component not found error from the console (at least in my local setup).

The only way I was able to trigger that error was by typing ~5-10 characters in the name field, at a frequency slower than the 250ms debounce but fast enough that the previous search hadn't returned results yet.

Do you mind trying that out and see if that works for you? I found triggering the snapshot error much more difficult so I was focusing on fixing the component not found error hoping that fixing one would fix the other.

@LostRager
Copy link
Contributor

LostRager commented May 27, 2024

@LostRager After a ridiculously long time spent debugging, I've discovered that removing x-cloak from this line (

<form class="form" x-cloak x-show="isToggledOn">

) removes the component not found error from the console (at least in my local setup).
The only way I was able to trigger that error was by typing ~5-10 characters in the name field, at a frequency slower than the 250ms debounce but fast enough that the previous search hadn't returned results yet.

Do you mind trying that out and see if that works for you? I found triggering the snapshot error much more difficult so I was focusing on fixing the component not found error hoping that fixing one would fix the other.

Seems like the issue component not found error is fixed with that change. I did manage to get the snapshot error still during testing aswell.

@Roardom
Copy link
Collaborator Author

Roardom commented May 27, 2024

Glad to hear!

Also should note: it appears that it will still break if you have view cache enabled. We need to both remove x-cloak as well as clear view cache to remove these console errors.

@LostRager
Copy link
Contributor

Wonder what broke or changed from livewire 2 to livewire 3 to not make it work anymore.

@Roardom
Copy link
Collaborator Author

Roardom commented May 27, 2024

Found this: livewire/livewire#5658

Which seems to align with what I'm seeing.

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.

None yet

3 participants