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!",
|
"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 like this": "I like this",
|
||||||
"I dislike this": "I dislike this",
|
"I dislike this": "I dislike this",
|
||||||
|
"Not interested": "Not interested",
|
||||||
"Let %channel% know you enjoyed this!": "Let %channel% know you enjoyed this!",
|
"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.",
|
"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",
|
"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 { selectClaimForUri, selectClaimIsMine } from 'redux/selectors/claims';
|
||||||
import { doCollectionEdit, doFetchItemsInCollection } from 'redux/actions/collections';
|
import { doCollectionEdit, doFetchItemsInCollection } from 'redux/actions/collections';
|
||||||
import { doEditForChannel } from 'redux/actions/publish';
|
import { doEditForChannel } from 'redux/actions/publish';
|
||||||
|
import { doRemovePersonalRecommendation } from 'redux/actions/search';
|
||||||
import {
|
import {
|
||||||
makeSelectCollectionForId,
|
makeSelectCollectionForId,
|
||||||
makeSelectCollectionForIdHasClaimUrl,
|
makeSelectCollectionForIdHasClaimUrl,
|
||||||
|
@ -36,7 +37,7 @@ import ClaimPreview from './view';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
const select = (state, props) => {
|
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 collectionId = props.collectionId;
|
||||||
const repostedClaim = claim && claim.reposted_claim;
|
const repostedClaim = claim && claim.reposted_claim;
|
||||||
const contentClaim = repostedClaim || claim;
|
const contentClaim = repostedClaim || claim;
|
||||||
|
@ -106,6 +107,7 @@ const perform = (dispatch) => ({
|
||||||
dispatch(doToggleLoopList(collectionId, false, true));
|
dispatch(doToggleLoopList(collectionId, false, true));
|
||||||
dispatch(doToggleShuffleList(undefined, collectionId, true, true));
|
dispatch(doToggleShuffleList(undefined, collectionId, true, true));
|
||||||
},
|
},
|
||||||
|
doRemovePersonalRecommendation: (uri) => dispatch(doRemovePersonalRecommendation(uri)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(select, perform)(ClaimPreview);
|
export default connect(select, perform)(ClaimPreview);
|
||||||
|
|
|
@ -53,6 +53,7 @@ type Props = {
|
||||||
claimInCollection: boolean,
|
claimInCollection: boolean,
|
||||||
collectionId: string,
|
collectionId: string,
|
||||||
isMyCollection: boolean,
|
isMyCollection: boolean,
|
||||||
|
fypId?: string,
|
||||||
doToast: ({ message: string, isError?: boolean }) => void,
|
doToast: ({ message: string, isError?: boolean }) => void,
|
||||||
claimIsMine: boolean,
|
claimIsMine: boolean,
|
||||||
fileInfo: FileListItem,
|
fileInfo: FileListItem,
|
||||||
|
@ -70,6 +71,7 @@ type Props = {
|
||||||
lastUsedCollection: ?Collection,
|
lastUsedCollection: ?Collection,
|
||||||
hasClaimInLastUsedCollection: boolean,
|
hasClaimInLastUsedCollection: boolean,
|
||||||
lastUsedCollectionIsNotBuiltin: boolean,
|
lastUsedCollectionIsNotBuiltin: boolean,
|
||||||
|
doRemovePersonalRecommendation: (uri: string) => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
function ClaimMenuList(props: Props) {
|
function ClaimMenuList(props: Props) {
|
||||||
|
@ -97,6 +99,7 @@ function ClaimMenuList(props: Props) {
|
||||||
hasClaimInFavorites,
|
hasClaimInFavorites,
|
||||||
collectionId,
|
collectionId,
|
||||||
isMyCollection,
|
isMyCollection,
|
||||||
|
fypId,
|
||||||
doToast,
|
doToast,
|
||||||
claimIsMine,
|
claimIsMine,
|
||||||
fileInfo,
|
fileInfo,
|
||||||
|
@ -114,6 +117,7 @@ function ClaimMenuList(props: Props) {
|
||||||
lastUsedCollection,
|
lastUsedCollection,
|
||||||
hasClaimInLastUsedCollection,
|
hasClaimInLastUsedCollection,
|
||||||
lastUsedCollectionIsNotBuiltin,
|
lastUsedCollectionIsNotBuiltin,
|
||||||
|
doRemovePersonalRecommendation,
|
||||||
} = props;
|
} = props;
|
||||||
const [doShuffle, setDoShuffle] = React.useState(false);
|
const [doShuffle, setDoShuffle] = React.useState(false);
|
||||||
const incognitoClaim = contentChannelUri && !contentChannelUri.includes('@');
|
const incognitoClaim = contentChannelUri && !contentChannelUri.includes('@');
|
||||||
|
@ -282,6 +286,19 @@ function ClaimMenuList(props: Props) {
|
||||||
<Icon size={20} icon={ICONS.MORE_VERTICAL} />
|
<Icon size={20} icon={ICONS.MORE_VERTICAL} />
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
<MenuList className="menu__list">
|
<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 */}
|
{/* COLLECTION OPERATIONS */}
|
||||||
{collectionId && isCollectionClaim ? (
|
{collectionId && isCollectionClaim ? (
|
||||||
|
|
|
@ -242,7 +242,7 @@ function ClaimPreviewTile(props: Props) {
|
||||||
)}
|
)}
|
||||||
</h2>
|
</h2>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
<ClaimMenuList uri={uri} collectionId={listId} channelUri={channelUri} />
|
<ClaimMenuList uri={uri} collectionId={listId} fypId={fypId} channelUri={channelUri} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default function FileHideRecommendation(props: Props) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
const label = __('I dislike this');
|
const label = __('Not interested');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
|
|
Loading…
Add table
Reference in a new issue