Page MenuHomePhabricator

Image replace/notification flow when image has been deleted
Open, Needs TriagePublic

Description

Steps:
  • Check for the image status in Commons (make an call API to check that image is deleted)

(option 1) can be triggered when story viewer is opened > taking this as the technical approach; if the story viewer happens to be opened more than once, it shouldn't send multiple triggers.
(option 2) or when the story is not in cache

  • Notify editor that the image is no longer available
  • Add a CTA the directs the editor to the story builder to replace the image
Description/User story

As a wikistory editor/ watcher,
I want to know when a story that I'm watching is now missing an image from Commons,
So that I can replace it with an alternative image.

Design
Notification with more than 50 characters.png (852×393 px, 38 KB)
Notification with more than 50 characters Expanded.png (852×393 px, 51 KB)
  • We will have different notifications for single and multiple image deletion scenarios.
  • For single image deletion, include the image file name and the story name in the notification message.
  • For multiple image deletion, create a bundled notification with a general message, followed by a dropdown icon and a "View deleted images" copy. When expanded, display individual messages for each deleted image.
  • Implement text truncation with ellipsis for long image and story names, allowing a maximum of 50 characters including the file name extension. Introduce truncation when the limit is exceeded, and include a space between the ellipsis and the file extension to avoid confusion with four consecutive periods.
  • Make entire notification serve as primary link which opens story page with deleted image on story builder.
  • For Single image deletion, Tap/Click on Replace image also opens story page with deleted image on story builder.
  • Copy for multiple image deletion : "Several images used in Story: xyz have been deleted from Commons. Please replace them to maintain quality of the story.
  • Copy for individual notification after clicking on drop down button : "Please replace "File_name" with a new image as it has been deleted from Commons".
  • Copy for single image delete: "File_name used in the "Story:xyz" has been deleted from Commons. Please replace it to maintain quality of the story.
Acceptance Criteria
  • Editor/Watcher gets a notification and is able to click on it to go to the story builder & replace the image.
  • If the story viewer is opened multiple times, there shouldn't be multiple notifications for the same image
  • If multiple images are missing, the editor should be nudged on the story builder to replace all the images before publishing.