This PR updates the behaviour of x-gift-article component to add the option to include highlights when using gift & non-gift sharing for B2B users. The new logic is as follows:
Option to 'include highlights' has been added to the share modal for gift article and non-gift share
If a B2B user selects 'include highlights', a highlight share token is generated via the Professional user-annotations-api
The highlights token is appended as a query param to the share url, along with the article share token, and is then shortened by bit.ly before being returned to the user
Code changes
this PR only changes code in the x-gift-article component
UI changes
Before
After
B2B users who have highlights in their articles can see the include highlights check box only when they use the advance share
B2B users who have highlights in their articles can see the include highlights check box for all sharing options
Code changes
API client Update:
update the getGiftUrl API to include an optional highlightsToken that will be used to add highlights when creating the Gift share link
add new function in the 'highlightsApi' to generate highlight share token that will be used for both Gift & non-gift shares
UI upates:
Moved the include highlights checkbox from the advanced sharing options component to the parent share type selector component
change the condition show the highlights checkbox to be visible to all B2B users who have highlights in the article
other updates:
add logic to generate and include Highlight token in the action for creating both Gift & non-Gift Share
This PR updates the behaviour of x-gift-article component to add the option to include highlights when using gift & non-gift sharing for B2B users. The new logic is as follows:
Code changes
this PR only changes code in the x-gift-article component
UI changes
Code changes
API client Update:
getGiftUrl
API to include an optionalhighlightsToken
that will be used to add highlights when creating the Gift share linkUI upates:
other updates:
Gira
gira ticket