File tree Expand file tree Collapse file tree 7 files changed +23
-21
lines changed
library-authoring/component-comparison Expand file tree Collapse file tree 7 files changed +23
-21
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ const ItemReviewList = ({
172
172
downstreamBlockId : info . usageKey ,
173
173
upstreamBlockId : outOfSyncItemsByKey [ info . usageKey ] . upstreamKey ,
174
174
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' ,
176
176
} ) ;
177
177
} , [ outOfSyncItemsByKey ] ) ;
178
178
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
Hyperlink ,
11
11
Icon ,
12
12
IconButton ,
13
+ IconButtonWithTooltip ,
13
14
useToggle ,
14
15
} from '@openedx/paragon' ;
15
16
import {
@@ -175,19 +176,11 @@ const CardHeader = ({
175
176
) : (
176
177
< >
177
178
{ 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
188
180
className = "item-card-button-icon"
189
181
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 > }
191
184
iconAs = { EditIcon }
192
185
onClick = { onClickEdit }
193
186
// @ts -ignore
@@ -203,6 +196,15 @@ const CardHeader = ({
203
196
< TagCount count = { contentTagCount } onClick = { openManageTagsDrawer } />
204
197
) }
205
198
{ 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
+ ) }
206
208
< Dropdown data-testid = { `${ namePrefix } -card-header__menu` } onClick = { onClickMenuButton } >
207
209
< Dropdown . Toggle
208
210
className = "item-card-header__menu"
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ const messages = defineMessages({
33
33
id : 'course-authoring.course-outline.card.status-badge.draft-unpublished-changes' ,
34
34
defaultMessage : 'Draft (Unpublished changes)' ,
35
35
} ,
36
- altButtonEdit : {
36
+ altButtonRename : {
37
37
id : 'course-authoring.course-outline.card.button.edit.alt' ,
38
- defaultMessage : 'Edit ' ,
38
+ defaultMessage : 'Rename ' ,
39
39
} ,
40
40
menuPublish : {
41
41
id : 'course-authoring.course-outline.card.menu.publish' ,
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ describe('<SectionCard />', () => {
230
230
231
231
// Should open compare preview modal
232
232
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 ( ) ;
234
234
235
235
// Click on accept changes
236
236
const acceptChangesButton = screen . getByText ( / a c c e p t c h a n g e s / i) ;
@@ -250,7 +250,7 @@ describe('<SectionCard />', () => {
250
250
251
251
// Should open compare preview modal
252
252
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 ( ) ;
254
254
255
255
// Click on ignore changes
256
256
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 />', () => {
338
338
339
339
// Should open compare preview modal
340
340
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 ( ) ;
342
342
343
343
// Click on accept changes
344
344
const acceptChangesButton = screen . getByText ( / a c c e p t c h a n g e s / i) ;
@@ -358,7 +358,7 @@ describe('<SubsectionCard />', () => {
358
358
359
359
// Should open compare preview modal
360
360
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 ( ) ;
362
362
363
363
// Click on ignore changes
364
364
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 />', () => {
198
198
199
199
// Should open compare preview modal
200
200
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 ( ) ;
202
202
203
203
// Click on accept changes
204
204
const acceptChangesButton = screen . getByText ( / a c c e p t c h a n g e s / i) ;
@@ -218,7 +218,7 @@ describe('<UnitCard />', () => {
218
218
219
219
// Should open compare preview modal
220
220
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 ( ) ;
222
222
223
223
// Click on ignore changes
224
224
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({
19
19
} ,
20
20
previewNotAvailable : {
21
21
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 ' ,
23
23
description : 'Message shown when preview is not available.' ,
24
24
} ,
25
25
} ) ;
You can’t perform that action at this time.
0 commit comments