Skip to content

0.1.4-rc.8

Pre-release
Pre-release

Choose a tag to compare

@FedericoAlcantara FedericoAlcantara released this 28 May 20:15
· 3 commits to main since this release
a1f84a4

v0.1.4-rc.8

Ash Framework improved support - Changes in this release comes from the experience of adopting aurora_uix on real applications

Requires:

  • Elixir 1.17+
  • Phoenix 1.8+
  • Phoenix LiveView 1.1+
  • Ecto 3.13+

Added

  • File-upload support via data.upload field config #251

    • A resource field can now carry a LiveView upload by setting data: %{upload: %{allow: [...], consume: &fun/1}}.
    • The library registers uploads via allow_upload/3, renders live_file_input with entry progress and cancel buttons, and invokes the :consume callback on save.
    • Purely additive — fields without data.upload are unaffected.
    • See guides/core/resource_metadata.md for the data.upload configuration reference.
  • Actor threading for policy-protected Ash resources #253

    • auix_resource_metadata accepts ash_actor_assign: :current_user (or any other socket-assigns key). The named actor is forwarded as actor: to every generated Ash call: Ash.read/2, Ash.get/3, Ash.create/3, Ash.update/3, Ash.destroy/2, Ash.load/3, and AshPhoenix.Form.for_update/3.
    • Backward-compatible: omitting ash_actor_assign keeps the previous behaviour. A nil actor (assign missing or unset) is also a no-op — no actor: is added.
    • authorize?: is never set explicitly; the host domain's authorize config (:by_default / :when_requested / :always) continues to decide whether policies run.
    • Forbidden reads on policy-protected resources now render an empty index (instead of crashing) — Ash.Error.Forbidden is translated to an empty list for list/2, list_function_paginated/2, and to_page/4. Writes still propagate the error so the form handler can flash it.
    • Adds a new socket_opts/2 callback to the Aurora.Uix.Integration.Crud behaviour; the Ash backend resolves the actor from socket.assigns, the Ctx backend ignores it. Connector stays neutral — the new actor_assign field lives on the Ash CrudSpec.
    • See guides/core/ash_integration.md#authorization--policies.
  • Styling guide and customization scaffold — new Styling guide; mix auix.gen.stylesheet --custom seeds an opt-in auix-custom.css stub for token-level overrides (add --force to refresh an existing stub).

  • Non-Tailwind baseline stylesheet (opt-in)mix auix.gen.stylesheet --baseline scaffolds assets/css/auix-baseline.css, a tag-selector reset (html, body, a) for hosts without a CSS preflight. Host-owned once created; refresh with --baseline --force. Tailwind hosts skip the flag and the file. See Hosts without Tailwind.

Changed

  • Stylesheet split for host-theme inheritance #259
    • mix auix.gen.stylesheet now writes three files instead of one:
      • auix-variables.css — all :root / --auix-* custom-property declarations (sizes, colors, shadows, palette variants).
      • auix-rules.css — all .auix-* component rules that consume those variables.
      • auix-stylesheet.css — back-compat shim that re-imports the two files above. Existing hosts importing only this file continue to work unchanged.
    • On first run the task also copies assets/css/auix-bridge-daisyui.css into the host project — a small CSS file that maps daisyUI v5 tokens (--color-primary, --color-base-100, --radius-field, …) onto --auix-* variables so Aurora UIX components follow the host theme automatically. The file is treated as user-editable and is not overwritten on subsequent runs; pass --force to refresh it from the library version.
    • Hosts using Tailwind v4 + daisyUI import the files in this order in app.css:
      @import "auix-variables.css";
      @import "auix-bridge-daisyui.css";
      :root { /* optional per-host overrides */ }
      @import "auix-rules.css";
    • Added guides/advanced/writing_a_style_bridge.md — a guide for authoring a custom bridge for any design system other than daisyUI.
    • ThemeHelper gained two new public functions: generate_variables_stylesheet/0 and generate_rules_stylesheet/0.

CSS class changes

  • .auix-button no longer carries structural rules (display, border-*, padding, font-*).
    Structure has moved to .auix-button-default, which is now auto-applied by the <.button>
    component. Hosts that selected .auix-button to override padding or borders should switch
    their selector to .auix-button-default.
  • .auix-button-default is now a public/semi-public class. Hosts that previously applied
    .auix-button directly (without going through <.button>) will now receive only the color
    rules. Add .auix-button-default explicitly to restore the structural styles.
  • .auix-index-all-action-button lost its structural declarations (previously duplicated
    from .auix-button). Visible behaviour is identical when the button is rendered through
    <.button> as intended, because .auix-button-default is auto-applied.