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/article with video label #708

Merged
merged 24 commits into from
Mar 13, 2018
Merged

Conversation

nikhedonia
Copy link
Contributor

@nikhedonia nikhedonia commented Mar 7, 2018

No description provided.

@nikhedonia nikhedonia force-pushed the feat/article-with-video-label branch 5 times, most recently from 64ea99a to dc1686d Compare March 7, 2018 16:28
export default function getLeadAsset({ leadAsset: asset }) {
if (!asset) return { isVideo: false, leadAsset: null };

const isVideo = !!asset.posterImage;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a guarantee? will it always be populated?

Copy link
Contributor Author

@nikhedonia nikhedonia Mar 7, 2018

Choose a reason for hiding this comment

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

Yes, It comes directly from the graphql-endpoint.
The query resides in provider/article.

Copy link
Contributor

Choose a reason for hiding this comment

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

this isn't how you should determine a video though, you have a type system?

padding: 0,
margin: 0,
position: "relative",
top: 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this and increase the lineHeight?

Copy link
Contributor Author

@nikhedonia nikhedonia Mar 7, 2018

Choose a reason for hiding this comment

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

possible but then I need to add a negative marginBottom as it would introduce extra padding.

@@ -1,24 +1,28 @@
import React from "react";
import PropTypes from "prop-types";
import ArticleLabel from "@times-components/article-label";
import VideoLabel from "@times-components/video-label";
Copy link
Contributor

Choose a reason for hiding this comment

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

the native and web versions are basically the same, would be tempted to create a base version with render prop?

Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense @nikhedonia

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's tackle this in a seperate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

create issue #723 to document this as a todo.

@nikhedonia nikhedonia force-pushed the feat/article-with-video-label branch from f22ab31 to 5e5e13c Compare March 12, 2018 12:58
]
}
],
"leadAsset": {

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

We have a story in the backlog for video integration, just wondering if there is any specific reason / requirement for doing just the video label or is the video integration already done if I may have missed it

Choose a reason for hiding this comment

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

👍

export default function getLeadAsset({ type, leadAsset: asset }) {
if (!asset) return { isVideo: false, leadAsset: null };

const isVideo = asset.type === 'Video';
Copy link
Contributor

Choose a reason for hiding this comment

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

better

@@ -1,24 +1,28 @@
import React from "react";
import PropTypes from "prop-types";
import ArticleLabel from "@times-components/article-label";
import VideoLabel from "@times-components/video-label";
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense @nikhedonia

@nikhedonia nikhedonia force-pushed the feat/article-with-video-label branch from ea468c0 to 158ef96 Compare March 12, 2018 15:43
@nikhedonia nikhedonia force-pushed the feat/article-with-video-label branch from 158ef96 to 08e715d Compare March 12, 2018 15:52
@nikhedonia nikhedonia merged commit b48613e into master Mar 13, 2018
@craigbilner craigbilner deleted the feat/article-with-video-label branch May 17, 2018 11:18
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.

4 participants