maragudk / maragudk/gomponents-htmx
htmx 4: remove and rename attributes
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 124
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Part of #18. Source: https://four.htmx.org/docs/whats-new-in-htmx-4 (Renames and Removals).
## Remove
| Helper | Reason |
|---|---|
| `Ext` | `hx-ext` removed; extensions load via ``. |
| `Disinherit` | Inheritance is explicit in htmx 4. |
| `History` | No localStorage history cache. |
| `Params` | Removed; use the `htmx:config:request` event. |
| `Request` | Replaced by `hx-config` (added in the new-attributes sub-issue). |
| `Prompt` | Moved to the `hx-prompt` extension; extensions are out of scope. |
| `DisabledElt` | Renamed to `hx-disable`, see below. |
## Rename with reversed meaning
- `hx-disable` now means what `hx-disabled-elt` meant: disable elements during a request. `Disable(v string)` keeps its name but gets the new meaning and the new doc comment. https://four.htmx.org/reference/attributes/hx-disable
- Old `hx-disable` (skip htmx processing) is now `hx-ignore`. Add `Ignore()` (bare attribute, no value). https://four.htmx.org/reference/attributes/hx-ignore
Call the meaning reversal out in the release notes for v0.7.0; it is the one change that silently breaks a template that compiles.
## Acceptance criteria
- The seven helpers above are removed, with their tests.
- `Disable` doc comment and test reflect the new semantics.
- `Ignore` exists with test and `Example`.
- `go vet` and tests pass.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the seven named helpers and their tests, then inspect Disable and the existing hx-disable behavior. Remove the listed helpers, add Ignore with its test and Example, update Disable's semantics and documentation, and record the reversal in the v0.7.0 release notes. Run go vet and the full test suite to verify completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- web-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100