Skip to content

Commit 2f73282

Browse files
RI-7400: Change font size/colors across the app #1 (#4992)
* RI-7400: key details for all key types * RI-7400: fix color for set members * RI-7400: resolve review comments
1 parent cbcce53 commit 2f73282

File tree

14 files changed

+46
-34
lines changed

14 files changed

+46
-34
lines changed

redisinsight/ui/src/components/virtual-grid/VirtualGrid.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ const VirtualGrid = (props: IProps) => {
153153
preventSelect = true
154154
}
155155

156-
const renderNotEmptyContent = (text: string) => text || <div>&nbsp;</div>
156+
const renderNotEmptyContent = (text: string) => (
157+
<Text color="primary" component="span" variant="semiBold">
158+
{text || <>&nbsp;</>}
159+
</Text>
160+
)
157161

158162
const Cell = ({
159163
columnIndex,
@@ -371,7 +375,7 @@ const VirtualGrid = (props: IProps) => {
371375
</AutoSizer>
372376
)}
373377
{items.length === 1 && (
374-
<Text className={styles.noItems} color="subdued">
378+
<Text className={styles.noItems}>
375379
{loading ? loadingMsg : noItemsMessage}
376380
</Text>
377381
)}

redisinsight/ui/src/components/virtual-table/VirtualTable.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ const VirtualTable = (props: IProps) => {
383383
className={styles.tableRowCell}
384384
style={{ justifyContent: column.alignment, whiteSpace: 'normal' }}
385385
>
386-
<Text color="subdued" style={{ maxWidth: '100%' }}>
386+
<Text style={{ maxWidth: '100%' }}>
387387
<div
388388
style={{ display: 'flex' }}
389389
className={column.truncateText ? 'truncateText' : ''}
@@ -436,7 +436,7 @@ const VirtualTable = (props: IProps) => {
436436
data-testid="score-button"
437437
style={{ justifyContent: column.alignment }}
438438
>
439-
<Text size="m" className={cellClass}>
439+
<Text size="m" className={cellClass} variant="semiBold">
440440
<span>{column.label}</span>
441441
</Text>
442442
</button>
@@ -454,7 +454,7 @@ const VirtualTable = (props: IProps) => {
454454
flex: '1',
455455
}}
456456
>
457-
<Text size="m" className={cellClass}>
457+
<Text size="m" className={cellClass} variant="semiBold">
458458
<span>{column.label}</span>
459459
</Text>
460460
</div>

redisinsight/ui/src/pages/browser/modules/key-details/components/hash-details/hash-details-table/HashDetailsTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ const HashDetailsTable = (props: Props) => {
382382
)
383383

384384
return (
385-
<Text
386-
size="s"
385+
<Text color="secondary"
387386
style={{ maxWidth: '100%', whiteSpace: 'break-spaces' }}
388387
component="div"
389388
>

redisinsight/ui/src/pages/browser/modules/key-details/components/list-details/list-details-table/ListDetailsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ const ListDetailsTable = () => {
262262
const cellContent = index?.toString().substring(0, 200)
263263
const tooltipContent = formatLongName(index?.toString())
264264
return (
265-
<Text color="subdued" size="s" style={{ maxWidth: '100%' }}>
265+
<Text color="secondary" style={{ maxWidth: '100%' }}>
266266
<div
267267
style={{ display: 'flex' }}
268268
className="truncateText"

redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/set-details-table/SetDetailsTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,8 @@ const SetDetailsTable = (props: Props) => {
242242

243243
return (
244244
<Text
245+
color="secondary"
245246
component="div"
246-
color="subdued"
247-
size="s"
248247
style={{ maxWidth: '100%', whiteSpace: 'break-spaces' }}
249248
>
250249
<div

redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/consumers-view/ConsumersViewWrapper.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const ConsumersViewWrapper = (props: Props) => {
127127
const cellContent = viewName.substring(0, 200)
128128
const tooltipContent = formatLongName(viewName)
129129
return (
130-
<Text color="subdued" size="s" style={{ maxWidth: '100%' }}>
130+
<Text style={{ maxWidth: '100%' }} color="secondary">
131131
<div
132132
style={{ display: 'flex' }}
133133
className="truncateText"
@@ -156,6 +156,7 @@ const ConsumersViewWrapper = (props: Props) => {
156156
isSortable: true,
157157
headerClassName: 'streamItemHeader',
158158
headerCellClassName: 'truncateText',
159+
render: (cellData: number) => <Text color="secondary">{cellData}</Text>,
159160
},
160161
{
161162
id: 'idle',
@@ -168,7 +169,7 @@ const ConsumersViewWrapper = (props: Props) => {
168169
className: styles.cell,
169170
headerClassName: 'streamItemHeader',
170171
headerCellClassName: 'truncateText',
171-
render: (cellData: number) => numberWithSpaces(cellData),
172+
render: (cellData: number) => <Text color="secondary">{numberWithSpaces(cellData)}</Text>,
172173
},
173174
{
174175
id: 'actions',

redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/groups-view/GroupsViewWrapper.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ const GroupsViewWrapper = (props: Props) => {
221221
const cellContent = viewName.substring(0, 200)
222222
const tooltipContent = formatLongName(viewName)
223223
return (
224-
<Text color="subdued" size="s" style={{ maxWidth: '100%' }}>
224+
<Text style={{ maxWidth: '100%' }} color="secondary">
225225
<div
226226
style={{ display: 'flex' }}
227227
className="truncateText"
@@ -250,6 +250,14 @@ const GroupsViewWrapper = (props: Props) => {
250250
isSortable: true,
251251
headerClassName: 'streamItemHeader',
252252
headerCellClassName: 'truncateText',
253+
render: function Name(_name: string, { consumers }: IConsumerGroup) {
254+
return (
255+
<Text color="secondary">
256+
{consumers}
257+
</Text>
258+
)
259+
},
260+
253261
},
254262
{
255263
id: 'pending',
@@ -278,7 +286,7 @@ const GroupsViewWrapper = (props: Props) => {
278286
)
279287

280288
return (
281-
<Text size="s" style={{ maxWidth: '100%' }}>
289+
<Text style={{ maxWidth: '100%' }} color="secondary">
282290
<div
283291
style={{ display: 'flex' }}
284292
className="truncateText"
@@ -324,7 +332,7 @@ const GroupsViewWrapper = (props: Props) => {
324332
content={
325333
<div className={styles.editableCell}>
326334
<Text
327-
color="subdued"
335+
color="secondary"
328336
size="s"
329337
style={{ maxWidth: '100%' }}
330338
component="div"

redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/messages-view/MessagesViewWrapper.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const MessagesViewWrapper = (props: Props) => {
126126
return (
127127
<FlexItem>
128128
<Text
129-
color="subdued"
129+
color="secondary"
130130
size="s"
131131
style={{ maxWidth: '100%' }}
132132
className="truncateText streamItem"
@@ -159,7 +159,7 @@ const MessagesViewWrapper = (props: Props) => {
159159
return (
160160
<Text
161161
className="truncateText streamItem"
162-
color="subdued"
162+
color="secondary"
163163
size="s"
164164
data-testid={`stream-message-${id}-idle`}
165165
style={{ maxWidth: '100%' }}
@@ -176,6 +176,7 @@ const MessagesViewWrapper = (props: Props) => {
176176
truncateText: true,
177177
headerClassName: cx('streamItemHeader', styles.deliveredHeaderCell),
178178
headerCellClassName: 'truncateText',
179+
render: (cellData: number) => <Text color="secondary">{cellData}</Text>,
179180
},
180181
{
181182
id: 'actions',

redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-data-view/StreamDataViewWrapper.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,17 @@ const StreamDataViewWrapper = (props: Props) => {
153153
}}
154154
data-testid={`stream-field-name-${field}`}
155155
>
156-
<FormattedValue
157-
value={formattedValue}
158-
title={
159-
isValid
160-
? 'Field'
161-
: TEXT_FAILED_CONVENT_FORMATTER(viewFormatProp)
162-
}
163-
tooltipContent={tooltipContent}
164-
/>
156+
<Text variant="semiBold" color="primary">
157+
<FormattedValue
158+
value={formattedValue}
159+
title={
160+
isValid
161+
? 'Field'
162+
: TEXT_FAILED_CONVENT_FORMATTER(viewFormatProp)
163+
}
164+
tooltipContent={tooltipContent}
165+
/>
166+
</Text>
165167
</div>
166168
) : (
167169
<div>&nbsp;</div>
@@ -281,9 +283,9 @@ const StreamDataViewWrapper = (props: Props) => {
281283

282284
return (
283285
<Text
284-
size="s"
285286
style={{ maxWidth: '100%', minHeight: '36px' }}
286287
component="div"
288+
color="secondary"
287289
>
288290
<div
289291
style={{ display: 'flex', whiteSpace: 'break-spaces' }}
@@ -324,8 +326,8 @@ const StreamDataViewWrapper = (props: Props) => {
324326
<div style={{ minHeight: '38px' }}>
325327
{id.length < MAX_VISIBLE_LENGTH_STREAM_TIMESTAMP && (
326328
<Text
327-
color="subdued"
328329
size="s"
330+
color="secondary"
329331
style={{ maxWidth: '100%' }}
330332
component="div"
331333
>

redisinsight/ui/src/pages/browser/modules/key-details/components/stream-details/stream-details-body/styles.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ $cellPaddingWidth: 12px;
8282
}
8383

8484
:global(.streamItem) {
85-
color: var(--euiTextSubduedColor) !important;
8685
white-space: normal;
8786
max-width: 100%;
8887
word-break: break-all;

0 commit comments

Comments
 (0)