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

In show_fields, use getFirstFieldView() method #4186

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

tabacitu
Copy link
Member

@tabacitu tabacitu commented Feb 12, 2022

...instead of manually doing the same thing in the blade file.

WHY

BEFORE - What was wrong? What was happening before this PR?

In show_fields we were doing the same thing as in CRUD::getFirstFieldView(), instead of calling that method.

AFTER - What is happening after this PR?

We call CRUD::getFirstFieldView()

HOW

Is it a breaking change or non-breaking change?

Non-breaking.

How can we test the before & after?

Create in Monster & MenuItem should work before, should work after, and show all fields.

instead of manually doing the same thing in the blade file
@tabacitu tabacitu self-assigned this Feb 12, 2022
@tabacitu tabacitu changed the title in show_fields, use getFirstFieldView method In show_fields, use getFirstFieldView method Feb 12, 2022
@tabacitu tabacitu changed the title In show_fields, use getFirstFieldView method In show_fields, use getFirstFieldView() method Feb 12, 2022
@tabacitu
Copy link
Member Author

This should also show a better error message. For example in Laravel-Backpack/PageManager#123 the new message should read "Cannot find 'normal' field view in any of the regular locations." which is a little more clear than the current "None of the views in the given array exist".

@tabacitu tabacitu merged commit 2be4ff8 into v5 Feb 12, 2022
@tabacitu tabacitu deleted the when-showing-fields-use-get-first-field-view-method branch February 12, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant