Skip to content

Commit

Permalink
v3.4.13 (#1888)
Browse files Browse the repository at this point in the history
## [v3.4.13] - 2024-08-25
### Bug Fixes
- Fix for Action Button with no icon by @lrljoe in #1887

### Docs
- Add a Recommended Approach document by @lrljoe in #1886
- Reorder the "Getting Started" docs by @lrljoe in #1884
  • Loading branch information
lrljoe authored Aug 25, 2024
1 parent e233a79 commit ed00338
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to `laravel-livewire-tables` will be documented in this file

## [v3.4.13] - 2024-08-25
### Bug Fixes
- Fix for Action Button with no icon by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1887

### Docs
- Add a Recommended Approach document by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1886
- Reorder the "Getting Started" docs by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1884

## [v3.4.12] - 2024-08-23
### Tweaks
- Adjust Action Button Margins by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1880
Expand Down
2 changes: 1 addition & 1 deletion docs/start/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Configuration
weight: 4
weight: 5
---

## Publishing Assets
Expand Down
2 changes: 1 addition & 1 deletion docs/start/including-assets.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Including Assets
weight: 3
weight: 4
---

## Package Specific Code
Expand Down
2 changes: 1 addition & 1 deletion docs/start/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Installation
weight: 2
weight: 3
---

You can install the package via composer:
Expand Down
90 changes: 90 additions & 0 deletions docs/start/recommended.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
title: Recommended
weight: 2
---

While the package is very customisable, and supports a number of different approaches. The below is the recommended approach, that gives the best performance for the tables:

## Installation
```
composer require rappasoft/laravel-livewire-tables
```

## Publish the Tables Config
```
php artisan vendor:publish --tag="livewire-tables-config"
```

## Livewire Tables Config Updates
Update the published Livewire Tables Config (config/livewire-tables.php) and set the following to false:
```php
/**
* Cache Rappasoft Frontend Assets
*/
'cache_assets' => false,

/**
* Enable or Disable automatic injection of core assets
*/
'inject_core_assets_enabled' => false,

/**
* Enable or Disable automatic injection of third-party assets
*/
'inject_third_party_assets_enabled' => false,

/**
* Enable Blade Directives (Not required if automatically injecting or using bundler approaches)
*/
'enable_blade_directives' => false,
```

## Bundling the Assets
As you have now told the package not to inject the assets, add the following to your resources/js/app.js file:

```js
import '../../vendor/rappasoft/laravel-livewire-tables/resources/imports/laravel-livewire-tables-all.js';
```

## Update Layouts
Ensure that your layouts do not reference any of the following blade directives, as these are not required with the above approach
```
<!-- Adds the Core Table Styles -->
@rappasoftTableStyles
<!-- Adds any relevant Third-Party Styles (Used for DateRangeFilter (Flatpickr) and NumberRangeFilter) -->
@rappasoftTableThirdPartyStyles
<!-- Adds the Core Table Scripts -->
@rappasoftTableScripts
<!-- Adds any relevant Third-Party Scripts (e.g. Flatpickr) -->
@rappasoftTableThirdPartyScripts
```

## Tailwind Specific
If using Tailwind, you should update your tailwind.config.js file, adding the following to the "content" section under module.exports. This ensures that the Livewire Tables specific core classes are included.

```js
'./vendor/rappasoft/laravel-livewire-tables/resources/views/*.blade.php',
'./vendor/rappasoft/laravel-livewire-tables/resources/views/**/*.blade.php',
```

It is also recommended to add the paths to any Livewire Tables components, for example:
```js
'./app/Livewire/*.php',
'./app/Livewire/**/*.php',
```
So that any classes used in setTdAttributes or similar are included!

## Run your build process
```
npm run build
```

## Clear Cached Views
```
php artisan view:clear
```

You may of course run view:cache at this point.
2 changes: 1 addition & 1 deletion docs/start/rendering.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Rendering
weight: 6
weight: 7
---

## Rendering Components
Expand Down
2 changes: 2 additions & 0 deletions resources/views/includes/actions/button.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@
}}
></i>
<span>{{ $action->getLabel() }}</span>
@else
<span>{{ $action->getLabel() }}</span>
@endif
</a>

0 comments on commit ed00338

Please sign in to comment.