-
Notifications
You must be signed in to change notification settings - Fork 57
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: use external color handling #1611
base: main
Are you sure you want to change the base?
Conversation
@@ -200,65 +194,64 @@ describe('styling', () => { | |||
}); | |||
}); | |||
|
|||
const hasEnoughContrast = (a, b) => getContrast(a, b) > CONTRAST_THRESHOLD; | |||
// const hasEnoughContrast = (a, b) => getContrast(a, b) > CONTRAST_THRESHOLD; |
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.
TODO: potentially move some of these tests to chart-modules
@@ -116,14 +110,14 @@ describe('styling', () => { | |||
expect(styles.search.color).toEqual('object.listBox,content,color'); | |||
}); | |||
it('search - should get desired color if contrasting enough', () => { | |||
themeApi.getStyle = () => '#999'; | |||
themeApi.getStyle = () => '#888888'; |
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.
the contrast for this was actually pretty bad (< 3:1) which isn't acceptable in any case. Probably due to the incorrect contrast calculations, and the arbitrary threshold, this was considered good enough
Putting this back to draft since it requires quite a lot of testing to mitigate the risk. Starting with this PR #1625 |
Motivation
The Color class has been modernized and moved to qlik-chart-modules. This means we can remove Color class and some other color stuff that was implemented twice.
Adding qlik-chart-modules to the deps does increase the bundle size. It is noticeable but too acceptable...
Requirements checklist
yarn spec
When build and tests have passed: