-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Map vscode theme colors to pf variables for improved light mode sup…
…port (#303) Resolves: #221 - Maps theme background / foreground colors to pf. - Creates a wrapper component for sent/received messages in Resolution for easier tracking of styles applied for each message type - Moves resolution page components to a new sub dir --------- Signed-off-by: Ian Bolton <[email protected]>
- Loading branch information
1 parent
d742eef
commit 7954009
Showing
16 changed files
with
183 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ test_out | |
.vscode-test/ | ||
*.vsix | ||
org.eclipse* | ||
*.log |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.message { | ||
color: var(--vscode-foreground); | ||
} | ||
.incident-table-card { | ||
background-color: var(--vscode-editor-background); | ||
color: var(--vscode-foreground); | ||
} | ||
.incident-table { | ||
color: var(--vscode-foreground) !important; | ||
} | ||
.line-number { | ||
color: var(--vscode-foreground); | ||
} |
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
webview-ui/src/components/ResolutionsPage/ReceivedMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import { FlexItem, Label } from "@patternfly/react-core"; | ||
|
||
interface ReceivedMessageProps { | ||
children: React.ReactNode; | ||
className?: string; | ||
} | ||
|
||
export const ReceivedMessage: React.FC<ReceivedMessageProps> = ({ children, className = "" }) => { | ||
return ( | ||
<FlexItem className={`response-wrapper ${className}`}> | ||
<Label color="blue">{children}</Label> | ||
</FlexItem> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import { FlexItem, Label } from "@patternfly/react-core"; | ||
|
||
interface SentMessageProps { | ||
children: React.ReactNode; | ||
className?: string; | ||
} | ||
|
||
export const SentMessage: React.FC<SentMessageProps> = ({ children, className = "" }) => { | ||
return ( | ||
<FlexItem className={`response-wrapper ${className}`}> | ||
<Label className="resolutions-show-in-light" color="yellow"> | ||
{children} | ||
</Label> | ||
<Label className="resolutions-show-in-dark" variant="outline"> | ||
{children} | ||
</Label> | ||
</FlexItem> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,5 @@ | |
display: flex; | ||
align-items: center; | ||
padding: 6px; | ||
color: black; | ||
} |
72 changes: 72 additions & 0 deletions
72
webview-ui/src/components/ResolutionsPage/resolutionsPage.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* Base chat container styles */ | ||
.chat-card-container { | ||
width: 80%; | ||
min-width: 400px; | ||
display: flex; | ||
flex-direction: row-reverse; | ||
margin: 8px 0; | ||
} | ||
|
||
/* Message bubble base styles */ | ||
.pf-v6-c-card.chat-bubble { | ||
max-width: 80%; | ||
border-radius: 20px; | ||
padding: 12px; | ||
margin: 4px 0; | ||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
/* Sent message (yellow) */ | ||
.pf-v6-c-card.pf-m-yellow { | ||
border-top-right-radius: 4px; | ||
background-color: var(--pf-v6-global--primary-color--100); | ||
color: var(--pf-v6-global--Color--light-100); | ||
} | ||
|
||
/* VSCode dark theme adjustment for sent messages */ | ||
.vscode-dark .pf-v6-c-card.pf-m-yellow { | ||
background-color: var(--vscode-textLink-foreground); | ||
} | ||
|
||
/* High contrast theme adjustment for sent messages */ | ||
.vscode-high-contrast .pf-v6-c-card.pf-m-yellow { | ||
background-color: var(--vscode-textLink-activeForeground); | ||
border: 1px solid var(--vscode-contrastBorder); | ||
} | ||
|
||
/* Received message (blue) */ | ||
.pf-v6-c-card.pf-m-blue { | ||
border-top-left-radius: 4px; | ||
background-color: var(--pf-v6-global--BackgroundColor--200); | ||
} | ||
|
||
/* VSCode dark theme adjustment for received messages */ | ||
.vscode-dark .pf-v6-c-card.pf-m-blue { | ||
background-color: var(--vscode-editor-inactiveSelectionBackground); | ||
} | ||
|
||
/* High contrast theme adjustment for received messages */ | ||
.vscode-high-contrast .pf-v6-c-card.pf-m-blue { | ||
background-color: var(--vscode-editor-background); | ||
border: 1px solid var(--vscode-contrastBorder); | ||
} | ||
|
||
/* Label visibility control */ | ||
.resolutions-show-in-dark, | ||
.pf-v6-theme-dark .resolutions-show-in-light { | ||
display: none; | ||
} | ||
|
||
.pf-v6-theme-dark .resolutions-show-in-dark { | ||
display: revert; | ||
} | ||
|
||
/* Ensure text remains readable in all themes */ | ||
.chat-bubble .pf-v6-c-card__body { | ||
color: var(--vscode-editor-foreground); | ||
} | ||
|
||
/* High contrast specific text adjustments */ | ||
.vscode-high-contrast .chat-bubble .pf-v6-c-card__body { | ||
color: var(--vscode-editor-foreground); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.