@@ -25,7 +25,7 @@ import "../../tags/Custom";
2525 * Utils and common components
2626 */
2727import { Space } from "../../common/Space/Space" ;
28- import { Button } from "@humansignal/ui" ;
28+ import { Button , EmptyState , IconCheck } from "@humansignal/ui" ;
2929import { isStarterCloudPlan } from "@humansignal/core" ;
3030import { cn } from "../../utils/bem" ;
3131import { FF_BULK_ANNOTATION , FF_LSDV_4620_3_ML , FF_SIMPLE_INIT , isFF } from "../../utils/feature-flags" ;
@@ -81,22 +81,35 @@ class App extends Component {
8181 }
8282
8383 renderSuccess ( ) {
84+ const messages = getEnv ( this . props . store ) . messages ;
8485 return (
8586 < div className = { cn ( "editor" ) . toClassName ( ) } >
86- < Result status = "success" title = { getEnv ( this . props . store ) . messages . DONE } />
87+ < EmptyState
88+ variant = "positive"
89+ icon = { < IconCheck /> }
90+ title = { messages . DONE }
91+ description = "Your annotation has been submitted."
92+ />
8793 </ div >
8894 ) ;
8995 }
9096
9197 renderNoAnnotation ( ) {
98+ const messages = getEnv ( this . props . store ) . messages ;
9299 return (
93100 < div className = { cn ( "editor" ) . toClassName ( ) } >
94- < Result status = "success" title = { getEnv ( this . props . store ) . messages . NO_COMP_LEFT } />
101+ < EmptyState
102+ variant = "positive"
103+ icon = { < IconCheck /> }
104+ title = { messages . NO_COMP_LEFT }
105+ description = "You've viewed all annotations for this task."
106+ />
95107 </ div >
96108 ) ;
97109 }
98110
99111 renderNothingToLabel ( store ) {
112+ const messages = getEnv ( this . props . store ) . messages ;
100113 return (
101114 < div
102115 className = { cn ( "editor" ) . toClassName ( ) }
@@ -108,18 +121,25 @@ class App extends Component {
108121 paddingBottom : "30vh" ,
109122 } }
110123 >
111- < Result status = "success" title = { getEnv ( this . props . store ) . messages . NO_NEXT_TASK } />
112- < div className = { cn ( "sub__result" ) . toClassName ( ) } > All tasks in the queue have been completed</ div >
113- { store . taskHistory . length > 0 && (
114- < Button
115- onClick = { ( e ) => store . prevTask ( e , true ) }
116- variant = "neutral"
117- className = "mx-0 my-4"
118- aria-label = "Previous task"
119- >
120- Go to Previous Task
121- </ Button >
122- ) }
124+ < EmptyState
125+ variant = "positive"
126+ icon = { < IconCheck /> }
127+ title = { messages . NO_NEXT_TASK }
128+ description = "All tasks in the queue have been completed"
129+ actions = {
130+ store . taskHistory . length > 0 ? (
131+ < Button
132+ onClick = { ( e ) => store . prevTask ( e , true ) }
133+ variant = "primary"
134+ aria-label = "Previous task"
135+ data-testid = "editor-empty-queue-previous-task"
136+ >
137+ Go to Previous Task
138+ </ Button >
139+ ) : undefined
140+ }
141+ data-testid = "editor-empty-queue"
142+ />
123143 </ div >
124144 ) ;
125145 }
@@ -132,7 +152,7 @@ class App extends Component {
132152 ) ;
133153 }
134154
135- renderConfigValidationException ( store ) {
155+ renderConfigValidationException ( _store ) {
136156 return (
137157 < div className = { cn ( "main-view" ) . toClassName ( ) } >
138158 < div className = { cn ( "main-view" ) . elem ( "annotation" ) . toClassName ( ) } >
0 commit comments