You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opt-in typed field indexes (PhoenixKitEntities.FieldIndexes). A field
definition's "indexed" ("numeric", "text" or "date", set in the
entity form's field editor) asks for a btree expression index on that
field's value. Indexes are built and dropped at runtime after an entity
save (CREATE INDEX CONCURRENTLY, serialised per entity), not by
migrations; config :phoenix_kit_entities, field_indexes: :manual leaves
the syncing to the host (sync/2, sync_all/1). A value that does not
cast is NULL in the index and never fails a write. (PR #59)
PhoenixKitEntities.FieldQuery (list/3, count/3, build/3) filters
and orders an entity's records by field values through the same SQL
expressions the indexes are built on, so an indexed field's filter uses its
index. (PR #59)
A daily repair job (PhoenixKitEntities.FieldIndexRepairWorker, declared
by oban_crons/0) rebuilds missing or INVALID field indexes and drops
nothing else. (PR #59)
Cloudflare Turnstile on the public form, per entity, on a connection
chosen from core's website integrations. A refused or missing token applies
the configured action; no verdict from Cloudflare fails closed; a
switched-on option whose connection cannot verify lets the submission
through, logged, counted and flagged on the stored record. The module's JS
bundle starts the widget on pages that are not LiveViews. The host allows https://challenges.cloudflare.com in script-src and frame-src.
(PR #57)
The public form renders and answers in the page's language. Title,
description, submit text and success message are translatable per language
in the builder; field labels, placeholders, help texts and options use each
field's own translations; the component takes an optional locale
attribute. Stored submissions stay flat. German and French catalogues carry
the visitor-facing strings. (PR #58)
FormBuilder.translated_placeholder/2, translated_description/2 and a
public lookup_translation/2.
A Content-Security-Policy lint test: no inline event handler, and no inline <script> / <style> without the page's nonce.
Changed
Core pin raised to >= 3.7.0 and < 4.0.0: the Turnstile option calls PhoenixKit.Integrations.Turnstile, which first ships in core 3.7.0.
The migration chain is at V3. V2 adds the IMMUTABLE SQL functions the
field indexes and FieldQuery share; V3 re-declares the date cast as plain
SQL (see Fixed). No table shape changes. Run mix phoenix_kit.update.
mix phoenix_kit_entities.import builds the imported entities' field
indexes before it returns.
Dependencies refreshed, including phoenix_kit 3.10.0 and db_connection
2.10.3 (the 2.10.2 lock was flagged by mix hex.audit).
Fixed
The date cast behind date indexes and filters is plain SQL, with no
PL/pgSQL EXCEPTION block: such a function cannot be PARALLEL SAFE on
Postgres before 17, where a parallel scan or a parallel index build would
fail with "cannot start subtransactions during a parallel operation".
Saving the entity form no longer drops stored public-form texts of a
language the page did not post, and the primary-language texts are read
from the submit itself, so an edit made just before pressing Enter is kept.
A cleared submit text or success message falls back to the built-in
default instead of rendering blank.
The builder's security selects save their value (a select's change event
carries its name, not a phx-value-*), and security toggle and select
events accept only the settings and values the page offers.