Skip to content

Commit

Permalink
Merge branch '3.x' into allow-positioning-media-files
Browse files Browse the repository at this point in the history
  • Loading branch information
zeezo887 committed Nov 14, 2024
2 parents ee5920f + 53f59c3 commit ba50f4a
Show file tree
Hide file tree
Showing 64 changed files with 945 additions and 754 deletions.
43 changes: 16 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1, 8.0]
laravel: [9.*, 10.*, 11.*]
php: [8.3, 8.2, 8.1]
laravel: [10.*, 11.*]
dbal: [3.*, 4.*]
exclude:
- laravel: 9.*
dbal: 4.*
- laravel: 10.*
dbal: 4.*
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1
- laravel: 11.*
dbal: 3.*
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
Expand Down Expand Up @@ -128,15 +120,6 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update
composer install --prefer-dist --no-interaction --no-plugins
- name: Patch TestCase files for PHP < 8.1
run: |
if php -r 'exit(version_compare(PHP_VERSION, "8.1.0", "<") ? 0 : 1);'; then
for file in tests/integration/TestCase.php tests/Browser/BrowserTestCase.php; do
sed -i 's/protected function onNotSuccessfulTest(Throwable \$t): never/protected function onNotSuccessfulTest(Throwable \$t): void/' "$file";
echo "Patched $file for PHP < 8.1";
done
fi
- name: Setup Node.js
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -164,11 +147,6 @@ jobs:
- name: Prepare Testbench Dusk
run: ./vendor/bin/testbench-dusk package:discover

- name: Set PHPUnit config for Laravel 9
if: matrix.laravel == '9.*'
run: |
cp phpunit-legacy.xml phpunit.xml
- name: Execute all tests
run: vendor/bin/phpunit --stop-on-error
env:
Expand All @@ -178,10 +156,21 @@ jobs:
with:
files: .github/clover.xml

- uses: actions/upload-artifact@v2
if: always()
- name: Replace asterisks in Laravel
run: echo "REPLACED_LARAVEL=${MATRIX_LARAVEL//\*/_}" >> $GITHUB_ENV
env:
MATRIX_LARAVEL: ${{ matrix.laravel }}

- name: Replace asterisks in DBAL
id: replace_dbal
run: echo "REPLACED_DBAL=${MATRIX_DBAL//\*/_}" >> $GITHUB_ENV
env:
MATRIX_DBAL: ${{ matrix.dbal }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: screenshots
name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ env.REPLACED_LARAVEL }}-${{ env.REPLACED_DBAL }}
path: |
tests/Browser/screenshots/
tests/Browser/console/
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,70 @@

All notable changes to `twill` will be documented in this file.

## 3.4.1

### Improved

- Allow media and file library disk configuration using an environement variable by [@antonioribeiro](https://github.com/antonioribeiro) in https://github.com/area17/twill/pull/2676

### Fixed

- Fix #2671: 3.4.0 regression on related browsers previews by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2672
- Fix #2674: 3.4.0 regression on relation column using a one-to-one relationship by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2675

## 3.4.0

### Added

- Add `searchQuery` method to controller for finer control over the search by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2614
- Add `clearable` method to select form field by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2581

### Improved

- Rethink the way the error handler works by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2612
- Improve related save by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2599
- Limits Access Key exposition to S3 storage by [@luislavena](https://github.com/luislavena) in https://github.com/area17/twill/pull/2611
- Don't load relation for each column and allow dot notation in field name for index table by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2603
- Filter - Select: expand to the longest option by [@mrdoinel](https://github.com/mrdoinel) in https://github.com/area17/twill/pull/2627
- Preview: Update default width value for the mobile preview (to a more realistic value) by [@mrdoinel](https://github.com/mrdoinel) in https://github.com/area17/twill/pull/2624

### Fixed

- Fix trim function to get corresponding input by [@DCrepper](https://github.com/DCrepper) in https://github.com/area17/twill/pull/2609
- Fix published scope by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2606
- Fix sync of medias and files with multiple fields by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2628
- Fix positioning of the close button in media library tags by [@mrdoinel](https://github.com/mrdoinel) in https://github.com/area17/twill/pull/2626
- Fix search functionality for buckets by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2661
- Fix #2650: Added parentheses to fix the order of evaluation between t… by [@HarryThe3rd](https://github.com/HarryThe3rd) in https://github.com/area17/twill/pull/2651
- Fix deleted users causes error 500 by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2643
- Fix wrong crops for Blocks in `twill:refresh-crops` by [@ptrckvzn](https://github.com/ptrckvzn) in https://github.com/area17/twill/pull/2642
- Fix server error in the dashboard when a nested module has a deleted parent by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2633
- Fix slugs are not created when saving models outside of Twill or when duplicating by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2618
- Fix repeaters are registered without a populated item by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2605
- Fix block previews don't update when browser items are added or changed by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2535
- Fix weird behaviour of slugs table active column by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2531
- Fix blocks take crop settings from parent model if name is the same by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2542
- Use strict check for is null, as it otherwise causes empty arrays to not have any field by [@Tofandel](https://github.com/Tofandel) in https://github.com/area17/twill/pull/2604
- Rename moduleName variable in permissionModules loop by [@zeezo887](https://github.com/zeezo887) in https://github.com/area17/twill/pull/2635
- Ensure catch-all routes do not take precedence by [@ifox](https://github.com/ifox) in https://github.com/area17/twill/pull/2669

### Docs

- Update one-to-many docs to use correct Artisan command by [@daisonth](https://github.com/daisonth) in https://github.com/area17/twill/pull/2615
- Fix basic page builder guide block file reference by [@amiraezz](https://github.com/amiraezz) in https://github.com/area17/twill/pull/2630

### Translations

- Update both Portuguese from Brazil and Portugal by [@antonioribeiro](https://github.com/antonioribeiro) in https://github.com/area17/twill/pull/2602
- Improved i18n: added missing translation key (#2616) and improved German translations by [@C2H6-383](https://github.com/C2H6-383) in https://github.com/area17/twill/pull/2634

### Chores

- Upgrade GitHub Actions artefact upload to v4 by [@ifox](https://github.com/ifox)
- Bump webpack from 5.91.0 to 5.95.0 by [@dependabot](https://github.com/dependabot) in https://github.com/area17/twill/pull/2665
- Bump body-parser and express by [@dependabot](https://github.com/dependabot) in https://github.com/area17/twill/pull/2659
- Bump cookie and express by [@dependabot](https://github.com/dependabot) in https://github.com/area17/twill/pull/2664

## 3.3.1

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ If you are relying on Quill.js specifics (like css classes), use `'type' => 'qui
Previously `withVideo` was true by default, if you relied on this you have to update these media fields to
`'withVideo' => true`.

#### SVG's are now no longer passing thorough glide
#### SVG's are now no longer passing through glide

These are now rendered directly, you can change this by updating config `twill.glide.original_media_for_extensions` to an empty array `[]`

Expand Down
2 changes: 1 addition & 1 deletion config/file_library.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| - 'A17\Twill\Services\FileLibrary\Disk'
|
*/
'disk' => 'twill_file_library',
'disk' => env('FILE_LIBRARY_DISK', 'twill_file_library'),
'endpoint_type' => env('FILE_LIBRARY_ENDPOINT_TYPE', 'local'),
'cascade_delete' => env('FILE_LIBRARY_CASCADE_DELETE', false),
'local_path' => env('FILE_LIBRARY_LOCAL_PATH', 'uploads'),
Expand Down
2 changes: 1 addition & 1 deletion config/media_library.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
| - 'A17\Twill\Services\MediaLibrary\Local'
|
*/
'disk' => 'twill_media_library',
'disk' => env('MEDIA_LIBRARY_DISK', 'twill_media_library'),
'endpoint_type' => env('MEDIA_LIBRARY_ENDPOINT_TYPE', 'local'),
'cascade_delete' => env('MEDIA_LIBRARY_CASCADE_DELETE', false),
'local_path' => env('MEDIA_LIBRARY_LOCAL_PATH', 'uploads'),
Expand Down
2 changes: 1 addition & 1 deletion config/twill.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/*
|--------------------------------------------------------------------------
| Application strict url handeling
| Application strict url handling
|--------------------------------------------------------------------------
|
| Setting this value to true will enable strict domain handling.
Expand Down
11 changes: 6 additions & 5 deletions docs/content/1_docs/2_getting-started/1_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

## Environment requirements

Twill `3.x` is compatible with Laravel versions above `9.x`, running on PHP `8.0` and above. As a dependency to your
Twill `3.x` is compatible with Laravel versions `9.x`. `10.x` and `11.x` running on PHP `8.0` and above. As a dependency to your
own application, Twill shares Laravel's
[server requirements](https://laravel.com/docs/10.x/deployment#server-requirements).

## Development

For development, those requirements are satisfied by the following first-party solutions:

- [Herd](https://herd.laravel.com) (macOS and Windows)
- [Valet](https://laravel.com/docs/10.x/valet) (macOS)
- [Sail](https://laravel.com/docs/10.x/sail) (All platforms)
- [Homestead](https://laravel.com/docs/10.x/homestead) (All platforms)
- [Valet](https://laravel.com/docs/10.x/valet) (macOS)

## Production

Expand Down Expand Up @@ -42,9 +43,9 @@ developed and tested against MySQL (`>=5.7`) and PostgreSQL(`>=9.3`) databases.

| | Supported versions | Recommended version |
|:-----------|:------------------:|:-------------------:|
| PHP | >= 8.0 | 8.2 |
| Laravel | >= 9.0 | 10.x |
| Node.js | >= 16 | 18.x |
| PHP | >= 8.0 | 8.3 |
| Laravel | >= 9.0 | 11.x |
| Node.js | >= 16 | 20.x |
| MySQL | >= 5.7 | 8.x |
| PostgreSQL | >= 9.3 | 15.x |

4 changes: 2 additions & 2 deletions docs/content/1_docs/2_getting-started/2_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The starter kit setup is a basic page builder. It comes with:
You can install it in a Laravel application using:

```bash
composer require area17/twill:"^3.2"
composer require area17/twill:"^3.4"
```

:::alert=type.warning:::
Expand All @@ -40,7 +40,7 @@ See [`examples/basic-page-builder`](https://github.com/area17/twill/tree/3.x/exa
Twill package can be added to your application using Composer:

```bash
composer require area17/twill:"^3.2"
composer require area17/twill:"^3.4"
```

:::alert=type.warning:::
Expand Down
25 changes: 0 additions & 25 deletions docs/content/1_docs/2_getting-started/3_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,6 @@ return [
];
```

Twill registers its own exception handler in all controllers. If you need to customize it (to report errors on a 3rd party service like Sentry or Rollbar for example), you can opt-out from it in your `config/twill.php` file:

```php
<?php

return [
'bind_exception_handler' => false,
];
```

And then extend it from your own `app/Exceptions/Handler.php` class:

```php
<?php

namespace App\Exceptions;

use A17\Twill\Exceptions\Handler as ExceptionHandler;
use Exception;
use Illuminate\Auth\AuthenticationException;

class Handler extends ExceptionHandler
...
```

If you would like to provide custom tables names, use the following configuration options:

```php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Twill is a standard Laravel package, that means, we only have to require it (and

So, before we get to the process of building our CMS, let's install Twill.

We can do this using `composer require area17/twill:"^3.2"`.
We can do this using `composer require area17/twill:"^3.4"`.

This will install Twill 3 alongside all other required packages.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ return [
```

Now with this in place, you can go back to the block editor and add your first image block! But just as before, we have
to update the content of the preview file (`resources/views/site/blocks/text.blade.php`) so that we actually display
to update the content of the preview file (`resources/views/site/blocks/image.blade.php`) so that we actually display
the image!

```blade
Expand Down
5 changes: 5 additions & 0 deletions frontend/js/components/VSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
:searchable="searchable"
:selectable="selectable"
:clearSearchOnSelect="clearSearchOnSelect"
:clearable="clearable"
:label="optionsLabel"
:taggable="taggable"
:pushTags="pushTags"
Expand Down Expand Up @@ -81,6 +82,10 @@
type: Boolean,
default: false
},
clearable: {
type: Boolean,
default: false
},
selectable: {
type: Function,
default: option => option.selectable ?? true,
Expand Down
5 changes: 0 additions & 5 deletions frontend/js/components/VSelect/ExtendedVSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
mutableValue: this.value
}
},
computed: {
showClearButton () {
return false
}
},
methods: {
/**
* Delete the value on Delete keypress when there is no
Expand Down
9 changes: 7 additions & 2 deletions frontend/scss/vendor/_vselect.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ $multiSelectHeight: 45px;
padding-left: 0;
}

.vs__clear {
margin-right: 35px;
margin-top: 2px;
}

.vs__selected-options {
padding: 0 30px 0 15px;
}
Expand Down Expand Up @@ -414,11 +419,11 @@ $multiSelectHeight: 45px;
transform: none;
background-color:transparent;
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDEwIDEwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNhNmE2YTYiIGQ9Ik0yIDJsNiA2TTggMkwyIDgiLz48L3N2Zz4=);
color:$color__fborder--hover;
color: $color__fborder--hover;

span,
svg {
display:none
display: none
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions lang/de/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'reset-password' => 'Passwort zurücksetzen',
'reset-send' => 'Link zum Zurücksetzen des Passworts senden',
'verify-login' => 'Anmeldung bestätigen',
'auth-causer' => 'Authentifikation',
],
'buckets' => [
'intro' => 'Was würden Sie heute gerne vorstellen?',
Expand Down Expand Up @@ -56,6 +57,9 @@
'unfeatured' => 'Hervorhebung aufgehoben',
'restored' => 'Wiederhergestellt',
'deleted' => 'Gelöscht',
'login' => 'Anmeldung',
'logout' => 'Abmeldung',
'duplicated' => 'Dupliziert',
],
'activity-row' => [
'edit' => 'Bearbeiten',
Expand Down Expand Up @@ -145,6 +149,7 @@
],
],
'editor' => 'Editor',
'options' => 'Optionen',
],
'lang-manager' => [
'published' => 'Veröffentlicht',
Expand Down Expand Up @@ -196,6 +201,7 @@
'mine' => 'Meine',
'published' => 'Veröffentlicht',
'trash' => 'Papierkorb',
'not-set' => 'Ohne Wert',
],
'filters' => [
'all-label' => 'Alle :label',
Expand Down Expand Up @@ -407,6 +413,11 @@
'scheduled' => 'Geplant',
'expired' => 'Abgelaufen',
'unsaved-changes' => 'Es gibt nicht gespeicherte Änderungen',
'draft-revision' => 'Als Entwurfs-Revision abspeichern',
'draft-revision-close' => 'Als Entwurfs-Revision abspeichern und schließen',
'draft-revision-new' => 'Als Entwurfs-Revision abspeichern und weiteren erstellen',
'draft-revisions-available' => 'Sie betrachten die aktuell veröffentlichte Version des Inhalts. Es gibt neuere Entwurfs-Revisionen.',
'editing-draft-revision' => 'Sie bearbeiten aktuell eine Entwurfs-Revision dieses Inhalts. Speichern Sie die Änderungen oder Veröffentlichen Sie diese.',
],
'select' => [
'empty-text' => 'Leider keine passenden Optionen gefunden',
Expand Down
Loading

0 comments on commit ba50f4a

Please sign in to comment.