Skip to content

[WHIT-3170] Override social media display text#11486

Open
lauraghiorghisor-tw wants to merge 3 commits into
mainfrom
override-social-media-display-text
Open

[WHIT-3170] Override social media display text#11486
lauraghiorghisor-tw wants to merge 3 commits into
mainfrom
override-social-media-display-text

Conversation

@lauraghiorghisor-tw
Copy link
Copy Markdown
Contributor

@lauraghiorghisor-tw lauraghiorghisor-tw commented May 21, 2026

Changes

Added a new optional title field to social media links. This title is primarily intended to be used for the "Other" service type. We need to be able to distinguish between the various channels. Nonetheless, the title input can also be used to provide multiple instances of any other channel type.

Validation changes:

  • We now validate for unique title as well (URL must also be unique from before).
  • Channel names can now be repeated, provided their titles are distinct.
  • The "Other" channel does not behave in any way differently from the rest of the channels. We won't allow multiple "Other" entries unless they have different titles. A valid scenario is if one "Other" channel has no title and the other does.
  • We do not validate title uniqueness scoped to the channel, but globally - we will not allow a repeated title even if it is across different channels.
  • If there are channels that match, and their titles match, we'll only render a single error for the titles matching.

Generally followed approach in previous PR, except for setting required on the schema - feels unnecessary since the validation for this is custom.

Also added a locale override for the error label. The previous code rendered the old model-attribute-based label in the error summary, which no longer matches what we show on the form, creating a confusing experience for the user. We could have just changed the json config to change the attribute, but we now have live data using social_media_links, so that's no longer possible.

Testing

Description Screenshot
Valid - Two channels with different titles - valid valid channels with titles
Valid - Two "Other" channels with different titles Valid other
Valid - Title is optional title optional
Invalid - Channel must be unique if no titles provided Channel uniq check when title not provided
Valid - Channel must be unique when "Other" selected, if no titles provided Cahnnel must be uniq other
Valid - Title must be unique (same channel example) Uniq title
Valid - Title must be unique across all channels Uniq title across all accounts
Frontend rendering Screenshot 2026-05-21 at 20 50 22
Content item payload Screenshot 2026-05-21 at 20 50 36
Before / After label changes Screenshot 2026-05-21 at 23 06 46
Screenshot 2026-05-21 at 23 06 54

Jira

@lauraghiorghisor-tw lauraghiorghisor-tw changed the title Override social media display text [WHIT-3170] Override social media display text May 21, 2026
@lauraghiorghisor-tw lauraghiorghisor-tw force-pushed the override-social-media-display-text branch 4 times, most recently from 21f7fdd to d55b92a Compare May 21, 2026 18:40
jamiestamp and others added 2 commits May 22, 2026 08:20
This title is primarily intended to be used for the "Other" service type. We need to be able to distinguish between the various channels. Nonetheless, the title input can also be used to provide multiple instances of any other channel type. Future commit will add the necessary validations.
- We now validate for unique title as well (URL must also be unique from before).
- Channel names can now be repeated, provided their titles are distinct.
- The "Other" channel does not behave in any way differently from the rest of the channels. We won't allow multiple "Other" entries unless they have different titles. A valid scenario is if one "Other" channel has no title and the other does.
- We do not validate title uniqueness scoped to the channel, but globally - we will not allow a repeated title even if it is across different channels. This is because it could still be confusing on the screen if the title is repeated.
- If there are channels that match, and their titles match, we'll only render a single error for the titles matching.
@lauraghiorghisor-tw lauraghiorghisor-tw force-pushed the override-social-media-display-text branch from d55b92a to c868311 Compare May 22, 2026 07:21
The social media accounts were originally named social media links. We have changed the labels of the block field, but the model attribute is still named `social_media_links`, so the default errors are added to it, and rendered as such. This creates a broken user experience.

This commit adds a locale override for the attribute, to match the labels rendered on the form. We could have just changed the json config to change the attribute, but we now have live data using `social_media_links`, so that's no longer possible.
@lauraghiorghisor-tw lauraghiorghisor-tw force-pushed the override-social-media-display-text branch from c868311 to 52c9773 Compare May 22, 2026 07:35
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.

2 participants