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

Icon button variations #898

Open
wants to merge 16 commits into
base: apps.humanatlas.io
Choose a base branch
from
Open

Conversation

edlu77
Copy link
Contributor

@edlu77 edlu77 commented Jan 14, 2025

Update icon button with new variations #814

@edlu77 edlu77 requested a review from axdanbol January 14, 2025 21:33
@edlu77 edlu77 self-assigned this Jan 14, 2025
Copy link

nx-cloud bot commented Jan 14, 2025

View your CI Pipeline Execution ↗ for commit 69f68b1.

Command Status Duration Result
nx affected --target=test --parallel=3 --exclud... ✅ Succeeded 32s View ↗
nx affected --target=lint --parallel=3 ✅ Succeeded 10s View ↗
nx affected --target=build --parallel=3 ✅ Succeeded <1s View ↗
nx affected --target=test --parallel=3 --exclud... ✅ Succeeded <1s View ↗
nx affected --target=test-doc-coverage --parall... ✅ Succeeded <1s View ↗
nx-cloud record -- npx nx format:check ✅ Succeeded 4s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-15 22:39:54 UTC

Copy link

github-actions bot commented Jan 14, 2025

🚀 Preview Deploy Report Updated

✅ Successfully deployed preview here

Copy link
Contributor

@axdanbol axdanbol left a comment

Choose a reason for hiding this comment

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

Align to spec.
Also please check the different applications and update them to use the correct icon button variants.


&:focus-visible {
outline: 2px solid var(--sys-tertiary);
--mdc-icon-button-icon-color: var(--sys-secondary);
border: 2px solid var(--sys-tertiary);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change back to using outline. Using border causes a layout shift making the icon move slightly

--mat-icon-button-focus-state-layer-opacity: 0;
--mdc-icon-button-icon-color: var(--sys-on-tertiary-fixed);

&:focus-visible {
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this entire block after the variant selectors at line 30 to give it higher priority. Currently the icon color does not change when focused

}

mat-icon {
height: var(--mdc-icon-button-icon-size);
width: var(--mdc-icon-button-icon-size);
font-size: var(--mdc-icon-button-icon-size);
}

&.icon-button-variant-light {
Copy link
Contributor

Choose a reason for hiding this comment

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

The ripple colors need to be changed to match the spec

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add stories show casing the different variants

})
export class IconButtonVariantDirective {
/** Input for icon button color variant */
readonly variant = input<IconButtonVariant>('default', { alias: 'hraIconButtonVariant' });
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's change the default value to dark. It seems to be the most commonly used version across the apps. Let's also change the string default to color since it is no longer the default

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

Successfully merging this pull request may close these issues.

2 participants