Skip to content

Commit

Permalink
Updated VideoBlock to use LinkBlock (#12577)
Browse files Browse the repository at this point in the history
* add new caption_url LinkWithoutLabelBlock field and update url field to URLBlock

* migration operation to transfer over old data

* removing old captionURL field

* squashed migrations

* updated template

* linting

* updated streamfield factory

* updated migrations
  • Loading branch information
danielfmiranda committed Jul 15, 2024
1 parent 810ff74 commit b3ca639
Show file tree
Hide file tree
Showing 6 changed files with 25,013 additions and 8 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions network-api/networkapi/utility/faker/streamfield_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,13 @@ def generate_dark_quote_field():

def generate_video_field():
caption = fake.paragraph(nb_sentences=1, variable_nb_sentences=False)
captionURL = fake.url(schemes=["https"])

caption_external_url = [
{
"link_to": "external_url",
"external_url": fake.url(schemes=["https"]),
"new_window": True,
}
]
return generate_field(
"video",
{
Expand All @@ -205,7 +210,7 @@ def generate_video_field():
# See details: https://github.com/mozilla/foundation.mozilla.org/issues/3833#issuecomment-562240677
"url": "https://www.youtube.com/embed/83fk3RT8318",
"caption": caption,
"captionURL": captionURL,
"caption_url": caption_external_url,
"video_width": "full_width",
},
)
Expand Down
Loading

0 comments on commit b3ca639

Please sign in to comment.