Skip to content

Commit

Permalink
fix: restore no custom annotations in table
Browse files Browse the repository at this point in the history
  • Loading branch information
whelmich committed Nov 24, 2024
1 parent 67db1e8 commit 4daff90
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 40 deletions.
25 changes: 0 additions & 25 deletions app/workspace/projects/annotation/ProjectAnnotationView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ const getCurrentView = () => {
return "link-centric";
case "#metadata-centric":
return "metadata-centric";
case "#custom-centric":
return "custom-centric";
default:
// get view from session storage (bookmark-centric OR annotation-centric)
return SessionStorageHandler.get(KEYS.view, "classification-centric");
Expand Down Expand Up @@ -159,19 +157,6 @@ const ProjectAnnotationView = ({
/>
);
break;

case "custom-centric":
viewComponent = (
<AnnotationTable
{...defaultProps}
key="custom"
type="custom"
title="Custom"
filters={["search", "classification", "bookmarkGroup"]}
sort={["created", "a-z-text", "z-a-text"]}
/>
);
break;
}

return (
Expand Down Expand Up @@ -223,16 +208,6 @@ const ProjectAnnotationView = ({
/>

<label htmlFor="view-metadata">Metadata cards</label>

<input
type="radio"
name="view"
value="custom-centric"
id="view-custom"
checked={view === "custom-centric"}
onChange={changeView}
/>
<label htmlFor="view-custom">Custom</label>
</div>
</div>
</div>
Expand Down
36 changes: 21 additions & 15 deletions app/workspace/projects/bookmark/BookmarkRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,27 @@ class BookmarkRow extends React.PureComponent {
return (
<tr key={"a__" + i}>
<td className="type bold">
<Link
to={
"/workspace/projects/" +
this.props.project.id +
"/annotations#" +
annotation.annotationType +
"-centric"
}
>
{AnnotationTranslator(annotation)}
{isReflection &&
` (${annotation.level || defaultReflectionLevel})`}

{info}
</Link>
{isReflection ? (
<>
{AnnotationTranslator(annotation)}
{isReflection &&
` (${annotation.level || defaultReflectionLevel})`}

{info}
</>
) : (
<Link
to={
"/workspace/projects/" +
this.props.project.id +
"/annotations#" +
annotation.annotationType +
"-centric"
}
>
{AnnotationTranslator(annotation)}
</Link>
)}
</td>
<td
className={classNames("content", {
Expand Down

0 comments on commit 4daff90

Please sign in to comment.