-
-
Notifications
You must be signed in to change notification settings - Fork 18
Fixes #1437
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
Fixes #1437
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
|
|
||
| .field-view-value { | ||
| padding: 2px 6px; | ||
| border-radius: 4px; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| <span class="field-view-value">{{displayValue}}</span> | ||
| <span class="field-view-value" [style.backgroundColor]="backgroundColor">{{displayValue}}</span> | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,7 @@ import { BaseRecordViewFieldComponent } from '../base-record-view-field/base-rec | |||||
| }) | ||||||
| export class SelectRecordViewComponent extends BaseRecordViewFieldComponent implements OnInit { | ||||||
| public displayValue: string; | ||||||
| public backgroundColor: string; | ||||||
|
||||||
| public backgroundColor: string; | |
| public backgroundColor: string = 'transparent'; |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility concern: Setting a background color without ensuring sufficient text contrast can create readability issues for users with visual impairments. Consider either: 1) validating that the provided color has sufficient contrast with the text color, 2) automatically adjusting the text color based on the background, or 3) documenting that developers must provide WCAG-compliant color combinations.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
|
|
||
| .field-value { | ||
| padding: 2px 6px; | ||
| border-radius: 4px; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||
| <div class="field-display"> | ||||||
| <span class="field-value">{{displayValue}}</span> | ||||||
| <span class="field-value" [style.backgroundColor]="backgroundColor">{{displayValue}}</span> | ||||||
|
||||||
| <span class="field-value" [style.backgroundColor]="backgroundColor">{{displayValue}}</span> | |
| <span class="field-value" [style.backgroundColor]="safeBackgroundColor">{{displayValue}}</span> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; | |||||
| }) | ||||||
| export class SelectDisplayComponent extends BaseTableDisplayFieldComponent implements OnInit { | ||||||
| public displayValue: string; | ||||||
| public backgroundColor: string; | ||||||
|
||||||
| public backgroundColor: string; | |
| public backgroundColor: string = 'transparent'; |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility concern: Setting a background color without ensuring sufficient text contrast can create readability issues for users with visual impairments. Consider either: 1) validating that the provided color has sufficient contrast with the text color, 2) automatically adjusting the text color based on the background, or 3) documenting that developers must provide WCAG-compliant color combinations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential security vulnerability: Using user-provided color values directly in inline styles without validation could allow CSS injection attacks. Consider validating the
background_colorvalue against a whitelist of safe color formats (hex, rgb, rgba, named colors) or sanitizing the input before applying it to the DOM.