From ed003381fdac8f18a4954ad78cc35e3280975937 Mon Sep 17 00:00:00 2001
From: Joe <104938042+lrljoe@users.noreply.github.com>
Date: Sun, 25 Aug 2024 02:15:08 +0100
Subject: [PATCH] v3.4.13 (#1888)
## [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
---
CHANGELOG.md | 8 ++
docs/start/configuration.md | 2 +-
docs/start/including-assets.md | 2 +-
docs/start/installation.md | 2 +-
docs/start/recommended.md | 90 +++++++++++++++++++
docs/start/rendering.md | 2 +-
.../views/includes/actions/button.blade.php | 2 +
7 files changed, 104 insertions(+), 4 deletions(-)
create mode 100644 docs/start/recommended.md
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f17a89a1..ef5caafc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/docs/start/configuration.md b/docs/start/configuration.md
index 75aef5083..3e264c578 100644
--- a/docs/start/configuration.md
+++ b/docs/start/configuration.md
@@ -1,6 +1,6 @@
---
title: Configuration
-weight: 4
+weight: 5
---
## Publishing Assets
diff --git a/docs/start/including-assets.md b/docs/start/including-assets.md
index cbc25cb70..b0c782fe8 100644
--- a/docs/start/including-assets.md
+++ b/docs/start/including-assets.md
@@ -1,6 +1,6 @@
---
title: Including Assets
-weight: 3
+weight: 4
---
## Package Specific Code
diff --git a/docs/start/installation.md b/docs/start/installation.md
index d09a68879..11d07fa01 100644
--- a/docs/start/installation.md
+++ b/docs/start/installation.md
@@ -1,6 +1,6 @@
---
title: Installation
-weight: 2
+weight: 3
---
You can install the package via composer:
diff --git a/docs/start/recommended.md b/docs/start/recommended.md
new file mode 100644
index 000000000..e0b1ca3ff
--- /dev/null
+++ b/docs/start/recommended.md
@@ -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
+```
+
+ @rappasoftTableStyles
+
+
+ @rappasoftTableThirdPartyStyles
+
+
+ @rappasoftTableScripts
+
+
+ @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.
\ No newline at end of file
diff --git a/docs/start/rendering.md b/docs/start/rendering.md
index 5931502d1..4e9e1e4fe 100644
--- a/docs/start/rendering.md
+++ b/docs/start/rendering.md
@@ -1,6 +1,6 @@
---
title: Rendering
-weight: 6
+weight: 7
---
## Rendering Components
diff --git a/resources/views/includes/actions/button.blade.php b/resources/views/includes/actions/button.blade.php
index e4a9b137c..84fe37120 100644
--- a/resources/views/includes/actions/button.blade.php
+++ b/resources/views/includes/actions/button.blade.php
@@ -29,5 +29,7 @@
}}
>
{{ $action->getLabel() }}
+ @else
+ {{ $action->getLabel() }}
@endif
\ No newline at end of file