Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Publisher

- [ ] Release notes in [draft GitHub release](https://github.com/8fold/laravel-provider/releases) are up to date?
- [ ] Release notes in [draft GitHub release](https://github.com/8fold/php-html-builder/releases) are up to date?
- [ ] Committer checklist is complete.
- [ ] Merge PR.
- [ ] Publish GitHub release using `master` with correct version number.
- [ ] Publish GitHub release using `main` with correct version number.
- [ ] Create draft GitHub release to prepare next release.

## Committer
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,24 @@ apply to the new and existing APIs.
### Required migration checks: markup and property targets

Text-entry controls now render an outer `<div>` unconditionally. In 4.4.0,
`TextInput` and `EmailInput` rendered their label and input as siblings without
`TextInput`, `EmailInput`, and `Password` rendered their label and input as siblings without
that container. Update CSS child/sibling selectors, flex or grid layouts, and
JavaScript traversal that assumed the old structure.

```html
<!-- 4.4.0 -->
<label for="email">Email</label><input id="email" name="email" type="text" value="">
<label for="email">Email</label><input id="email" name="email" type="text">

<!-- 5.0 -->
<div class="field">
<label for="email">Email</label><input id="email" name="email" type="text" value="">
<label for="email">Email</label><input id="email" name="email" type="text">
</div>
```

Use each property method for its element: `containerProps()` targets the outer
container, `labelProps()` targets the label (or a Select group's legend), and
`inputProps()` targets the input or select. For example:
`inputProps()` targets the input, textarea, or select. Fieldset's `labelProps()`
targets its legend. For example:

```php
use Eightfold\HtmlBuilder\Forms\TextInput;
Expand Down Expand Up @@ -140,6 +141,13 @@ ignored; use the selection argument and mode methods instead. See
[Select attributes and selection](#select-attributes-and-selection) for native
attribute targets and examples.

Radio and checkbox member IDs now use `<control-id>-option-<zero-based-index>`
instead of `<name>-<option-value>`. For example, option `a` in a group named
`categories` changes from `categories-a` to `categories-option-0`. Generated
labels follow the new IDs automatically; update external labels, CSS selectors,
and JavaScript that reference the old IDs. `id()` changes the group's member-ID
prefix, not its submitted name.

### Update custom PropertyInterface implementations

`PropertyInterface` now extends PHP's `Stringable`. Any custom implementation
Expand Down
Loading