Changelog
All notable changes to htmforge are documented here. Format: Keep a Changelog. Versioning: Semantic Versioning.
[0.3.1] - 2026-05-06
Documentation
- Completed all missing component reference pages: Spinner, Tabs, Toast, Accordion, Dropdown, SelectField, CheckboxField, RadioGroup, FormGroup, Form
- Fixed MkDocs navigation to include full component list
- Corrected broken relative links in release notes
- Fixed Quickstart code blocks (proper fenced syntax)
- Expanded homepage feature list with full capabilities overview
Changed
- README.md fully revised for improved clarity, structure, and onboarding experience
Quality
- mkdocs build passes with --strict (0 warnings, 0 errors)
[0.3.0] - 2026-05-06
Block F — DataTable Enhancements
ColumnDefclass: Structured column definition (key, label, sortable, width)dict_rowssupport: Render from list[dict[str, str]] (backward-compatible with list[list[str]])- Sortable headers: ColumnDef.sortable renders hx-get links with sort/direction parameters
- Sort tracking: sort_url, current_sort, sort_dir fields for sort direction flip logic
- Full API stability: No breaking changes to existing DataTable usage
Block G — New Components (5)
Spinner: Accessible loading indicator with SpinnerSize enum (SM/MD/LG), role/aria-labelTabs: Tab navigation with HTMX lazy-load per inactive tab, active state trackingToast: Timed notifications with ToastVariant enum, hx-swap-oob, auto-dismiss durationAccordion: Collapsible sections using<details>/<summary>, open_index controlDropdown: Trigger button with dropdown menu items, optional HTMX toggle URL- 25 component tests covering render logic, HTMX attributes, edge cases
Block H — Forms System (5 Components)
SelectField: Dropdown select with typed options list, optional labelCheckboxField: Single checkbox with inline label and error displayRadioGroup: Fieldset with multiple radio inputs, legend, error supportFormGroup: Layout container for multiple fields with optional legendForm: Main form wrapper with auto-error injection pattern and HTMX submit- Auto-error injection: Matches field names to errors dict, clones field with error boundary
- HTMX integration: Optional hx_post, hx_target, hx_swap for progressive enhancement
- 22 form tests covering form structure, error injection, HTMX attributes
Block I — API Extensions
Element.__eq__and__hash__: Compare rendered HTML for equality, enable deduplicationComponent.clone(**overrides): Create new instance with changed propertiesComponent.to_fragment(): Explicit HTMX fragment rendering methodhtmforge.render(): Top-level convenience function for Element/Component renderinghtmforge.when(): Conditional rendering helper (returns Element or None)
Block J — Testing Infrastructure
- tests/test_framework_adapters.py (14 tests):
- FastAPI adapter: 3 tests for to_fastapi() HTMLResponse integration
- Flask adapter: 6 tests for to_flask() Response with content-type
- Django adapter: 5 tests (auto-skipped if not installed)
- Error handling: ImportError tests for missing framework imports
- tests/test_snapshots.py (21 tests):
- Regression detection via HTML snapshots
- Auto-create snapshots in tests/snapshots/ on first run
- Compare rendered HTML against stored snapshots on subsequent runs
- Full component coverage: all 20+ components
- tests/test_performance.py (5 benchmarks):
- Element rendering: 1000 iterations <1 second
- Nested elements (ul/li): 1000 iterations <1 second
- DataTable (10 rows): 1000 renders <2 seconds
- Alert rendering: 1000 renders <1 second
- render() helper: 1000 calls <1 second
- tests/snapshots/ directory: Machine-generated HTML snapshots (added to .gitignore)
Quality & Testing
- 238 tests passing + 5 skipped (Django optional dependency)
- mypy --strict: All 22 source files clean, 0 errors
- ruff: Lint and format checks passing
- Full backwards compatibility: All v0.2.x APIs continue working
- Type checking: mypy strict mode, 22 source files
- Linting: ruff checks pass, 22 files formatted
- Documentation: Full API reference for new components
- Component organization: Clear categorization in README (Layout, Data Display, Navigation, Forms)
[0.2.2] - 2026-04-29
Added
- Component reference pages now include full props tables with types, defaults, and descriptions for all fields
- Rendered HTML output blocks on all component pages (Alert, Badge, Breadcrumb, DataTable, FormField, Modal, Page, Pagination, SearchInput)
- Quickstart guide rewritten with complete runnable Flask example including rendered output
- Core Concepts page: attribute mapping table and expanded Mermaid architecture diagram
- Framework Adapters guide: full embedded FastAPI, Flask, and Django code examples
- Contributing guide: full CONTRIBUTING.md content embedded in docs site
Fixed
- OVERVIEW.md merge conflict in Roadmap table resolved
- Spinner row removed from Ready-made components table (not yet implemented)
- Next Implementation Blocks section updated to Blocks F–J
- CONTRIBUTING.md Good First Issues updated to reflect actual open tasks
[0.2.1] - 2026-04-29
Fixed
- README LICENSE badge now links to absolute GitHub URL (https://github.com/mondi04/htmforge/blob/main/LICENSE)
- README Docs badge corrected to point to GitHub Pages (https://mondi04.github.io/htmforge/)
[0.2.0] - 2026-04-28
Added
- 25 new element factories: dialog, details, summary, fieldset, legend, progress, meter, kbd, abbr, time, address, mark, small, sub, sup, caption, colgroup, col, source, track, audio, video, picture, map_, area, iframe, canvas
- Badge component with BadgeVariant enum (default/primary/success/ warning/danger)
- Breadcrumb component with aria-current support
- Modal component with HTMX content loading via data-attribute + inline script (no onclick escaping issues)
- SearchInput component with configurable debounce via search_url and search_target fields
- hx_keyup_delay(ms) helper function in htmforge.htmx
- Component.repr for readable debug output
- mkdocs-material documentation site with full API reference, guides, and example apps
- GitHub Actions: docs deploy to GitHub Pages (docs.yml)
- GitHub Actions: automated GitHub Release on tag push (release.yml)
- Python 3.13 added to CI test matrix
- MIT + Commons Clause license (replaces pure MIT)
- release.py and push.py scripts for reproducible PyPI releases
- Flask example app (examples/flask_demo.py)
Fixed
- Alert dismiss button replaced with JS onclick (was broken: hx-get="" triggered a GET to the current URL)
- Modal trigger button used onclick with markupsafe-escaped single quotes breaking JS; replaced with data-modal-target attribute and inline script
- Page._body_content None values now explicitly filtered before passing to body() element
- version fallback changed from "0.1.2" to "0.0.0" to avoid confusion when package is not pip-installed
Changed
- SearchInput fields renamed: hx_url → search_url, hx_target → search_target (avoided conflict with inherited Component HTMX fields)
[0.1.2] - 2026-03-12
Added
- DataTable component with optional HTMX reload
- Alert component with AlertVariant enum and JS-dismissible option
- Pagination component with Previous/Next and HTMX targeting
- Page abstract base class with DOCTYPE, head elements, css/js URLs
- FormField component with 8 input types and error display
- safe_html() function for trusted HTML content
- raw() helper for unescaped script/style content
- Framework adapters: to_fastapi(), to_flask(), to_django()
- FastAPI demo app (examples/fastapi_demo.py)
Fixed
- importlib.metadata version with PackageNotFoundError fallback
- Pagination.hx_target made optional (empty string default)
- init_subclass signature corrected to **kwargs: Any
- Page removed from components/init.py (it is abstract)
- Deprecated ANN101/ANN102 ruff ignores removed from pyproject.toml
[0.1.0] - 2026-03-12
Added
- Element class: recursive to_html(), void elements, attribute mapping (cls→class, for_→for, hx_get→hx-get), XSS escaping via markupsafe
- Component abstract base class: Pydantic v2, validate_assignment, abstract render(), to_html(), htmx_attrs()
- 60+ HTML5 element factories in htmforge.elements
- HTMX enums: HxSwap, HxTrigger, HxTarget, HxPushUrl
- py.typed marker (PEP 561)
- CI via GitHub Actions: pytest + mypy + ruff, Python 3.11/3.12
- MIT License