Skip to content

Media module: media picker subfolder fix, MediaGallery refactor, lib upgrades - #549

Merged
ddon merged 4 commits into
BeamLabEU:devfrom
timujinne:dev
May 18, 2026
Merged

Media module: media picker subfolder fix, MediaGallery refactor, lib upgrades#549
ddon merged 4 commits into
BeamLabEU:devfrom
timujinne:dev

Conversation

@timujinne

Copy link
Copy Markdown
Contributor

Summary

Commits

A folder-scoped MediaSelectorModal listed only files directly in the
scope folder, hiding images uploaded into nested subfolders (e.g. an
order's sub-order folders). Make Storage.folder_subtree_uuids/1 public
and scope the picker to the folder's whole subtree.
The search input on the Users and Live Sessions pages stopped working:
commit 2f4fded dropped on_submit from the <.search_toolbar> call sites,
which switched the component to a form-less <input>. phx-change on a
form-less input never delivers the search event, so search silently
broke. Wrap each search input in a <form phx-change="search"> instead
(the Sessions page had the same latent form-less <input> bug).
Also relocate the standalone search/filter/button panel above each
table into the <.table_default> toolbar row, alongside the rows/cards
view toggle:
- search sits in :toolbar_title (wide on Manage Users)
- role/account-type/status selects and action buttons in :toolbar_actions
- compact -sm controls with inline labels
- Users page now renders the table unconditionally; the empty state
moved into a table-body row so the toolbar/search stays visible when
a filter or search yields no results
Drop the standalone filter bar above the Activity table and relocate
its controls into the <.table_default> toolbar row:
- the four module/mode/action/resource-type selects move into
:toolbar_title with compact -sm controls and inline labels
- the {total} activities count moves to the right in :toolbar_actions
- Clear filters becomes an outlined button with an icon, shown only
when at least one filter is active
- the table renders unconditionally; the empty state moved into a
table-body row so the filters stay visible on a zero-result filter
@ddon
ddon merged commit 96aec8b into BeamLabEU:devMay 18, 2026
ddon pushed a commit that referenced this pull request May 18, 2026
Post-merge review of PR #549 surfaced three filter-toolbar issues:
- Users role <select> used a value= attribute, which raw HTML <select>
ignores — the dropdown silently reset to "All Users" after filtering.
Use selected={...} on each <option> instead.
- Users empty-state "Clear Filters" only cleared the search box via a
phx-click="search" + inline-JS hack and ignored role/account-type.
Add a real clear_filters handler that resets all three, and include
filter_account_type in the filters-active check. Empty-state colspan
now counts only rendered columns.
- Activity zero-result empty state always said "No activities recorded
yet", misleading users who had filtered to no matches. Distinguish
"No activities match the current filters" (with a Clear filters
button) from the genuinely-empty case.
Also adds the PR #549 review doc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ddon pushed a commit that referenced this pull request May 18, 2026
Follow-up cleanup from a /simplify pass over the post-merge review fixes:
- Activity: extract the duplicated four-filter "any active?" check (it
was inline in both the toolbar Clear button and the empty-state
message) into a single any_filter_active?/1 helper.
- MediaCanvasViewer.sync_annotations/3: gate the post-loop DB reload +
canvas rebuild behind a wrote?/to_delete check, so an Etcher
re-broadcast with no net change does no DB work at all. The main
loop is now an Enum.reduce tracking whether any row was persisted.
Review docs updated with resolution status for both PRs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ddon pushed a commit that referenced this pull request May 18, 2026
Bump @Version and add the 1.7.113 CHANGELOG section covering PR #549
(media picker subfolder fix, MediaGallery refactor, filter relocation,
search regression fix), PR #550 (Fresco 0.5 / Etcher 0.3 migration,
MediaCanvasViewer, line annotation kind + V121), and the post-merge
review fixes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for freeto 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.

2 participants

@timujinne@ddon