Skip to content

javaabu/forms v2.0: Onu and Bootstrap 6, parity with @javaabu/forms, assets via manifest - #16

Open
n4ff4h wants to merge 10 commits into
mainfrom
next-gen
Open

n4ff4h wants to merge 10 commits into
mainfrom
next-gen

Conversation

@n4ff4h

@n4ff4h n4ff4h commented Nov 4, 2026

Copy link
Copy Markdown

javaabu/forms v2.0, the next-gen rework (epic #15). This PR is for review only; please don't merge until you're ready to release v2. main stays on 1.x until then.

What's in it

Upgrade notes

The full guide is docs/upgrading.md. The short version:

  • Requires PHP 8.4+ and Laravel 12+.
  • Component names and attributes are unchanged, but the markup is now Onu or Bootstrap 6. Apps on Bootstrap 5 or Material Admin should stay on ^1.71.
  • Config: framework defaults to onu, framework keys are snake_case, and icons move to one icons array (inline Lucide SVG; icon-font classes still work).
  • Assets load automatically through javaabu/manifest. Set FORMS_STYLES=false when your Tailwind build imports resources/css/onu.css. Google Maps and TinyMCE are still pushed to @stack('scripts').
  • Strings v1 hard-coded are now forms::strings. Arrays are joined with , , and bound dates use the picker's format.

Before releasing (for you)

  • Review the Dhivehi lines listed in docs/advanced-usage/translations-and-rtl.md (written by an AI).
  • Make sure CODECOV_TOKEN is set for the org, so coverage and the badge work (the upload step runs but can't authenticate without it).
  • Release javaabu/manifest first. After that, drop the VCS repository from composer.json and require javaabu/manifest:^1.0.
  • When @javaabu/i18n installs (Add a prepare script so GitHub installs (github:Javaabu/i18n#main) get dist/ i18n#3, or once it's on npm), swap the temporary __() in resources/js/lang.ts.
  • Register the docs with docs.javaabu.com (Register with Javaabu Docs (docs.javaabu.com) #14).
  • Bootstrap 6 support targets 6.0.0-alpha.1; re-check the views against later pre-releases.
  • Merge, tag v2.0.0 and update the branch alias as you prefer.

🤖 Generated with Claude Code

n4ff4h and others added 9 commits November 4, 2026 12:41
- Require PHP ^8.4, illuminate ^12 || ^13, Testbench ^10 || ^11, PHPUnit ^11.5.3 || ^12.5.8
- Branch alias dev-next-gen => 2.x-dev
- Javaabu codestyle with Pint (pint.json), applied to the codebase and checked in CI
- tests.yml: PHP 8.4/8.5 x Laravel 12/13 x lowest/stable, coverage to Codecov from one leg
- README badges for tests, Codecov, Packagist and licence on next-gen
- javaabu/settings becomes optional: defaults come from forms.defaults, then get_setting()

Closes #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Remove the bootstrap-5 and material-admin-26 views and their tests
- New bootstrap-6 views targeting 6.0.0-alpha.1: .form-field layout,
  .form-control selects, .check/.radio inputs, btn-solid/btn-outline +
  .theme-*, native <dialog> modals, <details> accordions, menus,
  prefixed responsive classes (sm:col-3), aria-invalid on errors
- Framework-agnostic views move to forms::common and are used when a
  framework has no view of its own
- Framework class maps (Frameworks\Bootstrap6, Frameworks\Onu) for
  button colours, badges and alerts; Frameworks::register() for custom ones
- <x-forms::icon>: Lucide icons as inline SVG (generated by
  scripts/icons.mjs), or icon-font classes; one forms.icons config
- Snake_case framework config keys, translatable strings for
  Clear/Filter/Export/Apply/Select All/pagination
- Modal gets a size attribute
- Fix: errors lookup no longer needs a session; modal without a footer
- docs/upgrading.md

Closes #6
Closes #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ss-selector

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- resources/views/onu: every component, with the data-slot markup and
  class strings of the matching @javaabu/onu React component
- scripts/onu-classes.mjs server-renders Onu's components and writes
  resources/onu/classes.php; CI fails when it is out of date
- resources/css/onu.css for Tailwind apps (sources the views, styles native
  checkbox/radio/dialog/file inputs with Onu tokens); prebuilt dist/onu.css
  for apps without Tailwind, published with --tag=forms-assets
- onu is now the default framework
- Fix: paginator views no longer need component variables
- Smoke test renders every fixture view with every framework
- docs/frameworks/onu.md and bootstrap-6.md

Closes #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New components: error-summary, pagination, formatted-value
- Every field: form-group-class, thaana (dir/lang/data-thaana like Onu)
- Textarea auto-resize, number decimals
- Button size, start-icon, end-icon, loading; link-button disabled
- Select2 clearable, min-chars, parent
- Modal description and md size; errors first-only; file multiple;
  accordion item disabled; per-page label, show-label, per-page
- Form summary, summary-title, focus-on-error, error-bag
- Icons use data-icon-name, like Onu
- String keys aligned with @javaabu/forms locales; NoItems strings translatable
- docs/parity.md (Blade side of the matrix), react-forms#18 for open questions

Closes #9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assets (#10):
- Require javaabu/manifest (^1.0@dev, VCS). Assets::register() declares the
  package's assets; components declare what they need (DeclaresAssets) and
  manifest injects the tags once, in dependency order. JS alias:
  @javaabu/forms-blade (@javaabu/forms is the React package).
- resources/js (TypeScript, no jQuery): core behaviours (conditional display,
  select all, table sorting, submit spinner, focus on error, date clear,
  Thaana via @javaabu/onu/thaana, auto-resize, decimals, Onu dialog/tabs/
  alerts/menus), Tom Select selects with ajax and cascades, flatpickr dates
  (Dhivehi locale), file inputs and uploads, TinyMCE setup. Strings from
  lang/{en,dv} (temporary local __() until @javaabu/i18n is published).
- Vite build into dist/ with .vite/manifest.json (committed); Vitest suite;
  CI assets job runs lint, format, typecheck, tests with coverage, build diff.
- forms.assets (enabled, styles) and forms.wysiwyg.tinymce_url config.

Fixes:
- Textarea values are escaped; FormOpen/SearchForm pass framework correctly;
  table no-bulk works; empty-row colspan; form/row/infolist unbind their model
  after rendering; radios compare the bound value with their value (enums too)
- No duplicate value/id attributes; buttons without a type keep v1 behaviour
- Bound dates use the picker's format by default; time accepts date-format
- File max size works without javaabu/settings; image uploads pass max size
- Simple paginators; guests on conditional-link can; optional enable-value;
  Bootstrap 6 modal close button without a title; sort icons on headings
- Remove unreachable file-input partials

Closes #10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Docusaurus docs: intro, requirements, installation, upgrading, parity,
  frameworks, a reference page per component, advanced usage (configuration,
  assets, customizing views, custom frameworks, translations and RTL), AI
  assistants
- llms.txt with the rules and an index of every page
- AGENTS.md and CLAUDE.md for agents working on the repo
- resources/boost: guideline and javaabu-forms skill, with a component
  attribute reference generated from the constructors (checked in CI)
- lang/dv aligned with @javaabu/forms' Dhivehi, spelling fixes, every key
  translated; lines for human review listed in the translations page
- Dhivehi rendering tests; v2 changelog

Closes #11
Closes #12
Closes #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@n4ff4h n4ff4h mentioned this pull request Nov 4, 2026
9 of 10 tasks
… table no-bulk

- File types, mime types, extensions and size limits ship in
  Support\MimeTypes (resources/data/mime-types.php, the same lists as
  javaabu/helpers). When javaabu/helpers is installed it's still used, so
  types apps register there keep working; MimeTypes::register() for apps
  without it. format_file_size() is ported with translated units.
- javaabu/helpers moves to suggest/require-dev; CI fails if javaabu/settings
  or javaabu/helpers appear in the production dependency tree.
- <x-forms::table no-bulk> rendered nothing: the bulk form's open and close
  tags were in separate @if blocks. The table markup is now a partial,
  included inside the bulk form or on its own. The bulk form uses the
  slot's method.
- docs/upgrading.md, requirements, file inputs and changelog updated

Closes #17
Closes #18

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant