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(chrome-ext): palette generator #1663

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Conversation

matthieu-crouzet
Copy link
Contributor

@matthieu-crouzet matthieu-crouzet commented Apr 15, 2024

@matthieu-crouzet matthieu-crouzet requested a review from a team as a code owner April 15, 2024 16:20
kpanot
kpanot previously approved these changes Apr 17, 2024
</div>
<label class="form-label text-nowrap fw-semibold my-0 ms-4" [for]="group.name">{{ group.name }}</label>
@if (form.value.variables?.[group.defaultVariable.name] !== group.defaultVariable.defaultValue) {
<i class="form-text text-warning icon-undo position-absolute end-0 me-10" ngbTooltip="Reset all colors of {{group.name}}" (click)="onPaletteReset(group, $event)"></i>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good practice in terms of accessibility to have a clickable element inside the header of the accordion which is already clickable

fpaul-1A
fpaul-1A previously approved these changes Apr 18, 2024
<span class="my-auto">{{ resolvedColor }}</span>
<span class="ms-auto my-auto">
<span ngbTooltip="Accessibility score for small text" [style.fontSize]="'12px'" class="me-2">{{ resolvedColor | accessibilityConstrastScore : (resolvedColor | contrast) : 'small' }}</span>
<span ngbTooltip="Accessibility score for large text" [style.fontSize]="'24px'">{{ resolvedColor | accessibilityConstrastScore : (resolvedColor | contrast) : 'large' }}</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use style.fontSize and use a hard coded value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoded value because for accessibility large text start at 24px and for small text I picked 12px to let the user see a big difference between large and small without having it too small to be read

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for [style.fontSize]="'24px'" I found it clearer than style="{font-size: 24px'} and Angular provide autocomplete for [style.<...>]

fpaul-1A
fpaul-1A previously approved these changes Apr 18, 2024
@matthieu-crouzet matthieu-crouzet force-pushed the feat/chrome-palette branch 5 times, most recently from 68f590f to e38991b Compare April 19, 2024 11:55
@matthieu-crouzet matthieu-crouzet added this pull request to the merge queue Apr 19, 2024
Merged via the queue into main with commit 75fa859 Apr 19, 2024
22 checks passed
@matthieu-crouzet matthieu-crouzet deleted the feat/chrome-palette branch April 19, 2024 13:47
@@ -94,6 +95,7 @@
"@o3r/components": "workspace:^",
"@o3r/configuration": "workspace:^",
"@o3r/core": "workspace:^",
"@o3r/design": "workspace:^",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True I will fix it in another PR as this one is merged :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

standalone: true
})
export class ColorPipe implements PipeTransform {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an internal pipe expose only in this folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants