Update `type: field.formatter.settings.file_video` to match the validation logic in FileVideoFormatter's settings form

Created on 4 March 2024, 10 months ago
Updated 25 March 2024, 9 months ago

Problem/Motivation

πŸ› Video files using the FileVideoFormatter have a fixed dimension Fixed changed the validation logic of FileVideoFormatter's settings.

The config schema should match this.

Steps to reproduce

N/A

Proposed resolution

Make width and height optional in type: field.formatter.settings.file_video too.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

πŸ“Œ Task
Status

Fixed

Version

10.3 ✨

Component
File moduleΒ  β†’

Last updated 2 days ago

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @wim leers
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    core.entity_view_display.media.video.default uses type: field.formatter.settings.file_video.

    So let's check validatability of that concrete config using ./vendor/bin/drush config:inspect --filter-keys=core.entity_view_display.media.video.default --detail --list-constraints:

    • Before: 62% validatable.
    • After: 68% validatable.
  • Pipeline finished with Success
    10 months ago
    Total: 550s
    #110108
  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    To mark type: field.formatter.settings.file_video fully validatable, we also need to ensure that the type it extends is fully validatable. That's type: file.formatter.media.

    Fortunately, that one is also trivial to validate! πŸ˜„

    Using ./vendor/bin/drush config:inspect --filter-keys=core.entity_view_display.media.video.default --detail --list-constraints again:

    • Before: 68% validatable
    • After: 70% validatable
  • Pipeline finished with Success
    10 months ago
    Total: 1810s
    #110127
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Let's now have "Follow .." in the git commit message. Although I am not sure what field.formatter.settings.file_video is supposed to match :-(. So, I am tagging for a title update.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    The thing you removed from the title actually made that clear πŸ˜…

    Either way: done 😊, and I'll stop using that prefix β€” sorry about that! 🫣

  • Status changed to Needs work 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Left a small comment on MR.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    I did think there may be config schema implications before I committed that issue, but thought if that were the case the tests should have failed. Any idea why they didn't?

  • Status changed to Needs review 10 months ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #8:

    Any idea why they didn't?

    1. Because config in core is not validated at all. Only basic conformance to the storage types is checked by ConfigSchemaChecker.
    2. Because none of the config in core is actually invalid πŸ˜„πŸ‘ (the only config using this: core.entity_view_display.media.video.default.yml)
  • Pipeline finished with Success
    10 months ago
    Total: 530s
    #112069
  • Status changed to RTBC 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    I should of said it out loud, min of 0 haha

    Changing the form min/max makes sense.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    I could also argue that a 1px video doesn't make much sense but I suppose we have to draw the line somewhere :)

    Committed and pushed 6e7fa7f365 to 11.x and 106d55288c to 10.3.x. Thanks!

    • longwave β†’ committed 106d5528 on 10.3.x
      Issue #3425318 by Wim Leers, smustgrave: Update `type: field.formatter....
  • Status changed to Fixed 10 months ago
    • longwave β†’ committed 6e7fa7f3 on 11.x
      Issue #3425318 by Wim Leers, smustgrave: Update `type: field.formatter....
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    @longwave Absolutely! πŸ˜„ That's IMHO material for the future; because imposing sensible limits is more likely to need update paths/break BC 🫣

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024