Skip to content

PhoenixKit 2.7.0: Brand themes from config, upload progress and a roomier table

PhoenixKit 2.7.0 lets a site brand its colour themes from config, shows how an upload is going after the progress bar fills up, adds a roomier table view and makes the media picker clearer.

Themes from config

A site can now change PhoenixKit’s colour themes, or add its own, in config:

config :phoenix_kit, theme_definitions: %{
  "phoenix-dark" => %{variables: %{"--color-primary" => "oklch(72% 0.14 158)"}},
  "brand-light" => %{label: "Brand Light", base: :light, extends: "phoenix-light",
                     variables: %{"--color-primary" => "oklch(48% 0.13 158)"}}
}

A new theme appears in the theme picker by itself. The theme switching code, which existed in three diverging copies, is now one script, and the saved theme is applied before the page paints, with its colours, so a visitor with a dark system setting no longer sees dark mode over light colours. With exactly one light and one dark theme in :dashboard_themes, the picker becomes a single sun and moon toggle. The admin picker now follows :dashboard_themes too, where it always offered every theme. mix phoenix_kit.update adds the early theme script to layouts made by mix phx.new 1.8.

Uploads that say what is happening

Uploads now show the amount transferred, the speed and the time left while the file is sent. When the bar reaches 100%, a ticking “Processing on server…” clock takes over, so a large file that the server is still storing no longer looks stuck. This works in both upload component styles, the media picker and the media browser. In the media browser, each file shows its processing row before it is stored, and the summary message waits until the whole batch is done.

A comfortable table view

List tables get a third view next to compact rows and cards: the same table with more space in each cell. It is the default when a visitor has not picked a view yet. Drag handles in tables now stay visible as a muted grip that gets stronger on hover, where they used to appear only on hover.

A clearer media picker

The media picker can now carry a title naming what it is for, such as choosing an avatar or a cover image. A picker limited to one type of file without a title gets a heading by type, such as Select Image or Select Videos. On such a picker the search is hidden while there are fewer than ten files. An empty library gets its own message, a search without results offers Clear search, and in single mode a double-click picks the file. The grid no longer sits flush against the search bar.

Other changes

  • Translatable fields no longer show the “Content Language” header above the language tabs by default, and the tab strip uses the full width.
  • A new tree name cell lets modules show nested rows in a normal table, like a file explorer.
  • Admin tabs whose path has parameters, such as :uuid, no longer show in the sidebar with the placeholder in their link, unless they set visible: true.
  • Buttons accept variant="error", "info", "success" and "warning".
  • On sites that require a referral code, accounts that redeemed one in the past are no longer held back as if they had none.
  • Migration V173 adds four tables for attribute groups in the Catalogue module: groups, their attributes, the values and which item uses which group. A group still in use can only be archived, not deleted.

Upgrading

Run mix phoenix_kit.update for migration V173 and the theme script. List tables that have no stored view switch to the comfortable view. The unused PhoenixKit.ThemeConfig functions get_theme/0, theme_data_attributes/0 and modern_css_variables/0 are removed, so code that still calls them will not compile. The static phoenix_kit_themes.js file is gone, replaced by the new script.

Full release notes: PhoenixKit 2.7.0

2.7.0 · 15 August 2026

Catalogue gets reusable, translatable attribute groups; list tables grow a comfortable density between compact and cards; uploads say what is happening after the bar hits 100%. Chain moves V172 → V173 (#718).

Added

  • V173 — catalogue attribute groups. Four tables (groups / attributes / values / item assignments) for phoenix_kit_catalogue: a group owns ordered attributes, each attribute owns ordered values with an explicit is_default, and items link through a join table. One-group-per-item is a droppable UNIQUE (item_uuid) index, so multi-group later is not a data migration. Definition-tree FKs are RESTRICT; a group any item still references can only be archived. ExpectedSchema entries were emitted from a migrated database and chain_hash restamped (#718).

  • Core.TreeTable (<.tree_name_cell>). File-explorer name cell — depth indent, disclosure chevron, optional type icon — that composes into <.table_default> rows instead of replacing the table. The consumer owns the walk and the expanded set (#718).

  • Comfortable view mode on <.table_default> and the TableCardView hook. The same table with roomier cell padding (pk-comfy), sitting between compact rows and cards, and the default when nothing is stored (#718).

  • Live upload transfer stats. The UploadStats JS hook computes transferred bytes, sliding-window speed, and ETA from the patched data-progress attribute, then flips to a ticking “Processing on server…” clock at 100%. Wired through <.upload_entry_stats> on both <.file_upload> variants, the media selector, and MediaBrowser (#718).

Changed

  • FolderExplorer wrapper class attr. The hardcoded hidden lg:block is now overridable so embeds outside MediaBrowser can pick their own breakpoint (#718).

  • Drag handles stay visible. A muted grip that strengthens on hover replaces opacity-0 + group-hover/row — an affordance you cannot see is one nobody discovers (#718).

  • Multilang tabs drop the “Content Language” header by default (show_header / show_info remain as an opt-in). The tab strip itself stretches full width (#718).

  • Media picker names its purpose. Callers pass a title (Select Avatar, Select Cover Image, …); a locked picker without one derives a type-aware heading. Search hides below ten files on a locked picker, empty libraries get a type-aware empty state, a dry search offers Clear search, and double-click confirms in single mode (#718).

  • MediaBrowser upload drain is two-phase. Pending stores queue through send_update_after so a “Processing on server…” row paints before each store, and the batch flash waits until the queue is empty (#718).

Fixed

  • Media picker grid sat flush against the search bar. The browse wrapper’s display:contents swallowed the parent’s space-y-4 (#718).

  • V173 rollback uses plain DROP TABLEs in dependency order. CASCADE could have taken out FKs or views a parent app hung off these tables (#718).

  • tree_name_cell is imported with the other list-UI primitives, so a use PhoenixKitWeb, :html caller does not need a manual import (post-merge review of #718).

  • Uncontrolled tables first-paint comfortable, matching the JS hook’s default, instead of flashing compact until localStorage is read (post-merge review of #718).

  • Long tree-cell names truncate inside the flex row instead of overflowing the cell (post-merge review of #718).


PhoenixKit 2.7.0. Install or update: {:phoenix_kit, "~> 2.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.