Columns prefix and suffix on wrapper
Related with https://github.com/Laravel-Backpack/CRUD/pull/3435.
This adds ability to add prefix and suffix to each column wrapper.
Note to self: we also talked about adding a wrapper[separator] attribute. Details in https://github.com/Laravel-Backpack/CRUD/pull/3435#issuecomment-769476582
A new inspection was created.
@promatik time to merge / close this. Still think it's a good idea & implementation? If so, please ask @pxpm to test & merge.
Bump! @promatik do you still think this is worth doing?
I think this is pretty cool 🤷♂️
And it can only be achieved with this feature, or, by hacking into the getFieldAttribute() { return "¿$this->field?";
Another example;
[
...
'wrapper' => [
...
'prefix' => '¿',
'suffix' => '?',
],
'prefix' => '—',
'suffix' => '!',
],
The inspection completed: No new issues
Quick note, this highlights an inconsistency between the place of the column prefix and suffix, inside or outside the wrapper.
In some fields column prefix/suffix are inside, others are outside. In my opinion it should always be outside, and if the devs want the prefix/suffix inside, use the method introduced in this PR, inside wrapper 👌
But, that is a breaking change, so not for now 🤷♂️
Awesome! Ok great, let's have this:
- [x] @promatik please create a PR for the docs
- [ ] @pxpm please review/test and merge if it has your green light too
Docs here https://github.com/Laravel-Backpack/docs/pull/389 🙌
@promatik if you think this is still worth doing, please add v6 docs for it (instead of v5) then ask Pedro to review and merge.
@pxpm updated docs to v6 https://github.com/Laravel-Backpack/docs/pull/389 👌