Skip to content

Commit

Permalink
CV2-5048: Delete the user profile page (#2053)
Browse files Browse the repository at this point in the history
* Delete the user profile page

Reference: CV2-5048

* add formattedMessage to make strings translated

Reference: CV2-5048
  • Loading branch information
danielevalverde authored Aug 14, 2024
1 parent 8ac4d2c commit 3e7ff16
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 222 deletions.
5 changes: 5 additions & 0 deletions localization/react-intl/src/app/components/task/Task.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@
"description": "This is a label that appears while a file upload is ongoing.",
"defaultMessage": "Saving {file}…"
},
{
"id": "metadata.savedByLabel",
"description": "This is a label that indicates when and by whom the task was saved.",
"defaultMessage": "Saved {timeAgo} by {userName}"
},
{
"id": "task.uploadWarningTitle",
"description": "Warning to prevent user from navigating away while upload is running",
Expand Down
5 changes: 5 additions & 0 deletions localization/react-intl/src/app/components/task/Tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"description": "Error message displayed when a URL is not in the correct format in the form, which prevents the form from being saved.",
"defaultMessage": "Could not save, at least one URL is invalid"
},
{
"id": "tasks.savedByLabel",
"description": "This is a label that indicates when and by whom the task was saved.",
"defaultMessage": "Saved {timeAgo} by {userName}"
},
{
"id": "tasks.contentTrash",
"description": "This message tells the user that the content typically shown in unavailable when the item is in the trash",
Expand Down
3 changes: 0 additions & 3 deletions src/app/components/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import UserConfirmPage from './UserConfirmPage';
import UserPasswordChange from './UserPasswordChange';
import UserPasswordReset from './login/UserPasswordReset';
import ErrorBoundary from './error/ErrorBoundary';
import User from './user/User';
import Me from './user/Me';
import Team from './team/Team';
import AssignedToMe from './team/AssignedToMe';
Expand Down Expand Up @@ -77,8 +76,6 @@ class Root extends Component {
<Route path="check/user/password-reset" component={UserPasswordReset} public />
<Route path="check/user/password-change" component={UserPasswordChange} public />
<Route path="check/not-found" component={NotFound} public />
<Route path="check/user/:userId/edit" isEditing component={User} />
<Route path="check/user/:userId(/:tab)" component={User} />
<Route path="check/me/edit" isEditing component={Me} />
<Route path="check/me/ui-sandbox" component={Sandbox} />
<Route path="check/me/ui-sandbox/crash" component={SandboxCrash} />
Expand Down
20 changes: 0 additions & 20 deletions src/app/components/layout/ProfileLink.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/app/components/layout/ProfileLink.test.js

This file was deleted.

19 changes: 6 additions & 13 deletions src/app/components/task/Task.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import GenericUnknownErrorMessage from '../GenericUnknownErrorMessage';
import NavigateAwayDialog from '../NavigateAwayDialog';
import ParsedText from '../ParsedText';
import { getErrorMessage } from '../../helpers';
import ProfileLink from '../layout/ProfileLink';
import CheckContext from '../../CheckContext';
import UpdateTaskMutation from '../../relay/mutations/UpdateTaskMutation';
import UpdateDynamicMutation from '../../relay/mutations/UpdateDynamicMutation';
Expand All @@ -31,7 +30,6 @@ function getResponseData(response) {
if (response.attribution) {
response.attribution.edges.forEach((user) => {
const u = user.node;
data.by.push(<ProfileLink user={u || null} />);
data.byPictures.push(u);
});
}
Expand Down Expand Up @@ -531,13 +529,12 @@ class Task extends Component {
return (
responseObj && responseObj.annotator ? (
<div className={styles['task-footer']}>
Saved {timeAgo} by{' '}
<a
href={`/check/user/${responseObj.annotator.user?.dbid}`}
title={responseObj.annotator.user?.name}
>
{responseObj.annotator.user?.name}
</a>
<FormattedMessage
id="task.savedByLabel"
defaultMessage="Saved {timeAgo} by {userName}"
description="This is a label that indicates when and by whom the task was saved."
values={{ timeAgo, userName: responseObj.annotator.user?.name }}
/>
</div>)
: null
);
Expand Down Expand Up @@ -781,11 +778,7 @@ class Task extends Component {
const taskAnswered = !!response;

const assignments = task.assignments.edges;
const assignmentComponents = [];
assignments.forEach((assignment) => {
assignmentComponents.push(
<ProfileLink user={assignment.node || null} />,
);
if (currentUser && assignment.node.dbid === currentUser.dbid) {
taskAssigned = true;
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/components/task/Tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ const Tasks = ({
}
return (
<div className={inputStyles['form-footer-actions-context']}>
Saved {moment(latestEditInfo.latestDate).fromNow()} by{' '}
<a
href={`/check/user/${latestEditInfo.latestAuthorDbid}`}
>
{latestEditInfo.latestAuthorName}
</a>
<FormattedMessage
id="tasks.savedByLabel"
defaultMessage="Saved {timeAgo} by {userName}"
description="This is a label that indicates when and by whom the task was saved."
values={{ timeAgo: moment(latestEditInfo.latestDate).fromNow(), userName: latestEditInfo.latestAuthorName }}
/>
</div>
);
};
Expand Down
29 changes: 0 additions & 29 deletions src/app/components/user/User.js

This file was deleted.

47 changes: 0 additions & 47 deletions src/app/components/user/UserComponent.js

This file was deleted.

55 changes: 0 additions & 55 deletions src/app/components/user/UserInfo.js

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/relay/UserRoute.js

This file was deleted.

19 changes: 0 additions & 19 deletions src/app/relay/userFragment.js

This file was deleted.

0 comments on commit 3e7ff16

Please sign in to comment.