rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.7k stars 319 forks source link

UI patch: reorder if statement in toolbar configurable area to fix UI inconsistencies #1690

Closed itsLeonB closed 2 months ago

itsLeonB commented 3 months ago

All Submissions:

New Feature Submissions:

  1. [ ] Does your submission pass tests and did you add any new tests needed for your feature?
  2. [ ] Did you update all templates (if applicable)?
  3. [ ] Did you add the relevant documentation (if applicable)?
  4. [x] Did you test locally to make sure your feature works as intended?

Changes to Core Features:


This is a small UI patch to fix two inconsistencies in the table's toolbar configurable area UI.

1. Moved if statement of toolbar-left-start area outside of the parent div to ensure div is not rendered when not using it.

Before patch

before-patch Here we can see the search bar have a margin-left on it, it is because the parent div with style md:space-x-2 is making a margin in between child elements. The toolbar-left-start area is rendered with 0 width, therefore the margin.

After patch

after-patch Here the search bar is properly aligned.

2. Added class on the parent div for consistent class in toolbar elements.

Before patch

before-patch Here the button I added for toolbar-left-start has a different height than other toolbar elements. This is caused by the parent div does not have the proper classes unlike the other toolbar elements. after-patch After adding the classes like other toolbar elements, the button now has the proper height.

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

lrljoe commented 2 months ago

Apologies, been a bit busy of late! Will look to get this reviewed and merged in this week.