-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Improved handling attempted access of deleted files in importer #15112
Merged
snipe
merged 22 commits into
snipe:develop
from
marcusmoore:livewire-importer-improvements
Aug 20, 2024
Merged
Improved handling attempted access of deleted files in importer #15112
snipe
merged 22 commits into
snipe:develop
from
marcusmoore:livewire-importer-improvements
Aug 20, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR Summary
|
# Conflicts: # resources/views/livewire/importer.blade.php
I think this looks great, even if it's not perfect, it's a far better UX than what we had. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Issue...
Previously, attempting to interact with a file that was deleted would fail hard. Here's an example of deleting an import file in one tab and then interacting with it in another to demonstrate:
CleanShot.2024-07-18.at.11.41.55.2.mp4
The Fix...
With this PR, an error message is shown when attempting to select the deleted import file:
CleanShot.2024-07-18.at.11.44.00.mp4
The Details...
To support this I made overall improvements to the Import component. Generally speaking:
mount
andrender
methodslegacy_model_binding
Not Quite There...
But...having already "opened" the deleted import and attempting to interact with it doesn't fail hard anymore but also doesn't show an error message:
CleanShot.2024-07-18.at.11.44.33.mp4
I attempted to use the exception hook to catch the
ModelNotFound
exception but it doesn't seem to work for computed properties as mentioned in this discussion. I went down the path of making an overwrittenComputed
property but wasn't able to write it up correctly. I think we can wait until Livewire implements the fix itself and we (should) get it for free after updating. What do you think @snipe?Type of change