Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project Builder: update thumbnails options for Survey Task #7184

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions app/classifier/tasks/survey/editor.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,7 @@ module.exports = createReactClass
</label>
<p>
<small>
<strong>Default</strong> - will show thumbnails as small, medium, large, or not at all (when choices > 30) based on the number of choices shown. Note that volunteer-selected filters change the number of choices shown.
</small>
</p>
<p>
<small>
<strong>Show Small</strong> - will always show thumbnails as small, regardless of the number of choices shown.
<strong>Default</strong> - thumbnails will show when there are 30 choices or less, otherwise no thumbnails will be shown.
</small>
</p>
<p>
Expand All @@ -327,11 +322,10 @@ module.exports = createReactClass
<select
name="#{@props.taskPrefix}.thumbnails"
onChange={handleInputChange.bind @props.workflow}
value={if @props.task.thumbnails then @props.task.thumbnails else if @props.task.alwaysShowThumbnails then "show" else "default"}
value={if @props.task.thumbnails then @props.task.thumbnails else "default"}
>
<option value="default">Default</option>
<option value="hide">Hide</option>
<option value="show">Show</option>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note about backwards-compatibility: if we want to correctly display the "Show" option for existing projects that still have thumbnails = 'show', then we can change the code here to look something like...

{if @props.task.thumbnails is "show" then
  <option value="show">Show</option>
}

This means the "show" option correctly displays if and only if the Survey Task already has it set that way. As soon as the Survey Task changes to default or hide, the "show" option disappears.

</select>
</AutoSave>
</div>
Expand Down
Loading