File tree Expand file tree Collapse file tree
library-authoring/component-comparison Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ const ItemReviewList = ({
172172 downstreamBlockId : info . usageKey ,
173173 upstreamBlockId : outOfSyncItemsByKey [ info . usageKey ] . upstreamKey ,
174174 upstreamBlockVersionSynced : outOfSyncItemsByKey [ info . usageKey ] . versionSynced ,
175- isContainer : info . blockType === 'vertical' || info . blockType === 'sequencial ' || info . blockType === 'chapter' ,
175+ isContainer : info . blockType === 'vertical' || info . blockType === 'sequential ' || info . blockType === 'chapter' ,
176176 } ) ;
177177 } , [ outOfSyncItemsByKey ] ) ;
178178
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 Hyperlink ,
1111 Icon ,
1212 IconButton ,
13+ IconButtonWithTooltip ,
1314 useToggle ,
1415} from '@openedx/paragon' ;
1516import {
@@ -175,19 +176,11 @@ const CardHeader = ({
175176 ) : (
176177 < >
177178 { titleComponent }
178- { readyToSync && (
179- < IconButton
180- className = "item-card-button-icon"
181- data-testid = { `${ namePrefix } -sync-button` }
182- alt = { intl . formatMessage ( messages . readyToSyncButtonAlt ) }
183- iconAs = { SyncIcon }
184- onClick = { onClickSync }
185- />
186- ) }
187- < IconButton
179+ < IconButtonWithTooltip
188180 className = "item-card-button-icon"
189181 data-testid = { `${ namePrefix } -edit-button` }
190- alt = { intl . formatMessage ( messages . altButtonEdit ) }
182+ alt = { intl . formatMessage ( messages . altButtonRename ) }
183+ tooltipContent = { < div > { intl . formatMessage ( messages . altButtonRename ) } </ div > }
191184 iconAs = { EditIcon }
192185 onClick = { onClickEdit }
193186 // @ts -ignore
@@ -203,6 +196,15 @@ const CardHeader = ({
203196 < TagCount count = { contentTagCount } onClick = { openManageTagsDrawer } />
204197 ) }
205198 { extraActionsComponent }
199+ { readyToSync && (
200+ < IconButtonWithTooltip
201+ data-testid = { `${ namePrefix } -sync-button` }
202+ alt = { intl . formatMessage ( messages . readyToSyncButtonAlt ) }
203+ iconAs = { SyncIcon }
204+ tooltipContent = { < div > { intl . formatMessage ( messages . readyToSyncButtonAlt ) } </ div > }
205+ onClick = { onClickSync }
206+ />
207+ ) }
206208 < Dropdown data-testid = { `${ namePrefix } -card-header__menu` } onClick = { onClickMenuButton } >
207209 < Dropdown . Toggle
208210 className = "item-card-header__menu"
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ const messages = defineMessages({
3333 id : 'course-authoring.course-outline.card.status-badge.draft-unpublished-changes' ,
3434 defaultMessage : 'Draft (Unpublished changes)' ,
3535 } ,
36- altButtonEdit : {
36+ altButtonRename : {
3737 id : 'course-authoring.course-outline.card.button.edit.alt' ,
38- defaultMessage : 'Edit ' ,
38+ defaultMessage : 'Rename ' ,
3939 } ,
4040 menuPublish : {
4141 id : 'course-authoring.course-outline.card.menu.publish' ,
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ describe('<SectionCard />', () => {
230230
231231 // Should open compare preview modal
232232 expect ( screen . getByRole ( 'heading' , { name : / p r e v i e w c h a n g e s : s e c t i o n n a m e / i } ) ) . toBeInTheDocument ( ) ;
233- expect ( screen . getByText ( 'Preview not available' ) ) . toBeInTheDocument ( ) ;
233+ expect ( screen . getByText ( 'Preview not available for container changes at this time ' ) ) . toBeInTheDocument ( ) ;
234234
235235 // Click on accept changes
236236 const acceptChangesButton = screen . getByText ( / a c c e p t c h a n g e s / i) ;
@@ -250,7 +250,7 @@ describe('<SectionCard />', () => {
250250
251251 // Should open compare preview modal
252252 expect ( screen . getByRole ( 'heading' , { name : / p r e v i e w c h a n g e s : s e c t i o n n a m e / i } ) ) . toBeInTheDocument ( ) ;
253- expect ( screen . getByText ( 'Preview not available' ) ) . toBeInTheDocument ( ) ;
253+ expect ( screen . getByText ( 'Preview not available for container changes at this time ' ) ) . toBeInTheDocument ( ) ;
254254
255255 // Click on ignore changes
256256 const ignoreChangesButton = screen . getByRole ( 'button' , { name : / i g n o r e c h a n g e s / i } ) ;
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ describe('<SubsectionCard />', () => {
338338
339339 // Should open compare preview modal
340340 expect ( screen . getByRole ( 'heading' , { name : / p r e v i e w c h a n g e s : s u b s e c t i o n n a m e / i } ) ) . toBeInTheDocument ( ) ;
341- expect ( screen . getByText ( 'Preview not available' ) ) . toBeInTheDocument ( ) ;
341+ expect ( screen . getByText ( 'Preview not available for container changes at this time ' ) ) . toBeInTheDocument ( ) ;
342342
343343 // Click on accept changes
344344 const acceptChangesButton = screen . getByText ( / a c c e p t c h a n g e s / i) ;
@@ -358,7 +358,7 @@ describe('<SubsectionCard />', () => {
358358
359359 // Should open compare preview modal
360360 expect ( screen . getByRole ( 'heading' , { name : / p r e v i e w c h a n g e s : s u b s e c t i o n n a m e / i } ) ) . toBeInTheDocument ( ) ;
361- expect ( screen . getByText ( 'Preview not available' ) ) . toBeInTheDocument ( ) ;
361+ expect ( screen . getByText ( 'Preview not available for container changes at this time ' ) ) . toBeInTheDocument ( ) ;
362362
363363 // Click on ignore changes
364364 const ignoreChangesButton = screen . getByRole ( 'button' , { name : / i g n o r e c h a n g e s / i } ) ;
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ describe('<UnitCard />', () => {
198198
199199 // Should open compare preview modal
200200 expect ( screen . getByRole ( 'heading' , { name : / p r e v i e w c h a n g e s : u n i t n a m e / i } ) ) . toBeInTheDocument ( ) ;
201- expect ( screen . getByText ( 'Preview not available' ) ) . toBeInTheDocument ( ) ;
201+ expect ( screen . getByText ( 'Preview not available for container changes at this time ' ) ) . toBeInTheDocument ( ) ;
202202
203203 // Click on accept changes
204204 const acceptChangesButton = screen . getByText ( / a c c e p t c h a n g e s / i) ;
@@ -218,7 +218,7 @@ describe('<UnitCard />', () => {
218218
219219 // Should open compare preview modal
220220 expect ( screen . getByRole ( 'heading' , { name : / p r e v i e w c h a n g e s : u n i t n a m e / i } ) ) . toBeInTheDocument ( ) ;
221- expect ( screen . getByText ( 'Preview not available' ) ) . toBeInTheDocument ( ) ;
221+ expect ( screen . getByText ( 'Preview not available for container changes at this time ' ) ) . toBeInTheDocument ( ) ;
222222
223223 // Click on ignore changes
224224 const ignoreChangesButton = screen . getByRole ( 'button' , { name : / i g n o r e c h a n g e s / i } ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const messages = defineMessages({
1919 } ,
2020 previewNotAvailable : {
2121 id : 'course-authoring.library-authoring.component-comparison.preview-not-available' ,
22- defaultMessage : 'Preview not available' ,
22+ defaultMessage : 'Preview not available for container changes at this time ' ,
2323 description : 'Message shown when preview is not available.' ,
2424 } ,
2525} ) ;
You can’t perform that action at this time.
0 commit comments