crynobone
Repos
126
Followers
1180
Following
44

Testing Helper for Laravel Development

218
23

[Package] Laravel Testing Helper for Packages Development

1872
121

[Package] Laravel Dusk Testing Helper for Package Development

81
8

PHP framework agnostic library for working with BillPlz API v3 and beyond...

72
27

Serializable Laravel Query Builder

44
4

Tool for Laravel Nova Packages Development

11
1

Events

crynobone create tag v7.8.1
Created at 1 hour ago

Fix missing Illuminate\Support\Arr import in trait HandlesTestFailures (#82)

Created at 1 hour ago
pull request closed
Fix missing Illuminate\Support\Arr import in trait HandlesTestFailures

Fix error Class "Orchestra\Testbench\Concerns\Arr" not found when running tests with errors.

https://github.com/orchestral/testbench-core/blob/baac2d1c30bc7a06c29ae3798442ad92910f9920/src/Concerns/HandlesTestFailures.php#L89

Created at 1 hour ago
issue comment
Nova 4.15: Image filed CORS error if use multidomains

4.14.x

image

4.15.x

image

I tested with Ngrok, the behavior seems the same here.

Created at 5 hours ago
closed issue
Nova 4.15: Image filed CORS error if use multidomains
  • Laravel Version: 9.*
  • Nova Version: 4.15
  • PHP Version: 8.1

Description:

Nova 4.15 contains new cool file uploading service. image

Thank you it works cool. But when the app has multiple domains (and storage doesn't use same domain as nova app) it causes CORS error because now the image loaded by js (before it was just replaced URL in the script).

If revert version to 4.14 it works perfect.

Detailed steps to reproduce the issue on a fresh Nova installation:

For example, we have an app with two domains crm.example.com and app.example.com . Nova application is under path crm.example.com/nova. And we have storage pointed to app URL.

     'app_feature' => [
            'driver'     => 'local',
            'root'       => storage_path('app/public/app-feature'),
            'url'        => env('APP_URL').'/storage/app-feature',
            'visibility' => 'public',
      ],

In this case when nova image field will be initialized it will try to load image by link app.example.com/storage/app-feature ... which will cause CORS error.

The same problem will be if use nova as a subdomain like nova.example.com.


Yes, I understand, there exist some solutions to fix it on my side, like adding access-control-origin headers, or dynamically replacing URL. But generally, I have several apps with the same problems and some apps have much more than 2 domains. So it will be really good if this problem will be fixed in the core nova package. (or by changing code from ajax load image to URL replace, or by adding an additional image field with old functionality where the developer can select what field he needs to use...)

Created at 5 hours ago

wip

Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com

Created at 10 hours ago
crynobone create branch 1.4.x
Created at 10 hours ago
issue comment
Nova 4.15: Image filed CORS error if use multidomains

Hi,

I'm having a hard time to tests this issue, do you have a public image with "Cross-Origin Request Blocked" in order for me to verify the fixes.

Created at 11 hours ago
issue comment
App title not updating when setting config.name

I believe you should change the SVG via nova.brand.logo configuration.

Created at 13 hours ago
closed issue
App title not updating when setting config.name
  • Laravel Version: 9.33.0
  • Nova Version: 4.15.2
  • PHP Version: 8.1.4
  • Database Driver & Version: MySQL 8.0.28
  • Operating System and Version: macOS 11.5.2
  • Browser type and version: Chrome 105.0.5195.125 (Official Build) (arm64)

Description:

When editing config/nova.php, if I edit the name key, nothing updates in the Nova UI. See below And here is the UI.

Note that the title of the browser tab is updated, but not the text next to the logo in the Nova UI

Created at 13 hours ago
issue comment
If Nova Action takes longer than 1 minute, the loading indicator stops and the action window doesn't close when it finishes

I don't think there is anything specific that we can do here, the animation using <Loader /> component and the SVG already using <animate repeatCount="indefinite" />

Created at 13 hours ago
closed issue
If Nova Action takes longer than 1 minute, the loading indicator stops and the action window doesn't close when it finishes

Bit of an edge case no doubt but some of my Nova actions perform tasks that can take up to a few minutes after you select a few fields and click the button to start the action.

I've noticed that at the 1 minute mark the loading indicator (on the button) stops animating, and when my action does finish its task.. even if it's at 61 second.. then there will be no feedback that the action completed and the action window (with the action fields) will fail to close.

Created at 13 hours ago

wip

Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com

Created at 2 days ago
issue comment
Dependent fields works only for the first one

Unable to reproduce the issue: https://github.com/nova-issues/issue-4863/commit/10114a34273d21f9195eb9f1184d8d7499d22b50

Please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)

Created at 2 days ago
create branch
crynobone create branch main
Created at 2 days ago
create repository
crynobone create repository
Created at 2 days ago
issue comment
Potential Race Condition with dependentFieldDebouncer

The fix has been merged, thank you.

However, I still preserve the value assignment outside the denouncer to ensure other value (field dependent on multiple attribute) also get assigned and only trigger single request.

Created at 2 days ago
issue comment
custom field dependsOn

Submitted https://github.com/laravel/nova-docs/pull/473

You should update the code to:

use Laravel\Nova\Fields\Field;
use Laravel\Nova\Fields\SupportsDependentFields;

class Inputmask extends Field
{
    use SupportsDependentFields;
    
    // ...
}
Created at 3 days ago
pull request opened
Add documentation regarding using `Laravel\Nova\Fields\SupportsDependentFields` trait

fixes https://github.com/laravel/nova-issues/issues/4859

Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com

Created at 3 days ago

wip

Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com

Created at 3 days ago
create branch
crynobone create branch fixes-4859
Created at 3 days ago
issue comment
Actions disappear on resource details page

The current behaviour is expected as plan for Nova 4.

Moving the toolbar down give a bad UX in my opinion and any changes would depends on whether the team agree to change the current behaviour. Haven't received any yet and currently not specifying this as a bug.

Created at 3 days ago
issue comment
Actions disappear on resource details page

The current behaviour is expected as plan for Nova 4.

Moving the toolbar down give a bad UX in my opinion and any changes would depends on whether the team agree to change the current behaviour. Haven't received any yet and currently not specifying this as a bug.

Created at 3 days ago
issue comment
Fixes GitHub Action workflow to tests on multiple Laravel versions.

i personally have been avoiding caret for years but never found a solid reason to promote it for GitHub Actions until now.

Due to the current issue, I submitted few PR to Laravel packages to avoid using caret and Dries pinpoint the root cause. TIL too (was previously assumed Composer on Windows has a gotcha).

Created at 4 days ago
opened issue
Resource is not binded when updating dependent fields

Discussed in https://github.com/laravel/nova-issues/discussions/4842

Originally posted by xel1045 September 23, 2022

  • Laravel Version: 9.27.0
  • Nova Version: 4.14.3
  • PHP Version: 8.1.9
  • Database Driver & Version: MySQL 8.0.30
  • Operating System and Version: macOS 12.6
  • Browser type and version: Chrome 105

Description:

When updating an existing resource, Laravel doesn't bind the resource when applying dependent fields.

To be more specific, when the fields method is call for a request to /nova-api/resource/id/update-fields, the $this->resource model is empty. In my case, it looks like this:

Screen Shot 2022-09-23 at 11 46 28

It seems that \Laravel\Nova\Http\Controllers\UpdateFieldController::sync was modified in Nova 4.2.4 and it doesn't use the binded resource.

Right now it looks like this:

    public function sync(ResourceUpdateOrUpdateAttachedRequest $request)
    {
        UpdateViewResource::make()->newResourceWith($request);

        return response()->json(
            $request->newResource()
                ->updateFields($request)

But I think it should be this instead:

    public function sync(ResourceUpdateOrUpdateAttachedRequest $request)
    {
        $resource = UpdateViewResource::make()->newResourceWith($request);

        return response()->json(
            $resource
                ->updateFields($request)

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Create a resources with dependents fields
  2. Add a breakpoint on the fields method when update-fields on edit (condition str_contains($request->url(), 'update-fields'))
  3. Change a dependent field to trigger an update
  4. When your breakpoint is reached, check the current value of the $this->resource

Thanks!

Created at 4 days ago
pull request opened
Improves GitHub Action
  • Use Composer's repositories with path to checkout breeze
  • Reduce risk where breeze own dependencies is not updated by using composer update "laravel/breeze" -W instead of composer dump
Created at 4 days ago