-
Notifications
You must be signed in to change notification settings - Fork 119
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
IMAGEDAM-1665: Generic React modal dialog and send to Photosales functionality #4267
base: main
Are you sure you want to change the base?
IMAGEDAM-1665: Generic React modal dialog and send to Photosales functionality #4267
Conversation
558159b
to
8d28ee3
Compare
kahuna/public/js/components/gr-confirmation-modal/gr-confirmation-modal.css
Outdated
Show resolved
Hide resolved
kahuna/public/js/components/gr-confirmation-modal/gr-confirmation-modal.tsx
Outdated
Show resolved
Hide resolved
8d28ee3
to
d9b4bea
Compare
kahuna/public/js/components/gr-confirmation-modal/gr-confirmation-modal.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks okay now - just 1 minor comment, but its an optional change
3d29510
to
e219e49
Compare
…tionality This PR introduces two new functionalities: - The ability for a user to add a 'send to photosales' syndication usage to an image, via the 'Send to Photosales button' - A generic React modal component, used in this case as a confirmation dialog As an archivist user of BBC Images, I want to be able to send certain images from BBC Images to BBC Photo Sales, through the Grid UI. This PR introduces this functionality, allowing a user to select a number of images and trigger the outbound photo sales process by clicking on the new 'Send to Photo Sales' button. Upon doing this the confirmation dialog will pop up, asking the user to confirm their choice. The dialog will have different text and button options depending on if the images selected already exist in photosales or not. Once the user has confirmed their intention to send the image, a syndication usage (with a 'pending' usage status) is added to each of the selected image, which is the trigger for an AWS step function that carries out the majority of the outbound logic. The Photosales functionality is BBC specific, hence it is disabled by default via the showSendToPhotoSales feature flag.
fb7b563
to
9cf5c4e
Compare
Hi, just trying to test this in our test environment, think we've got the right configuration (the |
@@ -7,12 +7,12 @@ import play.api.libs.json._ | |||
case class SyndicationUsageRequest ( | |||
partnerName: String, | |||
syndicatedBy: Option[String], | |||
startPending: Option[Boolean], | |||
startPending: Option[String], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still reading through some of the other files, so sorry if I'm missing something, but it does feel like this is a bit more appropriate as a boolean - it looks like we mainly want to be able to say whether startPending
is true or false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, so like you can see it was originally a Boolean, and I'd agree that it does make more sense in this context. The reason this was changed (off the top of my head) was in order to be able to extend the postToUsages
function to be able to process syndication usages, I can't remember exactly why, but it wasn't possible to do this with startPending
as a Boolean
The brackets around validImages in sendToPhotosales was incorrect - by selecting [0] we've already resolved the array. Removing these brackets addresses this issue.
Thanks for pointing this out! The brackets around validImages in sendToPhotosales was incorrect - by selecting [0] we've already resolved the array. Removing these brackets addresses this issue. This fix has been pushed in the latest commit. |
What does this change?
Note, this PR builds on changes introduced in IMAGEDAM-1502 and so will replace that PR.
This PR introduces two new functionalities:
As an archivist user of BBC Images, I want to be able to send certain images from BBC Images to BBC Photo Sales, through the Grid UI. This PR introduces this functionality, allowing a user to select a number of images and trigger the outbound photo sales process by clicking on the new 'Send to Photo Sales' button.
Upon doing this the confirmation dialog will pop up, asking the user to confirm their choice. The dialog will have different text and button options depending on if the images selected already exist in photosales or not. Once the user has confirmed their intention to send the image, a syndication usage (with a 'pending' usage status) is added to each of the selected image, which is the trigger for an AWS step function that carries out the majority of the outbound logic.
The Photosales functionality is BBC specific, hence it is disabled by default via the
showSendToPhotoSales
feature flag.How should a reviewer test this change?
As a user with elevated permissions and with the showSendToPhotoSales flag set to true:
No selected images already exist in Photosales
The selected images contain a mixture of images that have and have not been sent to Photosales
All the selected images have already been sent to Photosales
How can success be measured?
No selected images already exist in Photosales
The selected images contain a mixture of images that have and have not been sent to Photosales
All the selected images have already been sent to Photosales
Who should look at this?
@guardian/digital-cms
Tested? Documented?