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

Update AnnotatedImageBlock to use LinkBlock #12481

Merged
merged 15 commits into from
Jun 20, 2024
Merged

Update AnnotatedImageBlock to use LinkBlock #12481

merged 15 commits into from
Jun 20, 2024

Conversation

danielfmiranda
Copy link
Collaborator

@danielfmiranda danielfmiranda commented Jun 13, 2024

Description

Related PRs/issues: #12480, TP1-804

This PR implements the following changes:

  • New Class LinkWithoutLabelBlock: Derived from LinkBlock, it omits the required label field, allowing usage where a label is not necessary, such as in AnnotatedImageBlock where the "caption" serves as the label.
  • captionURL charField Replacement: Replaces the captionURL char field with caption_url using LinkWithoutLabelBlock, wrapped in a ListBlock to make it optional.
  • Template Update: Updates the annotated_image_block.html template to account for the new field.
  • Streamfield Provider Update: Modifies the factory method for AnnotatedImageBlock to include a link value when created via the streamfield provider.
  • Data Migrations: Adds new caption_url field, migrates existing data, and deletes the old captionURL field.
  • Test Updates: Adjusts test_block_type_report.py to accommodate the new LinkWithoutLabelBlock field.

┆Issue is synchronized with this Jira Story

Screenshots

Before (with CharBlock):

Screenshot 2024-06-14 at 3 14 36 PM

After (with LinkWithoutLabelBlock):

Screenshot 2024-06-14 at 3 05 39 PM

@danielfmiranda danielfmiranda marked this pull request as ready for review June 13, 2024 02:30
Copy link
Collaborator

@robdivincenzo robdivincenzo left a comment

Choose a reason for hiding this comment

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

LGTM @danielfmiranda! Thanks for taking point on this first PR for the epic

@data-sync-user
Copy link
Collaborator

➤ Simon Acosta Torres commented:

PR merged.

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

Successfully merging this pull request may close these issues.

3 participants