Skip to content

chore: migrate to namespaced lvt-* attributes (Phase 2E)#53

Merged
adnaan merged 4 commits intomainfrom
chore/attr-reduction-phase-2e
Apr 4, 2026
Merged

chore: migrate to namespaced lvt-* attributes (Phase 2E)#53
adnaan merged 4 commits intomainfrom
chore/attr-reduction-phase-2e

Conversation

@adnaan
Copy link
Copy Markdown
Contributor

@adnaan adnaan commented Apr 4, 2026

Summary

Phase 2E of the attribute reduction proposal. Early migration of the examples repo to provide hands-on feedback on the new attribute syntax.

  • Bump livetemplate v0.8.14 → v0.8.15 (Phase 1B)
  • lvt-scrolllvt-fx:scroll (chat)
  • lvt-preservelvt-form:preserve (shared-notepad)
  • lvt-no-interceptlvt-form:no-intercept (login, x2)
  • lvt-upload stays as-is (avatar-upload)
  • Skip todos/ — imports lvt/components, deferred to Phase 4
  • Update README.md and CLAUDE.md documentation

Test plan

  • All 8 examples pass ./test-all.sh (chromedp E2E)
  • Zero deprecated attribute references remain in templates (outside todos/)
  • go.mod points to livetemplate v0.8.15

🤖 Generated with Claude Code

Bump livetemplate v0.8.14 → v0.8.15 and migrate template attributes
to the new namespaced syntax:

- lvt-scroll → lvt-fx:scroll (chat)
- lvt-preserve → lvt-form:preserve (shared-notepad)
- lvt-no-intercept → lvt-form:no-intercept (login)
- lvt-upload stays as-is (avatar-upload)

Skip todos/ — imports lvt/components, migrated in Phase 4.

Update README.md and CLAUDE.md documentation to reflect new
attribute names, fix tier classifications, and remove deprecated
lvt-submit from action resolution order.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 4, 2026 11:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Phase 2E of the attribute reduction proposal: migrate example templates/docs to the new namespaced lvt-* attribute syntax and bump the core LiveTemplate dependency to v0.8.15, providing early feedback from the examples repo.

Changes:

  • Bump github.com/livetemplate/livetemplate from v0.8.14v0.8.15.
  • Migrate example templates to namespaced attributes (lvt-scrolllvt-fx:scroll, lvt-preservelvt-form:preserve, lvt-no-interceptlvt-form:no-intercept).
  • Update repo docs (README/CLAUDE + internal plan doc) to reflect the new attribute names.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shared-notepad/notepad.tmpl Replace lvt-preserve with lvt-form:preserve on the main form.
chat/chat.tmpl Replace lvt-scroll with lvt-fx:scroll on the messages container.
login/templates/auth.html Replace lvt-no-intercept with lvt-form:no-intercept for login/logout forms (and update comments).
README.md Update example table + dependency version to reflect new attributes and v0.8.15.
CLAUDE.md Update Tier 2 attribute list and action-resolution documentation to match new syntax.
docs/plans/improve-ui-ux.md Update plan text referencing lvt-scroll to lvt-fx:scroll.
go.mod Bump github.com/livetemplate/livetemplate requirement to v0.8.15.
go.sum Update sums for github.com/livetemplate/livetemplate v0.8.15.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

4. Default: `"submit"`
1. Clicked button's `name` attribute
2. Form's `name` attribute
3. Default: `"submit"`
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated action resolution order removes lvt-submit, but this repo still documents and demonstrates lvt-submit elsewhere (e.g., chat/README.md, counter/README.md, progressive-enhancement/README.md, ws-disabled/README.md). Either keep lvt-submit in this list or update the other docs so contributor guidance is consistent across the repo.

Suggested change
3. Default: `"submit"`
3. Default: `"lvt-submit"`

Copilot uses AI. Check for mistakes.
adnaan and others added 3 commits April 4, 2026 20:01
…ences

- counter/README.md: Update from old Store/Change API to Controller+State,
  replace lvt-click/lvt-submit with button name routing, update attribute list
- chat/README.md: Replace lvt-submit with form name routing in code examples
- progressive-enhancement/README.md: Replace lvt-submit/lvt-action with
  standard HTML form patterns
- ws-disabled/README.md: Remove lvt-submit/lvt-click references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace lvt-upload="avatar" with standard <input type="file" name="avatar">
in a form with enctype="multipart/form-data". The client detects file
inputs and submits via HTTP fetch with FormData.

- Remove lvt-upload attribute, add name="avatar" and enctype
- Keep .lvt.Uploads progress block (works with HTTP upload too)
- Remove WebSocket upload event listener script block
- Remove UploadAvatarComplete (WebSocket auto-complete callback)
- Simplify WithUpload config (remove WS-specific AutoUpload/ChunkSize)
- Update E2E test to use JS DataTransfer API for file input
- Bump livetemplate v0.8.15 → v0.8.16

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove verbose debug window variables, fetch interceptor, and error
state captures from the upload test. The Tier 1 file upload path is
working — simplify to core test logic only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adnaan adnaan merged commit 5054ed6 into main Apr 4, 2026
9 checks passed
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.

2 participants