-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add link/button to show/hide task instructions #8431
Add link/button to show/hide task instructions #8431
Conversation
client/app/queue/TaskSnapshot.jsx
Outdated
name={(this.state.taskInstructionsIsVisible ? 'Hide ' : 'View ') + | ||
COPY.TASK_SNAPSHOT_TASK_INSTRUCTIONS_LABEL} | ||
onClick={this.toggleTaskInstructionsVisibility} /> | ||
{ this.state.taskInstructionsIsVisible && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put the "Show/hide task instructions" link text below the task instructions if the instructions are visible to match the mocks.
While we're in here messing with the |
client/app/queue/TaskSnapshot.jsx
Outdated
linkStyling | ||
styling={css({ padding: '0' })} | ||
name={(this.state.taskInstructionsIsVisible ? 'Hide ' : 'View ') + | ||
COPY.TASK_SNAPSHOT_TASK_INSTRUCTIONS_LABEL} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just make this two separate pieces of new copy in COPY.json instead of concatenating "Hide" and "View" every time.
client/COPY.json
Outdated
@@ -51,6 +51,9 @@ | |||
"TASK_SNAPSHOT_TASK_TYPE_LABEL": "Task", | |||
"TASK_SNAPSHOT_TASK_FROM_LABEL": "Assigned by", | |||
"TASK_SNAPSHOT_TASK_INSTRUCTIONS_LABEL": "Task instructions", | |||
"TASK_SNAPSHOT_VIEW_TASK_INSTRUCTIONS_LABEL": "View Task instructions", | |||
"TASK_SNAPSHOT_HIDE_TASK_INSTRUCTIONS_LABEL": "Hide Task instructions", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's lowercase "Task" to match the mocks.
spec/feature/queue/ama_queue_spec.rb
Outdated
@@ -257,6 +257,7 @@ | |||
|
|||
click_on "Pal Smith" | |||
|
|||
find("button", text: "View " + COPY::TASK_SNAPSHOT_TASK_INSTRUCTIONS_LABEL).click |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the tests to use the new copy we just added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Resolves #8217 - Add link/button to show/hide task instructions