From 86f8c84b16451fb7d35b72fe837609f358b0cf93 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Mon, 17 May 2021 15:38:20 +0200 Subject: [PATCH 01/19] Merge pull request #3335 from getkirby/refactor/ci CI refactoring --- .gitattributes | 2 +- .github/workflows/ci.yml | 123 ++++++++++++++++-------------- .gitignore | 2 +- .php_cs => .php-cs-fixer.dist.php | 3 +- composer.json | 2 +- scripts/pre-commit | 2 +- 6 files changed, 71 insertions(+), 63 deletions(-) rename .php_cs => .php-cs-fixer.dist.php (97%) diff --git a/.gitattributes b/.gitattributes index 0e6325b5f5..cefd3091d9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,7 +9,7 @@ scripts/ export-ignore # tests .codecov.yml export-ignore -.php_cs export-ignore +.php-cs-fixer.dist.php export-ignore phpmd.xml.dist export-ignore phpunit.xml.dist export-ignore psalm.xml.dist export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4009cf9d00..d952ec942f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -on: [push, pull_request] +on: [ push, pull_request ] jobs: backend-tests: @@ -16,57 +16,70 @@ jobs: matrix: php: [ "7.3", "7.4", "8.0" ] env: - extensions: mbstring, ctype, curl, gd, apcu, memcached, pcov + extensions: mbstring, ctype, curl, gd, apcu, memcached ini: apc.enabled=1, apc.enable_cli=1, pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\"" steps: - - name: Checkout Kirby - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2 with: fetch-depth: 2 + - name: Preparations + run: mkdir sarif + - name: Install memcached - uses: niden/actions-memcached@v7 + uses: niden/actions-memcached@3b3ecd9d0d035ea92db716dc1540a7dbe9e56349 # pin@v7 - name: Install system locales run: sudo apt-get update && sudo apt-get install -y locales-all - name: Setup PHP cache environment id: ext-cache - uses: shivammathur/cache-extensions@v1 + uses: shivammathur/cache-extensions@fd2695d35c6a2d131a586986d11f1e390c33c77d # pin@v1 with: php-version: ${{ matrix.php }} extensions: ${{ env.extensions }} key: php-v1 - name: Cache PHP extensions - uses: actions/cache@v2 + uses: actions/cache@1c6fb82ebbd610035c324e764e5e74d0e82f8a60 # pin@v2 with: path: ${{ steps.ext-cache.outputs.dir }} key: ${{ steps.ext-cache.outputs.key }} restore-keys: ${{ steps.ext-cache.outputs.key }} - name: Setup PHP environment - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@27fc7bb418e73a1462a5604e3ea30e58ec1a6e1f # pin@v2 with: php-version: ${{ matrix.php }} extensions: ${{ env.extensions }} ini-values: ${{ env.ini }} coverage: pcov - tools: phpunit:^9 + tools: phpunit:9.5.4, psalm:4.7.1 - name: Setup problem matchers - id: finishPrepare run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Cache analysis data + id: finishPrepare + uses: actions/cache@1c6fb82ebbd610035c324e764e5e74d0e82f8a60 # pin@v2 + with: + path: ~/.cache/psalm + key: backend-analysis-${{ matrix.php }} + - name: Run tests if: always() && steps.finishPrepare.outcome == 'success' run: phpunit --coverage-clover ${{ github.workspace }}/clover.xml + - name: Statically analyze using Psalm + if: always() && steps.finishPrepare.outcome == 'success' + run: psalm --output-format=github --php-version=${{ matrix.php }} --report=sarif/psalm.sarif --report-show-info=false + - name: Upload coverage results to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27 # pin@v1 with: fail_ci_if_error: true file: ${{ github.workspace }}/clover.xml @@ -75,6 +88,12 @@ jobs: env: PHP: ${{ matrix.php }} + - name: Upload code scanning results to GitHub + if: always() && steps.finishPrepare.outcome == 'success' + uses: github/codeql-action/upload-sarif@4a083a45c246fee5483920bffe98a6e15c3fef32 # pin@v1 + with: + sarif_file: sarif + frontend-e2e: name: Frontend E2E @@ -90,13 +109,13 @@ jobs: extensions: mbstring, ctype, curl, gd, apcu, memcached steps: - - name: Checkout Kirby - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2 with: path: kirby - name: Checkout Sandbox - uses: actions/checkout@v2 + uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2 with: repository: getkirby/sandbox path: sandbox @@ -113,28 +132,28 @@ jobs: - name: Setup PHP cache environment id: ext-cache - uses: shivammathur/cache-extensions@v1 + uses: shivammathur/cache-extensions@fd2695d35c6a2d131a586986d11f1e390c33c77d # pin@v1 with: php-version: ${{ env.php }} extensions: ${{ env.extensions }} key: e2e-v1 - name: Cache PHP extensions - uses: actions/cache@v2 + uses: actions/cache@1c6fb82ebbd610035c324e764e5e74d0e82f8a60 # pin@v2 with: path: ${{ steps.ext-cache.outputs.dir }} key: ${{ steps.ext-cache.outputs.key }} restore-keys: ${{ steps.ext-cache.outputs.key }} - name: Setup PHP environment - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@27fc7bb418e73a1462a5604e3ea30e58ec1a6e1f # pin@v2 with: php-version: ${{ env.php }} extensions: ${{ env.extensions }} coverage: none - name: Install dependencies - uses: cypress-io/github-action@v2 + uses: cypress-io/github-action@1db146275576798796bc39ef83d739924145298a # pin@v2 with: working-directory: kirby/panel runTests: false @@ -151,7 +170,7 @@ jobs: working-directory: kirby/panel - name: Run tests - uses: cypress-io/github-action@v2 + uses: cypress-io/github-action@1db146275576798796bc39ef83d739924145298a # pin@v2 env: CYPRESS_host: "http://127.0.0.1:8000" with: @@ -171,14 +190,14 @@ jobs: - name: Archive Cypress screenshots if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 with: name: cypress-screenshots path: kirby/panel/cypress/screenshots - name: Archive Cypress videos if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@11830c9f4d30053679cb8904e3b3ce1b8c00bf40 # pin@v2 with: name: cypress-videos path: kirby/panel/cypress/videos @@ -194,47 +213,41 @@ jobs: runs-on: ubuntu-latest env: - php: "7.4" # TODO: Update to PHP 8.0 when PHPMD supports it (https://github.com/phpmd/phpmd/issues/853) + php: "8.0" extensions: mbstring, ctype, curl, gd, apcu, memcached steps: - - name: Checkout Kirby - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2 - name: Preparations run: mkdir sarif - name: Setup PHP cache environment id: ext-cache - uses: shivammathur/cache-extensions@v1 + uses: shivammathur/cache-extensions@fd2695d35c6a2d131a586986d11f1e390c33c77d # pin@v1 with: php-version: ${{ env.php }} extensions: ${{ env.extensions }} key: php-analysis-v1 - name: Cache PHP extensions - uses: actions/cache@v2 + uses: actions/cache@1c6fb82ebbd610035c324e764e5e74d0e82f8a60 # pin@v2 with: path: ${{ steps.ext-cache.outputs.dir }} key: ${{ steps.ext-cache.outputs.key }} restore-keys: ${{ steps.ext-cache.outputs.key }} - name: Setup PHP environment - uses: shivammathur/setup-php@v2 + id: finishPrepare + uses: shivammathur/setup-php@27fc7bb418e73a1462a5604e3ea30e58ec1a6e1f # pin@v2 with: php-version: ${{ env.php }} extensions: ${{ env.extensions }} coverage: none tools: | - composer:v2, composer-normalize, - composer-unused, phpcpd, psalm, phpmd - - - name: Cache analysis data - id: finishPrepare - uses: actions/cache@v2 - with: - path: ~/.cache/psalm - key: backend-analysis + composer:2.0.13, composer-normalize:2.13.3, composer-require-checker:3.2.0, + composer-unused:0.7.5, phpcpd:6.0.3, phpmd:2.10.0 - name: Validate composer.json/composer.lock if: always() && steps.finishPrepare.outcome == 'success' @@ -244,26 +257,21 @@ jobs: if: always() && steps.finishPrepare.outcome == 'success' run: composer-normalize --dry-run - # TODO: Re-enable when the fatal error in CI no longer appears - # - name: Check for unused Composer dependencies - # if: always() && steps.finishPrepare.outcome == 'success' - # run: composer unused --no-progress + - name: Check for unused Composer dependencies + if: always() && steps.finishPrepare.outcome == 'success' + run: composer unused --no-progress - name: Check for duplicated code if: always() && steps.finishPrepare.outcome == 'success' run: phpcpd --fuzzy --exclude tests --exclude vendor . - - name: Statically analyze using Psalm - if: always() && steps.finishPrepare.outcome == 'success' - run: psalm --output-format=github --report=sarif/psalm.sarif --report-show-info=false - - name: Statically analyze using PHPMD if: always() && steps.finishPrepare.outcome == 'success' - run: phpmd . ansi phpmd.xml.dist --exclude 'dependencies/*,tests/*,vendor/*' + run: phpmd . github phpmd.xml.dist --exclude 'dependencies/*,tests/*,vendor/*' --reportfile-sarif sarif/phpmd.sarif - name: Upload code scanning results to GitHub if: always() && steps.finishPrepare.outcome == 'success' - uses: github/codeql-action/upload-sarif@v1 + uses: github/codeql-action/upload-sarif@4a083a45c246fee5483920bffe98a6e15c3fef32 # pin@v1 with: sarif_file: sarif @@ -272,18 +280,17 @@ jobs: runs-on: ubuntu-latest env: - # TODO: update to PHP 8.0 when PHP-CS-Fixer fully supports it - php: "7.4" + php: "8.0" steps: - - name: Checkout Kirby - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2 - name: Set up Node.js problem matchers - uses: actions/setup-node@v2 + uses: actions/setup-node@0696555e99b7a8260864ca027af4b004eea59379 # pin@v2 - name: Cache npm dependencies - uses: actions/cache@v2 + uses: actions/cache@1c6fb82ebbd610035c324e764e5e74d0e82f8a60 # pin@v2 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} @@ -294,15 +301,15 @@ jobs: working-directory: panel - name: Setup PHP environment - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@27fc7bb418e73a1462a5604e3ea30e58ec1a6e1f # pin@v2 with: php-version: ${{ env.php }} coverage: none - tools: php-cs-fixer:2.19.0 + tools: php-cs-fixer:3.0.0 - name: Cache analysis data id: finishPrepare - uses: actions/cache@v2 + uses: actions/cache@1c6fb82ebbd610035c324e764e5e74d0e82f8a60 # pin@v2 with: path: ~/.php-cs-fixer key: coding-style @@ -319,7 +326,7 @@ jobs: if: > always() && steps.finishPrepare.outcome == 'success' && github.event_name == 'pull_request' - uses: reviewdog/action-suggester@v1 + uses: reviewdog/action-suggester@5d5b9f8c693e036796f828e47886bd10d368c273 # pin@v1 with: tool_name: ESLint fail_on_error: 'true' @@ -328,14 +335,14 @@ jobs: if: always() && steps.finishPrepare.outcome == 'success' # Use the --dry-run flag in push builds to get a failed CI status run: > - php-cs-fixer fix --diff --diff-format=udiff + php-cs-fixer fix --diff ${{ github.event_name != 'pull_request' && '--dry-run' || '' }} - name: Create code suggestions from the coding style changes (on PR only) if: > always() && steps.finishPrepare.outcome == 'success' && github.event_name == 'pull_request' - uses: reviewdog/action-suggester@v1 + uses: reviewdog/action-suggester@5d5b9f8c693e036796f828e47886bd10d368c273 # pin@v1 with: tool_name: PHP-CS-Fixer fail_on_error: 'true' diff --git a/.gitignore b/.gitignore index d5ba01146c..b3d5ada819 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ /kirby.zip # cs fixer -.php_cs.cache +.php-cs-fixer.cache # editors *.sublime-project diff --git a/.php_cs b/.php-cs-fixer.dist.php similarity index 97% rename from .php_cs rename to .php-cs-fixer.dist.php index 07cd80f9d3..365cd65737 100644 --- a/.php_cs +++ b/.php-cs-fixer.dist.php @@ -4,7 +4,8 @@ ->exclude('dependencies') ->in(__DIR__); -return PhpCsFixer\Config::create() +$config = new PhpCsFixer\Config(); +return $config ->setRules([ '@PSR1' => true, '@PSR2' => true, diff --git a/composer.json b/composer.json index be969b2d62..a68cc83d5a 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,7 @@ "@analyze", "@test" ], - "fix": "php-cs-fixer fix --config .php_cs", + "fix": "php-cs-fixer fix", "test": "phpunit --stderr --coverage-html=tests/coverage", "zip": "composer archive --format=zip --file=dist" }, diff --git a/scripts/pre-commit b/scripts/pre-commit index c0174ca82b..8534097b3d 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -28,7 +28,7 @@ git diff-index --cached --name-only HEAD | while read -r file; do case "$file" in bootstrap.php | router.php | @(config|src|tests|views)/**.php) echo "### PHP-CS-Fixer on $file" - php-cs-fixer fix --config .php_cs --dry-run --diff --diff-format=udiff "$file" + php-cs-fixer fix --dry-run --diff "$file" echo if [[ "$file" != tests/** ]]; then From 8c8bab91caf54d39ba38f2da8055249622c451c2 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Wed, 12 May 2021 15:27:09 +0200 Subject: [PATCH 02/19] Merge pull request #3319 from getkirby/feature/locale-get New `Locale::get()` method --- src/Toolkit/Locale.php | 118 +++++++++++++++++++++++++++++------ tests/Toolkit/LocaleTest.php | 75 ++++++++++++++++++---- 2 files changed, 162 insertions(+), 31 deletions(-) diff --git a/src/Toolkit/Locale.php b/src/Toolkit/Locale.php index 7798d22723..55d5201e9f 100644 --- a/src/Toolkit/Locale.php +++ b/src/Toolkit/Locale.php @@ -2,6 +2,7 @@ namespace Kirby\Toolkit; +use Kirby\Exception\Exception; use Kirby\Exception\InvalidArgumentException; /** @@ -15,6 +16,14 @@ */ class Locale { + /** + * List of all locale constants supported by PHP + */ + const LOCALE_CONSTANTS = [ + 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', + 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES' + ]; + /** * Converts a normalized locale array to an array with the * locale constants replaced with their string representations @@ -24,20 +33,7 @@ class Locale */ public static function export(array $locale): array { - // list of all possible constant names - $constantNames = [ - 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', - 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES' - ]; - - // build an associative array with the locales - // that are actually supported on this system - $constants = []; - foreach ($constantNames as $name) { - if (defined($name) === true) { - $constants[constant($name)] = $name; - } - } + $constants = static::supportedConstants(true); // replace the keys in the locale data array with the locale names $return = []; @@ -55,6 +51,53 @@ public static function export(array $locale): array return $return; } + /** + * Returns the current locale value for + * a specified or for all locale categories + * + * @param int|string $category Locale category constant or constant name + * @return array|string Associative array if `LC_ALL` was passed (default), otherwise string + * + * @throws \Kirby\Exception\Exception If the locale cannot be determined + * @throws \Kirby\Exception\InvalidArgumentException If the provided locale category is invalid + */ + public static function get($category = LC_ALL) + { + $normalizedCategory = static::normalizeConstant($category); + + if (is_int($normalizedCategory) !== true) { + throw new InvalidArgumentException('Invalid locale category "' . $category . '"'); + } + + if ($normalizedCategory !== LC_ALL) { + // `setlocale(..., 0)` actually *gets* the locale + $locale = setlocale($normalizedCategory, 0); + + if (is_string($locale) !== true) { + throw new Exception('Could not determine locale for category "' . $category . '"'); + } + + return $locale; + } + + // no specific `$category` was passed, make a list of all locales + $array = []; + foreach (static::supportedConstants() as $constant => $name) { + // `setlocale(..., 0)` actually *gets* the locale + $array[$constant] = setlocale($constant, '0'); + } + + // if all values are the same, we can use `LC_ALL` + // instead of a long array with all constants + if (count(array_unique($array)) === 1) { + return [ + LC_ALL => array_shift($array) + ]; + } + + return $array; + } + /** * Converts a locale string or an array with constant or * string keys to a normalized constant => value array @@ -68,11 +111,7 @@ public static function normalize($locale): array // replace string constant keys with the constant values $convertedLocale = []; foreach ($locale as $key => $value) { - if (is_string($key) === true && Str::startsWith($key, 'LC_') === true) { - $key = constant($key); - } - - $convertedLocale[$key] = $value; + $convertedLocale[static::normalizeConstant($key)] = $value; } return $convertedLocale; @@ -98,4 +137,45 @@ public static function set($locale): void setlocale($key, $value); } } + + /** + * Tries to convert an `LC_*` constant name + * to its constant value + * + * @param int|string $constant + * @return int|string + */ + protected static function normalizeConstant($constant) + { + if (is_string($constant) === true && Str::startsWith($constant, 'LC_') === true) { + return constant($constant); + } + + // already an int or we cannot convert it safely + return $constant; + } + + /** + * Builds an associative array with the locales + * that are actually supported on this system + * + * @param bool $withAll If set to `true`, `LC_ALL` is returned as well + * @return array + */ + protected static function supportedConstants(bool $withAll = false): array + { + $names = static::LOCALE_CONSTANTS; + if ($withAll === true) { + array_unshift($names, 'LC_ALL'); + } + + $constants = []; + foreach ($names as $name) { + if (defined($name) === true) { + $constants[constant($name)] = $name; + } + } + + return $constants; + } } diff --git a/tests/Toolkit/LocaleTest.php b/tests/Toolkit/LocaleTest.php index 288cd65b46..77a63b49a2 100644 --- a/tests/Toolkit/LocaleTest.php +++ b/tests/Toolkit/LocaleTest.php @@ -9,20 +9,13 @@ */ class LocaleTest extends TestCase { - protected $locale = []; + protected $locales = []; protected $localeSuffix; public function setUp(): void { - $constants = [ - LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, - LC_NUMERIC, LC_TIME, LC_MESSAGES - ]; - - // make a backup of the current locale - foreach ($constants as $constant) { - $this->locale[$constant] = setlocale($constant, '0'); - } + // make a backup of the current locales + $this->locales = Locale::get(); // test which locale suffix the system supports setlocale(LC_ALL, 'de_DE.' . $this->localeSuffix); @@ -38,12 +31,12 @@ public function setUp(): void public function tearDown(): void { - Locale::set($this->locale); - $this->locale = []; + Locale::set($this->locales); } /** * @covers ::export + * @covers ::supportedConstants */ public function testExport() { @@ -71,8 +64,66 @@ public function testExport() ])); } + /** + * @covers ::get + * @covers ::normalizeConstant + * @covers ::supportedConstants + */ + public function testGet() + { + // default case (all locales are set to the same value) + $this->assertSame([LC_ALL => 'C'], Locale::get()); + $this->assertSame([LC_ALL => 'C'], Locale::get(LC_ALL)); + $this->assertSame([LC_ALL => 'C'], Locale::get('LC_ALL')); + $this->assertSame('C', Locale::get(LC_NUMERIC)); + $this->assertSame('C', Locale::get('LC_NUMERIC')); + + // different locale values + Locale::set([LC_NUMERIC => 'de_DE.' . $this->localeSuffix]); + $this->assertSame($expected = [ + LC_COLLATE => 'C', + LC_CTYPE => 'C', + LC_MONETARY => 'C', + LC_NUMERIC => 'de_DE.' . $this->localeSuffix, + LC_TIME => 'C', + LC_MESSAGES => 'C' + ], Locale::get()); + $this->assertSame($expected, Locale::get(LC_ALL)); + $this->assertSame($expected, Locale::get('LC_ALL')); + $this->assertSame('de_DE.' . $this->localeSuffix, Locale::get(LC_NUMERIC)); + $this->assertSame('C', Locale::get(LC_CTYPE)); + $this->assertSame('C', Locale::get('LC_CTYPE')); + } + + /** + * @covers ::get + * @covers ::normalizeConstant + * @covers ::supportedConstants + */ + public function testGetInvalid1() + { + $this->expectException('Kirby\Exception\InvalidArgumentException'); + $this->expectExceptionMessage('Invalid locale category "KIRBY_AWESOME_LOCALE"'); + + Locale::get('KIRBY_AWESOME_LOCALE'); + } + + /** + * @covers ::get + * @covers ::normalizeConstant + * @covers ::supportedConstants + */ + public function testGetInvalid2() + { + $this->expectException('Kirby\Exception\Exception'); + $this->expectExceptionMessage('Could not determine locale for category "987654321"'); + + Locale::get(987654321); + } + /** * @covers ::normalize + * @covers ::normalizeConstant */ public function testNormalize() { From 8e84be0c80e97b770cf014dae8f67573e6581c17 Mon Sep 17 00:00:00 2001 From: Ahmet Bora Date: Tue, 25 May 2021 16:20:30 +0300 Subject: [PATCH 03/19] Fixes browser back button on panel #3216 --- panel/src/config/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/src/config/auth.js b/panel/src/config/auth.js index 11248f1cce..d8fa518202 100644 --- a/panel/src/config/auth.js +++ b/panel/src/config/auth.js @@ -11,7 +11,7 @@ export default function(to, from, next) { if (!user) { store.dispatch("user/visit", to.path); store.dispatch("user/logout"); - return false; + return next(false); } const access = user.permissions.access; From 9a38a9fd9409febde5fe51539e3a9a45661f17ff Mon Sep 17 00:00:00 2001 From: Ahmet Bora Date: Tue, 25 May 2021 16:21:23 +0300 Subject: [PATCH 04/19] Fixes browser back button on panel #3216 --- panel/src/config/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/src/config/auth.js b/panel/src/config/auth.js index d8fa518202..71a3b83d87 100644 --- a/panel/src/config/auth.js +++ b/panel/src/config/auth.js @@ -19,7 +19,7 @@ export default function(to, from, next) { // no access? redirect to website if (access.panel === false) { window.location.href = config.site; - return false; + return next(false); } // no access to view? redirect to the panel index From 12484b70f3b5c9a9adec636f726294362e897b44 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Tue, 25 May 2021 12:22:51 +0200 Subject: [PATCH 05/19] Fix list input sync issues Fix empty space issue Fix cs issues --- .../src/components/Forms/Input/ListInput.vue | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/panel/src/components/Forms/Input/ListInput.vue b/panel/src/components/Forms/Input/ListInput.vue index d8e5bead12..8ee9431132 100644 --- a/panel/src/components/Forms/Input/ListInput.vue +++ b/panel/src/components/Forms/Input/ListInput.vue @@ -1,10 +1,10 @@