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

Feature/CV2-5785: media dialog view ux updates to include media match reason #2256

Open
wants to merge 12 commits into
base: epic/CV2-5510-why-media-is-in-cluster
Choose a base branch
from
22 changes: 22 additions & 0 deletions src/app/components/media/MediaComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import cx from 'classnames/bind';
import MediaCardLarge from './MediaCardLarge';
import MediaSlug from './MediaSlug';
import MediaComponentRightPanel from './MediaComponentRightPanel';
import MediaOriginBanner from './MediaOriginBanner';
import MediaSimilarityBar from './Similarity/MediaSimilarityBar';
import MediaSimilaritiesComponent from './Similarity/MediaSimilaritiesComponent';
import MediaFeedInformation from './MediaFeedInformation';
Expand Down Expand Up @@ -214,6 +215,14 @@ class MediaComponent extends Component {
)]}
/>
}
media_origin_banner={
Copy link
Contributor

Choose a reason for hiding this comment

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

prop names should follow camelCase => mediaOriginBanner={

<MediaOriginBanner
media_cluster_origin={projectMedia.media_cluster_origin}
media_cluster_origin_timestamp={projectMedia.media_cluster_origin_timestamp}
media_cluster_origin_user={projectMedia.media_cluster_origin_user.name}
media_cluster_relationship={projectMedia.media_cluster_relationship}
/>
}
projectMediaId={projectMedia.dbid}
projectMediaImportedId={projectMedia.imported_from_project_media_id}
onClick={e => e.stopPropagation()}
Expand Down Expand Up @@ -342,6 +351,19 @@ export default createFragmentContainer(withPusher(MediaComponent), graphql`
slug
}
}
media_cluster_origin
media_cluster_origin_user {
name
}
media_cluster_origin_timestamp
media_cluster_relationship {
target {
title
}
confirmed_by {
name
}
}
is_confirmed_similar_to_another_item
is_suggested
is_secondary
Expand Down
6 changes: 5 additions & 1 deletion src/app/components/media/MediaOriginBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ const MediaOriginBanner = ({
);
};

MediaOriginBanner.defaultProps = {
media_cluster_relationship: {},
Copy link
Contributor

Choose a reason for hiding this comment

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

prop names should follow camelCase

};

MediaOriginBanner.propTypes = {
media_cluster_origin: PropTypes.number.isRequired,
media_cluster_origin_timestamp: PropTypes.number.isRequired,
Expand All @@ -126,7 +130,7 @@ MediaOriginBanner.propTypes = {
target: PropTypes.shape({
title: PropTypes.string,
}),
}).isRequired,
}),
};

export default MediaOriginBanner;
Loading