Skip to content

Commit bd305b5

Browse files
committed
Make things bold
1 parent 6cc8183 commit bd305b5

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

projects/packages/forms/src/dashboard/inbox/dataviews/index.js

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,20 @@ export default function InboxView() {
225225
() => ( { totalItems, totalPages } ),
226226
[ totalItems, totalPages ]
227227
);
228+
229+
const wrapperUnread = ( isUnread, itemValue ) => {
230+
if ( isUnread ) {
231+
return (
232+
<span
233+
className="jp-forms__inbox__unread-indicator"
234+
aria-label={ __( 'Unread', 'jetpack-forms' ) }
235+
>
236+
{ itemValue }
237+
</span>
238+
);
239+
}
240+
return itemValue;
241+
};
228242
const fields = useMemo(
229243
() => [
230244
{
@@ -234,19 +248,7 @@ export default function InboxView() {
234248
const authorInfo = decodeEntities(
235249
item.author_name || item.author_email || item.author_url || item.ip
236250
);
237-
return (
238-
<>
239-
{ item.is_unread && (
240-
<span
241-
className="jp-forms__inbox__unread-indicator"
242-
aria-label={ __( 'Unread', 'jetpack-forms' ) }
243-
>
244-
245-
</span>
246-
) }
247-
{ authorInfo }
248-
</>
249-
);
251+
return <>{ wrapperUnread( item.is_unread, authorInfo ) }</>;
250252
},
251253
getValue: ( { item } ) => {
252254
return decodeEntities(
@@ -259,7 +261,9 @@ export default function InboxView() {
259261
{
260262
id: 'date',
261263
label: __( 'Date', 'jetpack-forms' ),
262-
render: ( { item } ) => dateI18n( dateSettings.formats.date, item.date ),
264+
render: ( { item } ) => {
265+
return wrapperUnread( item.is_unread, dateI18n( dateSettings.formats.date, item.date ) );
266+
},
263267
elements: ( filterOptions?.date || [] ).map( _filter => {
264268
const date = new Date();
265269
date.setDate( 1 );
@@ -283,7 +287,10 @@ export default function InboxView() {
283287
render: ( { item } ) => {
284288
return (
285289
<ExternalLink href={ item.entry_permalink }>
286-
{ decodeEntities( item.entry_title ) || getPath( item ) }
290+
{ wrapperUnread(
291+
item.is_unread,
292+
decodeEntities( item.entry_title ) || getPath( item )
293+
) }
287294
</ExternalLink>
288295
);
289296
},

projects/packages/forms/src/dashboard/inbox/style.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,10 @@ body.jetpack_page_jetpack-forms-admin {
508508
}
509509

510510
.jp-forms__inbox__unread-indicator {
511-
color: #d63638;
512-
font-size: 8px;
513-
margin-right: 4.5px;
514-
margin-left: -12px;
515-
vertical-align: middle;
511+
font-weight: 600;
512+
color: #222;
513+
}
514+
515+
a .jp-forms__inbox__unread-indicator {
516+
color: #135e96;
516517
}

0 commit comments

Comments
 (0)