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 4.5 contrast for text in partition slices #608

Merged
merged 78 commits into from
Jun 8, 2020
Merged
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
02f2f53
feat: move luminance value code from kibana in charts
rshen91 Mar 26, 2020
325b5bd
feat: textColor takes into account contrast with background slice
rshen91 Mar 31, 2020
6acca30
feat: account for initial non black or white textColor
rshen91 Mar 31, 2020
8f4ddf5
feat: add background color knob for xy charts
rshen91 Apr 10, 2020
23eb310
test: fix backgrounds to white for vrt
rshen91 Apr 13, 2020
d4b43ca
fix: add color background functionality to partition chart simple
rshen91 Apr 14, 2020
361200e
docs: add story for partition in styling
rshen91 Apr 14, 2020
963572b
feat: add combine color helper function
rshen91 Apr 15, 2020
01d1e2e
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 15, 2020
c7eec32
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 16, 2020
c36c79a
feat: add background to geometries
rshen91 Apr 20, 2020
fe5be74
fix: improve contrast
rshen91 Apr 20, 2020
cd31813
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 21, 2020
38e1250
fix: add updated story file
rshen91 Apr 21, 2020
69168b6
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 21, 2020
c1bc892
feat: update colorIsDark to adjust text for contrast
rshen91 Apr 21, 2020
7c3c7b0
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 22, 2020
69a2cc0
fix: readd textInvertible functionality in fill_text_layout
rshen91 Apr 22, 2020
7059318
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 22, 2020
f9a824d
WIP
rshen91 Apr 23, 2020
9bc19ba
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 23, 2020
65d8bc8
feat: improve makeHighContrastColor()
rshen91 Apr 23, 2020
71b512e
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 24, 2020
ba1b1cf
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 27, 2020
016cc7d
fix: merge conflicts
rshen91 Apr 27, 2020
9d0d6e7
WIP
rshen91 Apr 27, 2020
c0a56e0
feat: add link label contrast functionality
rshen91 Apr 27, 2020
878635c
chore: merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 28, 2020
94d69ec
test: update contrast logic and vrts
rshen91 Apr 28, 2020
1152d96
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 29, 2020
0688de9
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 29, 2020
e083865
fix: remove broken playground
rshen91 Apr 29, 2020
7ede9a3
fix: add playground from current master
rshen91 Apr 29, 2020
fc86b2a
test: add unit tests for calc file
rshen91 Apr 29, 2020
1fa7fb8
chore: merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Apr 30, 2020
08f1dd7
WIP
rshen91 Apr 30, 2020
a957653
WIP
rshen91 Apr 30, 2020
876062a
merging with master but broken build
rshen91 Apr 30, 2020
9492c23
WIP
rshen91 May 2, 2020
fcc7cfe
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 2, 2020
8035d6c
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 4, 2020
5b3b11f
feat: playground add foreground color functionality
rshen91 May 4, 2020
572cbdd
feat: error handling in conbineColors
rshen91 May 4, 2020
336ae5e
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 4, 2020
c09dfca
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 5, 2020
08768fa
feat: add contrastText prop and opacity in playground
rshen91 May 5, 2020
1800133
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 5, 2020
ee33cfd
fix: fix brightness lightness calc
rshen91 May 5, 2020
4f4801b
chore: merge commit
rshen91 May 8, 2020
7412a60
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 8, 2020
0a24a5e
feat: add textContrast number functionality
rshen91 May 11, 2020
1c04a77
feat: fix contrast with luminance over lightness for colorIsDark
rshen91 May 12, 2020
511b5b4
test: add unit tests and add class to playground
rshen91 May 13, 2020
48ec0fa
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 19, 2020
f8619e2
feat: low hanging fruit
rshen91 May 20, 2020
b411301
feat: add code review changes
rshen91 May 21, 2020
88e42d3
fix: add internal tag to LinkLabelsViewModelSpec
rshen91 May 21, 2020
41314f9
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 26, 2020
8a4c825
fix: cp tmp/charts.api.md to api/chart.api.md
rshen91 May 26, 2020
0946501
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 27, 2020
545e78e
feat: add chart background to own component
rshen91 May 27, 2020
ef78e4b
fix: fix order for <ChartBackground />
rshen91 May 27, 2020
299f90e
fix: add styling fix for legend
rshen91 May 28, 2020
aa48c17
chore: merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 28, 2020
69cd5d8
test: add unit test for combine colors and correct contrast
rshen91 May 28, 2020
462debe
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 May 28, 2020
01b7052
docs: add docs to storybook docs about textContrast
rshen91 May 29, 2020
9bb1e8e
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 Jun 1, 2020
36baf2e
feat: update baseThemes
rshen91 Jun 2, 2020
1864be2
Merge branch 'master' into luminance-pie
nickofthyme Jun 7, 2020
f14f2fa
fix: update pr with remaining checks
nickofthyme Jun 8, 2020
33aeb59
refactor: return types and rgb format
markov00 Jun 8, 2020
979ffe0
fix: get correct theme via selector and minor refactoring
markov00 Jun 8, 2020
af65d11
fix: refactor chart size
markov00 Jun 8, 2020
9012b54
fix: cleanup theme colors and add color check
markov00 Jun 8, 2020
20a11c0
fix: api docs
markov00 Jun 8, 2020
44e5101
Merge branch 'master' into luminance-pie
markov00 Jun 8, 2020
9c91e74
fix: broken tests, update prop naming
nickofthyme Jun 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master' into luminance-pie
rshen91 committed May 5, 2020
commit c09dfca80b130260c91894d71d3bf07a302e2e0a
Original file line number Diff line number Diff line change
@@ -109,6 +109,7 @@ const defaultFont: Font = {
textOpacity: 1,
};

/* @internal */
export const nullShapeViewModel = (specifiedConfig?: Config, diskCenter?: PointObject): ShapeViewModel => ({
config: specifiedConfig || config,
quadViewModel: [],
Original file line number Diff line number Diff line change
@@ -315,6 +315,18 @@ export function getTextColor(
}
return adjustedTextColor;
}
type GetShapeRowGeometry<C> = (
container: C,
cx: Distance,
cy: Distance,
targetRowCount: number,
linePitch: Pixels,
currentRowIndex: number,
fontSize: Pixels,
rotation: Radian,
verticalAlignment: VerticalAlignments,
padding: Padding,
) => RowSpace;

function fill(
config: Config,
@@ -350,9 +362,10 @@ function fill(
fontFamily,
fontWeight,
valueFormatter,
padding,
textOpacity,
} = Object.assign(
{ fontFamily: config.fontFamily, fontWeight: 'normal' },
{ fontFamily: config.fontFamily, fontWeight: 'normal', padding: 2 },
fillLabel,
{ valueFormatter: formatter },
layer.fillLabel,
You are viewing a condensed version of this merge commit. You can view the full changes here.