Skip to content

Fixes2#9

Merged
matej21 merged 13 commits intomainfrom
fixes2
Apr 2, 2026
Merged

Fixes2#9
matej21 merged 13 commits intomainfrom
fixes2

Conversation

@matej21
Copy link
Copy Markdown
Member

@matej21 matej21 commented Apr 2, 2026

No description provided.

matej21 and others added 13 commits April 2, 2026 14:09
…hook

Public API (children callbacks, createComponent props) now uses EntityRef
instead of EntityAccessor. New useAccessor hook converts any Ref to its
Accessor variant with store subscription. createComponent render functions
receive EntityAccessor for explicit selection (factory calls useAccessor
internally) and EntityRef for implicit selection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Examples use createComponent with explicit selection + direct accessor
access, or <Field> components for implicit selection. Tests use
useAccessor/useField in extracted helper components.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…props

Attribute subscribes to a scalar field, maps it to HTML attributes via
format function, and applies them to the child element via cloneElement.
Participates in selection collection (registers field + analyzes children).

Replaces createComponent+useAccessor pattern for inline tag rendering
in examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When VITE_BINDX_DEV_ANNOTATIONS=true, JSX components automatically
inject semantic data attributes onto child elements via cloneElement:
- Entity: data-entity, data-entity-id
- Field: data-field (on children result or span wrapper for text)
- HasMany items: data-entity, data-entity-id (target entity)
- HasOne: data-relation
- Attribute: data-field
- EntityList items: data-entity, data-entity-id

Uses import.meta.env for proper dead code elimination in production.
No runtime overhead when disabled — bundler removes the code paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New agent-browser version requires explicit --no-sandbox on Linux
systems with restricted unprivileged user namespaces (AppArmor).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AppArmor profile for agent-browser's bundled Chrome is now installed
at /etc/apparmor.d/playwright-chromium, granting userns capability.
The --no-sandbox flag is no longer needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ponents

Add EntityRef vs EntityAccessor explanation, Attribute component docs,
useAccessor/useField hook usage, Attribute ordering rules, and updated
createComponent implicit/explicit mode differences.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restructured as comprehensive Bindx React Guide covering:
- useEntity/useEntityList with status handling and selection definers
- usePersist/usePersistEntity with field-level persistence
- Undo/redo with manual grouping
- Event listeners and interceptors
- Error handling (useEntityErrors + inline errors)
- Provider setup (BindxProvider, ContemberBindxProvider)
- MockAdapter testing patterns
- Selection collection internals

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nches

Remove the special `isBindxComponent` branch from the JSX analyzer,
reducing from 3 selection collection paths to 2 (getSelection + staticRender).

createComponent components now go through the generic getSelection path
like Field, HasOne, HasMany, If, Show. The SCOPE_REF handling previously
in handleBindxComponent is moved to createGetSelection in componentFactory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Test that explicit fragment components nested inside <If> (both then and
else branches) correctly contribute their selection to the parent query.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d unwrapPaginateFields

- HasManyListHandle.extractItems: support object-with-numeric-keys format
  when store serializes arrays as objects
- unwrapPaginateFields: handle plain arrays (not just paginate connections),
  recurse into nested fields for array items, handle has-many without isArray flag
- Export unwrapPaginateFields for testability

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- unwrapPaginateFields: paginate connection, plain arrays, nested recursion,
  missing isArray flag, null values, extra field preservation
- selectionCollection: createComponent fragments inside <If> via
  collectSelection + createCollectorProxy path (then/else branches, HasMany)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matej21 matej21 merged commit 5a8eba8 into main Apr 2, 2026
3 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.

1 participant