Skip to content
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

Merged
merged 19 commits into from
Sep 6, 2018
Merged

Feat: Interactive Wrapper #1288

merged 19 commits into from
Sep 6, 2018

Conversation

jimhunty
Copy link
Contributor

@jimhunty jimhunty commented Sep 3, 2018

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.

@times-tools
Copy link
Collaborator

Please find visual snapshots of your changed components here: https://s3-eu-west-1.amazonaws.com/times-components-snaps/83c7737eeacef7dbddacae33e7ffa011a6037714/index.html

@times-tools
Copy link
Collaborator

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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%;
Copy link
Contributor

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

Copy link
Contributor Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"interactive templates"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy/paste

Copy link
Contributor Author

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();
});
};
Copy link
Contributor

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({
Copy link
Contributor

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?

Copy link
Contributor Author

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")
Copy link
Contributor

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?

@coveralls
Copy link

coveralls commented Sep 5, 2018

Coverage Status

Coverage increased (+0.03%) to 94.687% when pulling 5f7979f on feat/interactives into 88702ac on master.

@jimhunty jimhunty merged commit f7577d8 into master Sep 6, 2018
@jimhunty jimhunty deleted the feat/interactives branch September 6, 2018 08:34
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.

5 participants