-
Notifications
You must be signed in to change notification settings - Fork 161
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
refactor(progress-bar): refactor progress bars initial commit #15231
base: master
Are you sure you want to change the base?
Conversation
projects/igniteui-angular/src/lib/core/styles/components/progress/circular/_circular-theme.scss
Outdated
Show resolved
Hide resolved
projects/igniteui-angular/src/lib/core/styles/components/progress/circular/_circular-theme.scss
Show resolved
Hide resolved
$bar-height: map.get(( | ||
'material': rem(4px), | ||
'fluent': rem(2px), | ||
'bootstrap': rem(16px), | ||
'indigo': rem(4px), | ||
), $variant); | ||
|
||
$bar-height: map.get(( | ||
'material': rem(4px), | ||
'fluent': rem(2px), | ||
'bootstrap': rem(16px), | ||
'indigo': rem(4px), | ||
), $variant); | ||
|
||
$strip-size: map.get(( | ||
'material': rem(16px), | ||
'fluent': rem(16px), | ||
'bootstrap': rem(5px), | ||
'indigo': rem(16px), | ||
), $variant); |
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.
Ideally, all of these should be listed as design tokens in the component schema. Let's defer this for now and add it to another task for when we refactor the token system in the theming library.
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.
I am adding a TODO so we don't forget about this
projects/igniteui-angular/src/lib/progressbar/circularbar.component.spec.ts
Outdated
Show resolved
Hide resolved
expect(progress.max).toBe(defaultMaxValue); | ||
expect(progress.value).toBe(0); | ||
}); | ||
function clasListContains(element: HTMLElement, className: string, expected: boolean) { |
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.
function clasListContains(element: HTMLElement, className: string, expected: boolean) { | |
function classListContains(element: HTMLElement, className: string, expected: boolean) { |
projects/igniteui-angular/src/lib/progressbar/linearbar.component.spec.ts
Outdated
Show resolved
Hide resolved
function clasListContains(element: HTMLElement, className: string, expected: boolean) { | ||
expect(element.classList.contains(className)).toBe(expected); | ||
} |
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.
function clasListContains(element: HTMLElement, className: string, expected: boolean) { | |
expect(element.classList.contains(className)).toBe(expected); | |
} | |
function hasClass(element: HTMLElement, className: string, expected: boolean) { | |
expect(element.classList.contains(className)).toBe(expected); | |
} |
This function is declared both here and in the circular tests. Extract it into the helper-utils.spec.ts in the test-utils folder.
@Component({ | ||
template: '', | ||
}) |
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.
@Component({ | |
template: '', | |
}) | |
@Directive() |
@Component({ | ||
template: '', | ||
}) | ||
class TestProgressComponent extends BaseProgressDirective { |
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.
class TestProgressComponent extends BaseProgressDirective { | |
class TestProgressDirective extends BaseProgressDirective { |
@@ -203,27 +196,48 @@ export abstract class BaseProgressDirective { | |||
return this._max; | |||
} | |||
|
|||
@HostBinding('style') |
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.
This means that any style attribute the end-users apply to the progressbar component will be overridden by this method.
…ess/circular/_circular-theme.scss Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
…onent.spec.ts Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
…ent.spec.ts Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
Closes #15162
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)