Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve block colors in visualizer nova #1436

Merged
merged 7 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client/src/app/components/nova/StatusPill.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@

&.status__ {
&success {
background-color: var(--message-confirmed-bg);
color: $mint-green-7;
background-color: $block-confirmed;
begonaalvarezd marked this conversation as resolved.
Show resolved Hide resolved
color: #3b3b3b;
}

&error {
background-color: var(--message-conflicting-bg);
}

&pending {
background-color: var(--light-bg);
color: #8493ad;
background-color: $block-pending;
color: white;
}
}
}
2 changes: 1 addition & 1 deletion client/src/features/visualizer-vivagraph/Visualizer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
left: 0;
width: 100%;
height: 100%;
background: var(---body-background);
background: var(--footer-bg-color);
}

.selected-node {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { ThemeMode } from "./enums";
export const MAX_VISIBLE_BLOCKS = 2500;

// colors
export const ACCEPTED_BLOCK_COLORS: string[] = ["#0101FF", "#0000DB", "#0101AB"];
export const PENDING_BLOCK_COLOR = "#5C84FA";
export const ACCEPTED_BLOCK_COLOR = "#C026D3";
export const CONFIRMED_BLOCK_COLOR = "#3CE5E1";
export const ORPHANED_BLOCK_COLOR = "#C026D3";
export const DROPPED_BLOCK_COLOR = ORPHANED_BLOCK_COLOR;
Expand All @@ -18,23 +19,22 @@ export const EDGE_COLOR_BEFORE: number = 0x0000ff55;
// colors by theme
export const PENDING_BLOCK_COLOR_LIGHTMODE = "#A6C3FC";
export const PENDING_BLOCK_COLOR_DARKMODE = "#5C84FA";
export const FINALIZED_BLOCK_COLOR_LIGHTMODE = "#5C84FA";
export const FINALIZED_BLOCK_COLOR_DARKMODE = "#000081";
export const FINALIZED_BLOCK_COLOR = "#0000DB";

export const THEME_BLOCK_COLORS: Record<ThemeMode, Record<BlockState, string | string[]>> = {
[ThemeMode.Dark]: {
accepted: ACCEPTED_BLOCK_COLORS,
pending: PENDING_BLOCK_COLOR_DARKMODE,
accepted: ACCEPTED_BLOCK_COLOR,
pending: PENDING_BLOCK_COLOR,
confirmed: CONFIRMED_BLOCK_COLOR,
finalized: FINALIZED_BLOCK_COLOR_DARKMODE,
finalized: FINALIZED_BLOCK_COLOR,
dropped: DROPPED_BLOCK_COLOR,
orphaned: ORPHANED_BLOCK_COLOR,
},
[ThemeMode.Light]: {
accepted: ACCEPTED_BLOCK_COLORS,
pending: PENDING_BLOCK_COLOR_LIGHTMODE,
accepted: ACCEPTED_BLOCK_COLOR,
pending: PENDING_BLOCK_COLOR,
confirmed: CONFIRMED_BLOCK_COLOR,
finalized: FINALIZED_BLOCK_COLOR_LIGHTMODE,
finalized: FINALIZED_BLOCK_COLOR,
dropped: DROPPED_BLOCK_COLOR,
orphaned: ORPHANED_BLOCK_COLOR,
},
Expand Down
4 changes: 4 additions & 0 deletions client/src/scss/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ $iota2-red-600: #e73131;
$iota2-red-700: #cf1919;
$iota2-red-800: #8e0b0b;
$iota2-red-900: #8a0000;
$block-pending: #5c84fa;
$block-accepted: #c026d3;
$block-confirmed: #3ce5e1;
$block-finalized: #0000db;
Loading