-
Notifications
You must be signed in to change notification settings - Fork 42
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
Feat: Interactive Wrapper #1288
Conversation
Please find visual snapshots of your changed components here: https://s3-eu-west-1.amazonaws.com/times-components-snaps/83c7737eeacef7dbddacae33e7ffa011a6037714/index.html |
Please find visual snapshots of your changed components here: https://s3-eu-west-1.amazonaws.com/times-components-snaps/9cb44302435b310396a664f99ab3c481a62f01c3/index.html |
primaryContainer: { | ||
width: "100%", | ||
flexDirection: "column", | ||
paddingBottom: spacing(5) |
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.
could this lot be moved to the styles/article-body
directory?
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.
Sounds good, was tidying up what was already there. But can improve it further.
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.
Done.
margin-bottom: ${spacing(4)}; | ||
|
||
@media (min-width: ${breakpoints.medium}px) { | ||
width: 80.8%; |
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 think these widths belong in the styleguide
package. Have created #1291
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.
Yea I agree, I think a follow up PR would be good.
|
||
Visit the official | ||
[storybook](http://components.thetimes.co.uk/?knob-Size%20of%20ad%20placeholder%3A=default&knob-Interactive=chapterHeading&knob-Interactive%20Wrapper=chapterHeading&selectedKind=Primitives%2FInteractive%20Wrapper&selectedStory=Interactive%20Wrapper&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybooks%2Fstorybook-addon-knobs) | ||
to see our available image templates. |
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.
"interactive templates"
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.
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.
🤦♂️
}); | ||
expect(InteractiveWrapper.openURLInBrowser).not.toHaveBeenCalled(); | ||
}); | ||
}; |
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.
👍 nice
|
||
class InteractiveWrapper extends Component { | ||
static postMessageBugWorkaround() { | ||
return Platform.select({ |
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.
would it be better to target platforms the RNW way with file extensions?
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.
Took this from the approach on Ads. If we change it here, we should change it there.
if ( | ||
!data.url.includes("data:text/html") && | ||
data.url.includes("http") && | ||
!data.url.includes("cwfiyvo20d.execute-api.eu-west-1.amazonaws.com") |
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.
can this go in a constant somewhere?
6459dff
to
c011a08
Compare
c011a08
to
39b4457
Compare
This PR gives access to all interactives on web via the previously built web components by the digital developers.
On Native, the interactives do no exist. This wrapper exposes the interactives via a Lambda function which controls which Interactives to show. This Lambda function is currently controlled by the digital developers.
A change is required on TPA to add id as a returned value to get this working end to end.