Skip to content

Collect file metadata in FileListWidget's vue implementation - #13098

Open
johnatawnclementawn wants to merge 12 commits into
dev/8.2.xfrom
jmc/13094-file-widget-metadata
Open

johnatawnclementawn wants to merge 12 commits into
dev/8.2.xfrom
jmc/13094-file-widget-metadata

Conversation

@johnatawnclementawn

@johnatawnclementawn johnatawnclementawn commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Adds ability to collect file metadata in the vue component implementation. It also adds a backdoor for implementors (driven by Lingo's use case) to hide certain metadata fields based on data collection needs. For instance, Lingo has modeled title and description (and accompanying language nodes) so we need to save those data in two places - duplicate form fields would look cluttered and cause extra effort for users.

This is listed as a bugfix because we classify accessibility improvements as bugfixes.

Issues Solved

Closes #13094

Checklist

  • I targeted one of these branches:
    • dev/8.2.x (under development): features, bugfixes not covered below
    • dev/8.1.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/7.6.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Accessibility Checklist

Developer Guide

Topic Changed Retested
Color contrast
Form fields x x
Headings
Links
Keyboard x x
Responsive Design x x
HTML validation x x
Screen reader x x

Ticket Background

Further comments

@johnatawnclementawn

Copy link
Copy Markdown
Member Author

hey @chrabyrd - looking for a pattern approval here. Started out with passing props for field hiding overrides (like we do with renderContext for string & non-localized string widgets, but felt like that prop drilling was a little too much. Second commit illustrates that pattern.

@chrabyrd chrabyrd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks pretty good and I appreciate getting parity going! But I think the pattern should change.

  • Right now you're hacking cardXNodeXWidgetData to add a delta between what's presented to the widget and what's actually in the DB in order to hide metadata fields, yeah? There's a few ways we could hide the fields without adding in a new pattern.

eg use :hidden-metadata-fields="['title'] and trust the generic $attrs passthrough, or use cardXNodeXWidgetDataOverrides on callsites that need to hide those fields.

  • also I'd argue we should always show the language picker for each field, and the default option is derived the from system's selected language

  • it looks like nothing's enforcing the alt text required bit that's been added? also it's keying off of imagesOnly which isn't a great heuristic to enforce this on I think? since it's possible to still add images when the list could be any

  • lastly I think this branch could have a test cull pass to reduce any redundant tests and lighten the the PR a bit.

Happy to chat about any of this just lemme know! 👍

@johnatawnclementawn

Copy link
Copy Markdown
Member Author

it looks like nothing's enforcing the alt text required bit that's been added? also it's keying off of imagesOnly which isn't a great heuristic to enforce this on I think? since it's possible to still add images when the list could be any

I hear you on this, the reason it's here is because of our datatype validation for image-only FileList nodes:

"The image '{0}' is missing an alternative text."

I think this is a happy path between removing and letting people run into failed saves due to missing alt-text, and waiting for us to implement front-end validation across vue-components

@johnatawnclementawn
johnatawnclementawn force-pushed the jmc/13094-file-widget-metadata branch from 536840f to 5e2e15e Compare November 24, 2026 21:16
@chrabyrd

Copy link
Copy Markdown
Contributor

it looks like nothing's enforcing the alt text required bit that's been added? also it's keying off of imagesOnly which isn't a great heuristic to enforce this on I think? since it's possible to still add images when the list could be any

I hear you on this, the reason it's here is because of our datatype validation for image-only FileList nodes:

"The image '{0}' is missing an alternative text."

I think this is a happy path between removing and letting people run into failed saves due to missing alt-text, and waiting for us to implement front-end validation across vue-components

yeah that's fair 👍

@chrabyrd chrabyrd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Vue Components: Add ability to collect file metadata to file widget.

2 participants