demo icon indicating copy to clipboard operation
demo copied to clipboard

Add example for all 50+ column types (both CRUD and PRO)

Open munjaldevelopment opened this issue 3 years ago • 2 comments

WHY

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

We only had examples for 20+ column types, because that's all we had.

AFTER - What is happening after this PR?

There are two PRs that bring feature-parity between fields and columns. Basically, each CRUD and PRO field now has a corresponding column type, with the same name:

  • https://github.com/Laravel-Backpack/CRUD/pull/4675
  • https://github.com/Laravel-Backpack/PRO/pull/91

This PR makes it easy to all those column types that those PRs add.

HOW

How did you achieve that, in technical terms?

Added new CrudController, ColumnMonsterCrudController, that basically uses fields definitions to add columns. That way, we also test that the syntax for fields works for its corresponding column too.

Is it a breaking change or non-breaking change?

Non-Breaking change

How can we test the before & after?

  • checkout this PR on the demo
  • go to vendor/backpack/crud and checkout PR https://github.com/Laravel-Backpack/CRUD/pull/4675
  • go to vendor/backpack/pro and checkout PR https://github.com/Laravel-Backpack/PRO/pull/91
  • in your browser, go to /admin/column-monster and play around - see all columns work

munjaldevelopment avatar Oct 07 '22 10:10 munjaldevelopment

BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly.

Please keep in mind that:

  • if this constitutes a breaking change, it might take quite a while for this to get merged; we try to emulate the Laravel release cycle as much as possible, so developers can upgrade both software once; this means a new big release every ~6 months;
  • even if it's a non-breaking change, it might take a few days/weeks for the PR to get merged; unless it's a no-brainer, we like to have some community feedback on new features, before we merge them; this leads to higher-quality code, in the end; we learnt this the hard way :-)
  • not all PRs get merged; sometimes we just have to hold out new features, to keep the packages lean; sometimes we don't include features that only apply to niche use cases;
  • we're not perfect; if you think we're wrong, call us out on it; but in a kind way :-) we all make mistakes, best we learn from them and build better software together;

Thank you!

-- Justin Case The Backpack Robot

welcome[bot] avatar Oct 07 '22 10:10 welcome[bot]

Here's an export of my monsters table, so you can get the same results as I did:

monsters 11-10-202209-45-17.txt

tabacitu avatar Oct 11 '22 06:10 tabacitu

Pedro - please make sure that every time you push to this branch, you double-check that the assets are the ones from the main branch. We cannot have this branch show changes to 238 files (CSS and JS assets), the 50 blade files are way more than enough to keep us busy and confused 😀

I'm telling you that because, as I remember it, I had just fixed that problem last week, then you added another push, 258 files changed again. No bueno - Jorge can't reasonably be expected to review this with so many changes.

tabacitu avatar Jan 02 '23 05:01 tabacitu

Hi @pxpm i check this PR.

Now i see an error with column align.

On /admin/column-monster at the start, everything look perfect. screenshot-backpack test-2023 01 09-17_19_31

Then from select align starting to be move: screenshot-backpack test-2023 01 09-17_19_45

At the upload column is impossible to see correctly: screenshot-backpack test-2023 01 09-17_20_01

When you go to the end of row, from color picker everything look correctly align again: screenshot-backpack test-2023 01 09-17_20_34

I check in detail each column, but a lot of them are "fake" and didnt load correctly value con column list, per example "Select_grouped".

Cheers.

jcastroa87 avatar Jan 09 '23 20:01 jcastroa87

Hi @pxpm add to last revision there is this column miss:

Is not in any CRUD:

  • google_map

Is not in monster CRUD:

  • repeatable
  • wysiwyg

Cheers.

jcastroa87 avatar Jan 17 '23 18:01 jcastroa87

Jorge and I decided it's better for @jorgetwgroup to take this feature to the finish line.

finish-line-gif

tabacitu avatar Jan 19 '23 12:01 tabacitu

Hi @tabacitu

This PR is now ready, i add all fields to Monsters, thats mean this:

  1. address_algolia
  2. address_google
  3. base64_image
  4. browse
  5. browse_multiple
  6. checkbox
  7. checklist
  8. ckeditor
  9. color
  10. color_picker
  11. custom_html
  12. date
  13. date_picker
  14. date_range
  15. datetime
  16. datetime_picker
  17. easymde
  18. email
  19. enum
  20. google_map
  21. hidden
  22. icon_picker
  23. image
  24. month
  25. number
  26. password
  27. phone
  28. radio
  29. range
  30. relationship
  31. repeatable
  32. select
  33. select_and_order
  34. select_from_array
  35. select_grouped
  36. select_multiple
  37. select2
  38. select2_from_ajax
  39. select2_from_ajax_multiple
  40. select2_from_array
  41. select2_grouped
  42. select2_multiple
  43. select2_nested
  44. slug
  45. summernote
  46. switch
  47. table
  48. text
  49. textarea
  50. time
  51. tinymce
  52. upload
  53. upload_multiple
  54. url
  55. video
  56. week
  57. wysiwyg

I test and add all this columns to Monsters:

  1. address_algolia
  2. address_google
  3. base64_image
  4. browse
  5. checkbox
  6. checklist
  7. ckeditor
  8. color
  9. color_picker
  10. custom_html
  11. date
  12. date_picker
  13. datetime
  14. datetime_picker
  15. easymde
  16. email
  17. enum
  18. google_map
  19. icon_picker
  20. image
  21. month
  22. number
  23. phone
  24. radio
  25. range
  26. relationship
  27. select
  28. select_and_order
  29. select_from_array
  30. select_grouped
  31. select_multiple
  32. select2
  33. select2_from_ajax
  34. select2_from_array
  35. select2_grouped
  36. select2_multiple
  37. select2_nested
  38. slug
  39. summernote
  40. table
  41. text
  42. textarea
  43. time
  44. tinymce
  45. upload
  46. upload_multiple
  47. url
  48. video
  49. week
  50. wysiwyg

And this columns too:

  1. boolean
  2. check
  3. checkbox
  4. closure
  5. custom_html
  6. date
  7. datetime
  8. email
  9. enum
  10. image
  11. json
  12. model_function
  13. model_function_attribute
  14. multidimensional_array
  15. number
  16. phone
  17. radio
  18. relationship_count
  19. row_number
  20. select
  21. select_from_array
  22. select_multiple
  23. text
  24. textarea
  25. upload_multiple
  26. array
  27. array_count
  28. markdown
  29. relationship
  30. table
  31. video

I fix "time" column format on this PR: https://github.com/Laravel-Backpack/CRUD/pull/4910

Let me know if i miss anything.

Cheers.

jcastroa87 avatar Jan 23 '23 21:01 jcastroa87

Im sorry im forget to say this need to execute "php artisan migrat" because add new columns to monsters.

Cheers.

jcastroa87 avatar Jan 23 '23 22:01 jcastroa87

Just an heads-up before merging this into v6 branch. Should we rip of algolia ?

I think we should. Ping @tabacitu

pxpm avatar Jan 30 '23 19:01 pxpm

We totally should, but I don't think it's got anything to do with this PR. This is about columns. We can do that in a separate PR, it'll be easier.

tabacitu avatar Jan 31 '23 04:01 tabacitu

Gave this another test, a few fixes. Merging to v6 🎉

tabacitu avatar Feb 27 '23 09:02 tabacitu

WHOOP-WHOOP! Congrats, your first PR on this repo has officialy been merged.

party

If you want to help out the community in other ways, you can:

  • give your opinion on other Github Issues & PRs;
  • chat with others in the Gitter Chatroom (usually for quick help: How do I do X);
  • answer Backpack questions on Stackoverflow; you get points, people get help; you can subscribe to the backpack-for-laravel tag by adding a new filter; that will send you emails when new questions come up with our tag;

Again. Thank you for the PR. You are a wonderful person. Keep 'em coming :-) Cheers!

-- Justin Case The Backpack Robot

P.S. Help in the Backpack community is rewarded with free Backpack commercial licenses. It's the least we can do. If you feel you've helped the community with PRs, help & other stuff, please shoot Tabacitu an email and ask him if you qualify for free licenses. You scratch my back, I scratch your back. Thank you!

welcome[bot] avatar Feb 27 '23 09:02 welcome[bot]