-
Notifications
You must be signed in to change notification settings - Fork 22
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
Laravel Nova 4 compatibility #26
Conversation
ngunyimacharia
commented
May 24, 2022
- Updates asset and compilation process
- Updates logic with Laravel Nova core changes
- Replaces usage of modal with native browser confirmation
- Icon components replaced with SVGs
@ahmedkandel have you had a chance to look into this PR? |
Thanks @ngunyimacharia for the PR, I had a quick look at the PR and have some comments as soon as possible will discuss them with you as currently i'm so busy but hope to get a chance within the next weeks. |
I've done a bit of initial testing, I had a few issues with some of the routes. E.g. http://localhost:8000/nova-vendor/nova-s3-multipart-upload/media/1/key/files was 404ing, due to FilesController::init() not being able to pull out the upload panel. |
If I change init() to the below it works. private function init($request)
{
$resource = $request->findResourceOrFail();
$this->model = $resource->model();
$fields = $resource->availableFields($request)
->map(
fn($field) => $field instanceof ResourceToolElement
? $field->assignedPanel
: $field
);
$this->tool = $fields
->whereInstanceOf(NovaS3MultipartUpload::class)
->firstWhere('attribute', $request->route('field'));
abort_unless($this->tool, 404);
} |
@ngunyimacharia any context you have that might explain the above? |
Hey @tractorcow, thank you for the feedback. Will look into this sometime today and get back to you. |
Hey @tractorcow , thank you for your feedback once again. I have reviewed and tested your fix locally. It works well as well as simplifies the code. I have added them to this PR to make the review process easier. Let me know if anything else comes up. |
Awesome work @ngunyimacharia . I'll continue testing and let you know how I get along. |
Everything else is working perfectly, good job. 👍 |
Thank you for the feedback @tractorcow. Will get the PR updated early this week 🙇🏿 |
I've done some UI changes, maybe @ngunyimacharia has some to review them. |
Ha. Nevermind. I am so dumb. This is a resource tool, not a field 🤣 |
When are you merging this PR for Nova 4? |
UI fixes (dark and white mode)
Hey @ahmedkandel, all the feedback has been integrated into the PR. Feel free to re-review. cc @tractorcow, @mykkode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe resources/js/tool.js
content needs to be replace with:
import Tool from './components/Tool'
Nova.booting((app, store) => {
app.component('nova-s3-multipart-upload', Tool)
})
Hi @ngunyimacharia, thanks for the updates 👍, i have added some comments can you check them? |
Hey @ahmedkandel , thank you for your feedback. I've resolved some of the comments. Feel free to review and let me know if anything is still pending. |
Great job @ngunyimacharia 👍 |
Once you apply this last comment, can you build and try to install the package on a clean laravel+nova instance to test its functionality? before we release v2.0.0 which adds support to Nova v4 |
Which comment is pending? Can't see it from my end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry i forgot to submit the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
You're welcome 🙏🏿 |