Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
fix: LSDV-5235: Use alternate check for postpone based on presence of…
Browse files Browse the repository at this point in the history
… interfaces instead of FF (#1434)
  • Loading branch information
bmartel committed Jun 5, 2023
1 parent 715d8b7 commit 640d531
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/components/TopBar/CurrentTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { observer } from 'mobx-react';
import { useEffect, useMemo, useState } from 'react';
import { Button } from '../../common/Button/Button';
import { Block, Elem } from '../../utils/bem';
import { FF_DEV_3034, FF_DEV_3873, FF_DEV_4174, isFF } from '../../utils/feature-flags';
import { FF_DEV_3873, FF_DEV_4174, isFF } from '../../utils/feature-flags';
import { guidGenerator } from '../../utils/unique';
import { isDefined } from '../../utils/utilities';
import './CurrentTask.styl';
Expand Down Expand Up @@ -41,25 +41,23 @@ export const CurrentTask = observer(({ store }) => {
const historyEnabled = store.hasInterface('topbar:prevnext');
const showCounter = store.hasInterface('topbar:task-counter');

// @todo some interface?
let canPostpone = isFF(FF_DEV_3034)
&& !isDefined(store.annotationStore.selected.pk)
let canPostpone = !isDefined(store.annotationStore.selected.pk)
&& !store.canGoNextTask
&& !store.hasInterface('review')
&& store.hasInterface('postpone');


if (isFF(FF_DEV_4174)) {
if (store.hasInterface('annotations:comments') && isFF(FF_DEV_4174)) {
canPostpone = canPostpone && store.commentStore.addedCommentThisSession && (visibleComments >= initialCommentLength);
}

return (
<Elem name="section">
<Block name="current-task" mod={{ 'with-history': historyEnabled }} style={{
padding:isFF(FF_DEV_3873) && 0,
width:isFF(FF_DEV_3873) && 'auto',
padding: isFF(FF_DEV_3873) && 0,
width: isFF(FF_DEV_3873) && 'auto',
}}>
<Elem name="task-id" style={{ fontSize:isFF(FF_DEV_3873) ? 12 : 14 }}>
<Elem name="task-id" style={{ fontSize: isFF(FF_DEV_3873) ? 12 : 14 }}>
{store.task.id ?? guidGenerator()}
{historyEnabled && showCounter && (
<Elem name="task-count">
Expand Down

0 comments on commit 640d531

Please sign in to comment.