Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP adding a behavior for optional video and optional audio #62

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

pigeonflight
Copy link
Member

@pigeonflight pigeonflight commented Apr 16, 2019

This is work in progress. The goal is to provide two new behaviours.

  • Video (Optional)
  • Audio (Optional)

These allow a user to add audio or video fields to their content type as a behaviour without them being mandatory/required.

@pigeonflight
Copy link
Member Author

pigeonflight commented Apr 16, 2019

so far the implementation is ugly as it it doesn't follow "DRY" principles. The new Video (Optional) and Audio (Optional) behaviours are near duplicates of the old Video and Audio behaviours.
I'd love to have suggestions for something more elegant.

As Andreas Jung has said.
"breaking a behavior with a compound of multiple fields into a different behavior with less fields (e.g. when you want to get rid of a field) is not easy.. I tend to create a new behavior (with code duplication)"

see: https://community.plone.org/t/override-a-schema-provided-by-a-behavior/8347/3?u=pigeonflight

@pigeonflight pigeonflight requested review from petschki, zombified and instification and removed request for petschki April 26, 2019 12:48
Sign up for free to 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.

1 participant