Skip to content
Closed

V2.x #39

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ae425d7
docs: add PHPDoc for BlockData magic properties
eldomagan Jan 22, 2026
3331212
chore: upgrade craftile/laravel to ^0.6
eldomagan Feb 16, 2026
75e6f68
fix: use regionId instead of regionName in block filter
eldomagan Mar 10, 2026
05218ee
feat: add data-morph-ignore support to morphdom handler
eldomagan Mar 10, 2026
a9ec37f
feat: add isResponsiveValue and getResponsiveValue utilities to Visual
eldomagan Mar 10, 2026
0007a28
feat: add section alias for block in SimpleSection
eldomagan Mar 10, 2026
ef45f05
feat: add discoverPresetsIn method
eldomagan Mar 10, 2026
8efa769
docs: add discoverPresetsIn to presets documentation
eldomagan Mar 10, 2026
916e7df
feat: add shared Events interface for cross-package Livewire events
eldomagan Mar 10, 2026
74af973
feat: allow 'auto' value in SpacingValue properties
eldomagan Apr 11, 2026
a9f682e
style: collapse getResponsiveValue return expression to single line
eldomagan Apr 29, 2026
0d6e89e
chore: switch couleur package to bagistoplus/couleur for PHP 8.4 comp…
eldomagan Apr 29, 2026
a9f175b
fix: refresh parent of repeated block on child reorder
eldomagan Apr 30, 2026
19c5030
feat: merge positions field in mergeUpdates
eldomagan Apr 30, 2026
aef496f
chore: upgrade dev dependencies to latest
eldomagan Apr 30, 2026
9ae8a6c
fix: forward encrypted session cookie to preview sub-request to preve…
eldomagan Apr 30, 2026
17cf477
fix: lazy-load Theme::$settings to prevent uninitialized property err…
eldomagan May 1, 2026
c3289ca
ci: add semantic-release workflow
eldomagan May 1, 2026
db7a5e3
ci: bump checkout, composer-install, and fetch-metadata actions
eldomagan May 1, 2026
cf15274
ci: enforce conventional commits and add pre-commit hooks via Captain…
eldomagan May 1, 2026
fad128f
feat: discover theme presets from provider
eldomagan May 3, 2026
8d6e573
refactor: simplify class references
eldomagan May 3, 2026
2242a82
docs: document section magic property
eldomagan May 4, 2026
6ec0fee
ci: update Laravel test matrix
eldomagan May 4, 2026
d12959b
build: update craftile packages
eldomagan May 4, 2026
1ed5918
Built assets
eldomagan May 4, 2026
a9fd160
chore(release): 2.0.0-alpha.5 [skip ci]
semantic-release-bot May 4, 2026
51b7bb2
Merge pull request #38 from bagistoplus/alpha
eldomagan May 4, 2026
ceec1e6
Merge branch 'main' into v2.x
eldomagan May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Conventional Commits

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
validate:
name: Validate commits
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v4

- name: Validate every commit in the PR
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
failed=0
tmp=$(mktemp)
while IFS= read -r sha; do
git log -1 --format=%B "$sha" > "$tmp"
if ! vendor/bin/captainhook hook:commit-msg \
--configuration=captainhook.json \
--bootstrap=vendor/autoload.php \
"$tmp"; then
subject=$(git log -1 --format=%s "$sha")
echo "::error::Commit $sha does not follow Conventional Commits: $subject"
failed=1
fi
done < <(git rev-list "$BASE_SHA..$HEAD_SHA")
exit "$failed"
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.5.0
uses: dependabot/fetch-metadata@v3.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v3
uses: ramsey/composer-install@v4

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
workflow_dispatch:

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v6
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 13 additions & 11 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2]
laravel: [11.*, 10.*]
php: [8.4, 8.3, 8.2]
laravel: [12.*, 11.*]
stability: [prefer-lowest, prefer-stable]
# include:
# - laravel: 11.*
# testbench: 9.*
# carbon: ^2.63
# - laravel: 10.*
# testbench: 8.*
# carbon: ^2.63
include:
- laravel: 12.*
testbench: 10.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 12.*
php: 8.2

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -48,8 +49,9 @@ jobs:

- name: Install dependencies
run: |
composer install --no-interaction
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-update --no-interaction
composer require --dev "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-update --no-interaction
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --with-all-dependencies

- name: List Installed Dependencies
run: composer show -D
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/update-changelog.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"branches": ["main", { "name": "beta", "prerelease": true }, { "name": "alpha", "prerelease": true }],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogTitle": "# Changelog\n\nAll notable changes to `Bagisto Visual` will be documented in this file."
}
],
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]"
}
],
"@semantic-release/github"
]
}
29 changes: 16 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@

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

## v2.0.0-alpha.3 - 2026-01-09
# [2.0.0-alpha.5](https://github.com/bagistoplus/visual/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2026-05-04)

### Features

- Add Typography and TypographyPresets setting types with visual editor support
- Add subfolder support and editor attributes to block and section generation commands
- Add min, max, and step methods to Number setting class
- Persist current template and selected block across page reloads

### Bug Fixes

- Resolve critical bugs in theme generation command
* forward encrypted session cookie to preview sub-request to prevent CSRF mismatch on database session driver ([9ae8a6c](https://github.com/bagistoplus/visual/commit/9ae8a6c39b0735ed1071b63020f4819cf7828d90))
* lazy-load Theme::$settings to prevent uninitialized property error in Livewire updates ([17cf477](https://github.com/bagistoplus/visual/commit/17cf47722c98d933fab74b72133fadb671b80199))
* refresh parent of repeated block on child reorder ([a9f175b](https://github.com/bagistoplus/visual/commit/a9f175bbfc61997b1b31055c0ff8c2435f6a1aa3))
* use regionId instead of regionName in block filter ([75e6f68](https://github.com/bagistoplus/visual/commit/75e6f6876d8b606b210de62656ce4e31370c724a))

### Documentation

- Add Spacing setting type documentation

### Testing
### Features

- Add tests for frontend code
* add data-morph-ignore support to morphdom handler ([05218ee](https://github.com/bagistoplus/visual/commit/05218ee161778b9adc29ed1208fa548acc0e523c))
* add discoverPresetsIn method ([ef45f05](https://github.com/bagistoplus/visual/commit/ef45f05c8e02d75579f5c056e6efe146d906c92e))
* add font weight and style support for typography presets based on selected font ([df048ea](https://github.com/bagistoplus/visual/commit/df048eae0ae3885365d088d5e940b75a28348d53))
* add inline rename support for typography presets ([6fce38b](https://github.com/bagistoplus/visual/commit/6fce38b91f48b2124af7de76608847763e2dde50))
* add isResponsiveValue and getResponsiveValue utilities to Visual ([a9ec37f](https://github.com/bagistoplus/visual/commit/a9ec37f002146ec21eb71fe5fedf2c968f719e10))
* add section alias for block in SimpleSection ([0007a28](https://github.com/bagistoplus/visual/commit/0007a28b1bb1f4a527dff1b8ee854721ef48817a))
* add shared Events interface for cross-package Livewire events ([916e7df](https://github.com/bagistoplus/visual/commit/916e7dfa5f63c4d1878f63d7ae0c53dcd75c16d6))
* allow 'auto' value in SpacingValue properties ([74af973](https://github.com/bagistoplus/visual/commit/74af97357ecc3d77e644d91112db98996aebade6))
* discover theme presets from provider ([fad128f](https://github.com/bagistoplus/visual/commit/fad128fd04c588115b4ac4262338dad8690d2c72))
* merge positions field in mergeUpdates ([19c5030](https://github.com/bagistoplus/visual/commit/19c5030d53afc8041f97bf49224abf00398250e6))

## v2.0.0-alpha.2 - 2025-12-30

Expand Down
21 changes: 20 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,30 @@ If you’re fixing a bug:

### 5. Commit with a Clear Message

All commits must follow the [Conventional Commits](https://www.conventionalcommits.org) specification. The `commit-msg` git hook (installed automatically by Composer through CaptainHook) validates the message format locally, and a GitHub Actions workflow re-validates every commit on every pull request.

```bash
git add .
git commit -m "Fix: correct section layout misalignment"
git commit -m "fix: correct section layout misalignment"
```

#### Allowed types

| Type | Use for |
| --- | --- |
| `feat` | New user-facing feature |
| `fix` | Bug fix |
| `refactor` | Code change that neither adds a feature nor fixes a bug |
| `perf` | Performance improvement |
| `style` | Formatting, whitespace, missing semicolons (no logic change) |
| `test` | Adding or correcting tests |
| `docs` | Documentation only |
| `build` | Build system or external dependencies |
| `ci` | CI configuration and workflows |
| `chore` | Other changes that do not modify source or tests |

A scope is optional and uses kebab-case (e.g. `feat(editor): ...`). Breaking changes use a `!` after the type/scope or a `BREAKING CHANGE:` footer, and trigger a major version bump on the next release.

### 6. Submit a Pull Request

Go to the main repo and submit your pull request from your fork.
Expand Down
66 changes: 66 additions & 0 deletions captainhook.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "vendor/bin/pint --test",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
},
{
"action": "composer analyse",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
},
{
"action": "composer test",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
}
]
},
"commit-msg": {
"enabled": true,
"actions": [
{
"action": "\\Ramsey\\CaptainHook\\ValidateConventionalCommit",
"options": {
"config": {
"typeCase": "kebab",
"types": [
"feat",
"fix",
"refactor",
"chore",
"test",
"docs",
"perf",
"ci",
"build",
"style"
],
"scopeRequired": false,
"scopeCase": "kebab",
"descriptionCase": null,
"descriptionEndMark": null,
"bodyRequired": false,
"bodyWrapWidth": 0,
"requiredFooters": []
}
}
}
]
}
}
34 changes: 19 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,34 @@
"require": {
"php": "^8.2",
"andreiio/blade-remix-icon": "^3.6",
"bagistoplus/couleur": "^0.2.0",
"blade-ui-kit/blade-heroicons": "^2.4",
"blade-ui-kit/blade-icons": "^1.7",
"craftile/laravel": "^0.5",
"craftile/laravel": "^0.6",
"illuminate/contracts": "^11.0||^12.0",
"mallardduck/blade-lucide-icons": "^1.23",
"matthieumastadenis/couleur": "^0.1.2",
"mews/purifier": "^3.4",
"spatie/browsershot": "^3.61||^5.0",
"spatie/once": "^3.1",
"symfony/filesystem": "^6.4"
},
"require-dev": {
"archielite/laravel-facade-docblock-generator": "^1.0",
"bagisto/bagisto": "^2.3",
"calebdw/larastan-livewire": "^1.1",
"larastan/larastan": "^2.9",
"bagisto/bagisto": "^2.3||^2.4",
"calebdw/larastan-livewire": "^2.5",
"captainhook/captainhook": "^5.25",
"larastan/larastan": "^3.9",
"laravel/pint": "^1.14",
"livewire/livewire": "^3.6",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.1.1||^7.10.0",
"orchestra/testbench": "^9.0.0||^8.22.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-laravel": "^2.3",
"nunomaduro/collision": "^8.1.1||^9.0",
"orchestra/testbench": "^9.0.0||^10.0.0",
"pestphp/pest": "^2.34||^3.8||^4.3",
"pestphp/pest-plugin-arch": "^2.7||^3.0||^4.0",
"pestphp/pest-plugin-laravel": "^2.3||^3.0||^4.0",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3"
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"ramsey/conventional-commits": "^1.6"
},
"autoload": {
"files": [
Expand All @@ -68,14 +69,17 @@
}
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"post-autoload-dump": [
"@composer run prepare",
"@composer run captainhook:install"
],
"captainhook:install": "@php -r \"if (is_dir('.git') && is_file('vendor/bin/captainhook')) { passthru('vendor/bin/captainhook install -f -s --quiet'); }\"",
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
"@php vendor/bin/testbench workbench:build --ansi"
],
"ide-helper": "@php vendor/bin/testbench facade-docblock:generate src/Facades",
"start": [
"Composer\\Config::disableProcessTimeout",
"@composer run build",
Expand Down
Loading
Loading