FYP: allow mobile to reject + change phrasing
- This allows mobile to reject recommendations. - Also changed from "I dislike this" to "Not interested". Less negative?
This commit is contained in:
parent
e9559efe10
commit
972429b391
5 changed files with 23 additions and 3 deletions
|
@ -1328,6 +1328,7 @@
|
|||
"You don't have any notifications yet, but they will be here when you do!": "You don't have any notifications yet, but they will be here when you do!",
|
||||
"I like this": "I like this",
|
||||
"I dislike this": "I dislike this",
|
||||
"Not interested": "Not interested",
|
||||
"Let %channel% know you enjoyed this!": "Let %channel% know you enjoyed this!",
|
||||
"An account with %domain% allows you to earn rewards and backup your data.": "An account with %domain% allows you to earn rewards and backup your data.",
|
||||
"Sync my YouTube channel": "Sync my YouTube channel",
|
||||
|
|
|
@ -2,6 +2,7 @@ import { connect } from 'react-redux';
|
|||
import { selectClaimForUri, selectClaimIsMine } from 'redux/selectors/claims';
|
||||
import { doCollectionEdit, doFetchItemsInCollection } from 'redux/actions/collections';
|
||||
import { doEditForChannel } from 'redux/actions/publish';
|
||||
import { doRemovePersonalRecommendation } from 'redux/actions/search';
|
||||
import {
|
||||
makeSelectCollectionForId,
|
||||
makeSelectCollectionForIdHasClaimUrl,
|
||||
|
@ -36,7 +37,7 @@ import ClaimPreview from './view';
|
|||
import fs from 'fs';
|
||||
|
||||
const select = (state, props) => {
|
||||
const claim = selectClaimForUri(state, props.uri, false); // @KP test no repost!
|
||||
const claim = selectClaimForUri(state, props.uri, false);
|
||||
const collectionId = props.collectionId;
|
||||
const repostedClaim = claim && claim.reposted_claim;
|
||||
const contentClaim = repostedClaim || claim;
|
||||
|
@ -106,6 +107,7 @@ const perform = (dispatch) => ({
|
|||
dispatch(doToggleLoopList(collectionId, false, true));
|
||||
dispatch(doToggleShuffleList(undefined, collectionId, true, true));
|
||||
},
|
||||
doRemovePersonalRecommendation: (uri) => dispatch(doRemovePersonalRecommendation(uri)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ClaimPreview);
|
||||
|
|
|
@ -53,6 +53,7 @@ type Props = {
|
|||
claimInCollection: boolean,
|
||||
collectionId: string,
|
||||
isMyCollection: boolean,
|
||||
fypId?: string,
|
||||
doToast: ({ message: string, isError?: boolean }) => void,
|
||||
claimIsMine: boolean,
|
||||
fileInfo: FileListItem,
|
||||
|
@ -70,6 +71,7 @@ type Props = {
|
|||
lastUsedCollection: ?Collection,
|
||||
hasClaimInLastUsedCollection: boolean,
|
||||
lastUsedCollectionIsNotBuiltin: boolean,
|
||||
doRemovePersonalRecommendation: (uri: string) => void,
|
||||
};
|
||||
|
||||
function ClaimMenuList(props: Props) {
|
||||
|
@ -97,6 +99,7 @@ function ClaimMenuList(props: Props) {
|
|||
hasClaimInFavorites,
|
||||
collectionId,
|
||||
isMyCollection,
|
||||
fypId,
|
||||
doToast,
|
||||
claimIsMine,
|
||||
fileInfo,
|
||||
|
@ -114,6 +117,7 @@ function ClaimMenuList(props: Props) {
|
|||
lastUsedCollection,
|
||||
hasClaimInLastUsedCollection,
|
||||
lastUsedCollectionIsNotBuiltin,
|
||||
doRemovePersonalRecommendation,
|
||||
} = props;
|
||||
const [doShuffle, setDoShuffle] = React.useState(false);
|
||||
const incognitoClaim = contentChannelUri && !contentChannelUri.includes('@');
|
||||
|
@ -282,6 +286,19 @@ function ClaimMenuList(props: Props) {
|
|||
<Icon size={20} icon={ICONS.MORE_VERTICAL} />
|
||||
</MenuButton>
|
||||
<MenuList className="menu__list">
|
||||
{/* FYP */}
|
||||
{fypId && (
|
||||
<>
|
||||
<MenuItem className="comment__menu-option" onSelect={() => doRemovePersonalRecommendation(uri)}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.REMOVE} />
|
||||
{__('Not interested')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
<hr className="menu__separator" />
|
||||
</>
|
||||
)}
|
||||
|
||||
<>
|
||||
{/* COLLECTION OPERATIONS */}
|
||||
{collectionId && isCollectionClaim ? (
|
||||
|
|
|
@ -242,7 +242,7 @@ function ClaimPreviewTile(props: Props) {
|
|||
)}
|
||||
</h2>
|
||||
</NavLink>
|
||||
<ClaimMenuList uri={uri} collectionId={listId} channelUri={channelUri} />
|
||||
<ClaimMenuList uri={uri} collectionId={listId} fypId={fypId} channelUri={channelUri} />
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
|
|
|
@ -20,7 +20,7 @@ export default function FileHideRecommendation(props: Props) {
|
|||
e.preventDefault();
|
||||
}
|
||||
|
||||
const label = __('I dislike this');
|
||||
const label = __('Not interested');
|
||||
|
||||
return (
|
||||
<Button
|
||||
|
|
Loading…
Reference in a new issue