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: add sbb-checkup-list style class #3038

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dauriamarco
Copy link
Contributor

Closes #3008

@dauriamarco dauriamarco added pr: peer review required A peer review is required for this pull request pr: lead review required A lead review is required for this pull request pr: visual review required labels Aug 28, 2024
@dauriamarco dauriamarco self-assigned this Aug 28, 2024
@github-actions github-actions bot removed the pr: peer review required A peer review is required for this pull request label Aug 28, 2024
@github-actions github-actions bot temporarily deployed to pr3038 August 28, 2024 12:51 Inactive
@github-actions github-actions bot temporarily deployed to pr3038-diff August 28, 2024 12:51 Inactive
Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

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

Thank you! Some improvements needed.

@include base-marker-list;

--sbb-checkup-list-marker-icon: url('https://icons.app.sbb.ch/icons/circle-tick-medium.svg');
--sbb-checkup-list-marker-icon-color: var(--sbb-color-black);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would current or inherit work? If yes, we could leave out --sbb-checkup-list-color var as the consumer could just set "color:" on the list itself (I did not check if it really works ;) )

Suggested change
--sbb-checkup-list-marker-icon-color: var(--sbb-color-black);
--sbb-checkup-list-marker-icon-color: current;

}
}

@mixin base-marker-list {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest creating SCSS vars for the CSS var names so that the output when consuming checkup-list and step-list is clean of --sbb-list-marker-* vars. and also re-declarations of a css var. The base-marker-list should be excluded from public api here: src/elements/core/styles/_index.scss

@@ -8,3 +8,7 @@
.sbb-step-list {
@include lists.step-list;
}

.sbb-checkup-list {
Copy link
Contributor

Choose a reason for hiding this comment

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

checkup-list, or simple icon-list, or? @kyubisation

Copy link
Contributor

Choose a reason for hiding this comment

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

we decided for sbb-icon-list

@@ -76,28 +76,119 @@
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@mixin checkup-list {
@include base-marker-list;

--sbb-checkup-list-marker-icon: url('https://icons.app.sbb.ch/icons/circle-tick-medium.svg');
Copy link
Contributor

Choose a reason for hiding this comment

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

@kyubisation, could we deliver with icon CDN url, or do we have to include it as base64?

Copy link
Contributor

Choose a reason for hiding this comment

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

decision: inline as svg code (probably base64 not even needed)

@@ -66,6 +66,63 @@ const StepsTemplate = (): TemplateResult => html`
)}
`;

const CheckupTemplate = (): TemplateResult => html`
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 the visual tests

@mixin checkup-list {
@include base-marker-list;

--sbb-checkup-list-marker-icon: url('https://icons.app.sbb.ch/icons/circle-tick-medium.svg');
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be, that starting from 36x36 that the medium icon should be chosen (but let's check later with review of @mcilurzo)

@jeripeierSBB jeripeierSBB changed the title feat: add sbb-checkup-list class feat: add sbb-checkup-list style class Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diff-available pr: lead review required A lead review is required for this pull request pr: peer review required A peer review is required for this pull request pr: visual review required preview-available
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

[Feature request]: Css-Class for checkmark lists
2 participants