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(styles): eui Amsterdam theme #1463

Merged
merged 22 commits into from
Mar 3, 2022
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
989542e
feat(theme): move to amsterdam eui theme
nickofthyme Nov 4, 2021
6678876
chore: update screenshots
nickofthyme Nov 4, 2021
5c0b91a
Merge branch 'master' into amsterdam-theme
nickofthyme Nov 9, 2021
e4819e4
chore: update vrt screenshots
nickofthyme Nov 9, 2021
c8ccdcc
test: update color values in jest tests
nickofthyme Nov 9, 2021
4015688
Merge branch 'master' into amsterdam-theme
nickofthyme Dec 14, 2021
eaa9032
deps: upgrade eui to latest with new style imports
nickofthyme Dec 15, 2021
9b07bc8
test: update vrt screenshots with new theming
nickofthyme Dec 15, 2021
aad2318
test: update vrt screenshots with new theming...again
nickofthyme Dec 15, 2021
f17c31c
Merge branch 'master' into amsterdam-theme
nickofthyme Jan 5, 2022
2a099e2
feat(heatmap): allow rotation of x axis labels (#1514)
rshen91 Feb 23, 2022
869c572
fix(legend): width with duplicate nested pie slice labels (#1585)
nickofthyme Feb 23, 2022
f4e6c4f
ci: fix ci branch trigger workflow
nickofthyme Feb 23, 2022
71c0438
build(deps): bump url-parse from 1.5.3 to 1.5.10 (#1613)
dependabot[bot] Feb 28, 2022
af1a174
Merge branch 'master' into amsterdam-theme
nickofthyme Feb 28, 2022
a65d486
fix: docs styles, use eui provider in place of legacy style resets
nickofthyme Mar 2, 2022
61c8299
Merge branch 'master' into amsterdam-theme
nickofthyme Mar 2, 2022
458a5a4
fix: cleanup styles and readme refs
nickofthyme Mar 2, 2022
db70f84
test: update vrt screenshots -- all.test.ts
nickofthyme Mar 2, 2022
2c4f4a0
test: update vrt screenshots -- interaction/bar
nickofthyme Mar 2, 2022
ac1f284
test: update vrt screenshots -- 3rd group
nickofthyme Mar 2, 2022
6e73700
test: update vrt screenshots -- 4th group
nickofthyme Mar 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Merge branch 'master' into amsterdam-theme
nickofthyme committed Dec 14, 2021

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 401568851c8268fa98048e14c4de35280a1a3646
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -263,6 +263,7 @@ module.exports = {
*/
'jest/no-standalone-expect': 0, // using custom expect functions
'jest/no-disabled-tests': 0,
'jest/no-identical-title': 0, // does not account for <describe|it>.each

/*
* unicorn plugin
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -19,5 +19,6 @@ coverage/
npm-debug.log
yarn-error.log
playground/playground.tsx
.jest-image-snapshot-touched-files

**/__diff_output__/
8 changes: 7 additions & 1 deletion .releaserc.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,13 @@ module.exports = {
execCwd: '.',
},
],
'@semantic-release/github',
[
'@semantic-release/github',
{
successComment: false,
failComment: false,
},
],
[
'@semantic-release/npm',
{
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
# [40.2.0](https://github.com/elastic/elastic-charts/compare/v40.1.0...v40.2.0) (2021-12-09)


### Bug Fixes

* **partition:** linkLabel textColor override ([#1498](https://github.com/elastic/elastic-charts/issues/1498)) ([3013310](https://github.com/elastic/elastic-charts/commit/3013310357f3612aca47aa1c229d9ca4a276ea71))
* **waffle:** use descend sortPredicate by default ([#1510](https://github.com/elastic/elastic-charts/issues/1510)) ([763e2e3](https://github.com/elastic/elastic-charts/commit/763e2e3b71b7b2976b49f321d92aad60adfc4080))
* **xy:** stacked polarity ([#1502](https://github.com/elastic/elastic-charts/issues/1502)) ([920666a](https://github.com/elastic/elastic-charts/commit/920666acd012ce6f3e6c3299ebf338011e8a0e08)), closes [#1280](https://github.com/elastic/elastic-charts/issues/1280)


### Features

* **xy:** expose style for interpolation fit functions ([#1505](https://github.com/elastic/elastic-charts/issues/1505)) ([3071457](https://github.com/elastic/elastic-charts/commit/30714572e5eaf7b88bda0a26fd69f58357d5cc9f))

# [40.1.0](https://github.com/elastic/elastic-charts/compare/v40.0.0...v40.1.0) (2021-12-01)


### Bug Fixes

* **deps:** update dependency @elastic/eui to ^41.3.0 ([#1506](https://github.com/elastic/elastic-charts/issues/1506)) ([d364cc0](https://github.com/elastic/elastic-charts/commit/d364cc0fd0ecef83772ca1ca52ff04ed649badb6))
* remove pointer for onElementOver ([#1493](https://github.com/elastic/elastic-charts/issues/1493)) ([bf95dbc](https://github.com/elastic/elastic-charts/commit/bf95dbc6aae31d2c9994732b1c6ce6c29e58bd9a))
* **deps:** update dependency @elastic/eui to ^41.2.1 ([#1494](https://github.com/elastic/elastic-charts/issues/1494)) ([1c32f82](https://github.com/elastic/elastic-charts/commit/1c32f8264d9f03c304534a9b9688ee355d7fda39))


### Features

* expose computeRatioByGroups fn ([#1495](https://github.com/elastic/elastic-charts/issues/1495)) ([65f4886](https://github.com/elastic/elastic-charts/commit/65f4886ee3a1ef71eb34cfe8bd504ec4d76f82cb))

# [40.0.0](https://github.com/elastic/elastic-charts/compare/v39.0.2...v40.0.0) (2021-11-18)


### Bug Fixes

* **interactions:** remove the option for pixelRatio with png snapshot ([#1431](https://github.com/elastic/elastic-charts/issues/1431)) ([eebb069](https://github.com/elastic/elastic-charts/commit/eebb0697a0b9ec5a860feb687f5b52721850714b))
* **xy:** occlude points outside of y domain ([#1475](https://github.com/elastic/elastic-charts/issues/1475)) ([3176f02](https://github.com/elastic/elastic-charts/commit/3176f02c2587522f5b057493b592dc3446315998))


### Features

* **annotations:** add annotations to DebugState ([#1434](https://github.com/elastic/elastic-charts/issues/1434)) ([c5ea600](https://github.com/elastic/elastic-charts/commit/c5ea60027299882cc1c05f9227e7e3204bb0ff71))
* **heatmap:** add valueShown in heatmap debug state ([#1460](https://github.com/elastic/elastic-charts/issues/1460)) ([962e089](https://github.com/elastic/elastic-charts/commit/962e089fe61540dcd5ed3612d41d915c29b98d13))


### BREAKING CHANGES

* **interactions:** The getPNGSnapshot function no longer has an option for pixelRatio

## [39.0.2](https://github.com/elastic/elastic-charts/compare/v39.0.1...v39.0.2) (2021-11-17)


### Bug Fixes

* align axis tick formatter logic ([#1482](https://github.com/elastic/elastic-charts/issues/1482)) ([1bd30b9](https://github.com/elastic/elastic-charts/commit/1bd30b963d0136eb845381412737cb0e9dea4954)), closes [#1476](https://github.com/elastic/elastic-charts/issues/1476)
* **deps:** update dependency @elastic/eui to ^41.1.0 ([#1477](https://github.com/elastic/elastic-charts/issues/1477)) ([20306a1](https://github.com/elastic/elastic-charts/commit/20306a13bd1d7a3f021e8509a79099edccdb82fd))

## [39.0.1](https://github.com/elastic/elastic-charts/compare/v39.0.0...v39.0.1) (2021-11-15)


### Bug Fixes

* **partition:** rtl text label support ([#1433](https://github.com/elastic/elastic-charts/issues/1433)) ([01bbe3a](https://github.com/elastic/elastic-charts/commit/01bbe3a9109c8dddf71c259bfeafa67325920e84))

# [39.0.0](https://github.com/elastic/elastic-charts/compare/v38.1.5...v39.0.0) (2021-11-09)


2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ THIS SOFTWARE.

---

This product includes code that is adapted from d3-array@3.0.4 and d3-scale@4.0.2,
This product includes code that is adapted from d3-shape@3.0.1, d3-array@3.0.4 and d3-scale@4.0.2,
which are both available under a "ISC" license.

ISC License
4 changes: 2 additions & 2 deletions integration/helpers.ts
Original file line number Diff line number Diff line change
@@ -154,11 +154,11 @@ const themeIds = Object.values(ThemeId);
export const eachTheme = {
it(fn: (theme: ThemeId, urlParam: string) => any, title = 'theme - %s') {
// eslint-disable-next-line jest/valid-title
return it.each<ThemeId>(themeIds)(title, (theme) => fn(theme, `&globals=theme:${theme}`));
return it.each<ThemeId>(themeIds)(title, (theme) => fn(theme, `globals=theme:${theme}`));
},
describe(fn: (theme: ThemeId, urlParam: string) => any, title = 'theme - %s') {
// eslint-disable-next-line jest/valid-title, jest/valid-describe
return describe.each<ThemeId>(themeIds)(title, (theme) => fn(theme, `&globals=theme:${theme}`));
return describe.each<ThemeId>(themeIds)(title, (theme) => fn(theme, `globals=theme:${theme}`));
},
};

68 changes: 37 additions & 31 deletions integration/page_objects/common.ts
Original file line number Diff line number Diff line change
@@ -8,8 +8,6 @@

import Url from 'url';

import { AXNode } from 'puppeteer';

import { DRAG_DETECTION_TIMEOUT } from '../../packages/charts/src/state/reducers/interactions';
// @ts-ignore - no type declarations
import { port, hostname, debug, isLegacyVRTServer } from '../config';
@@ -320,23 +318,31 @@ class CommonPage {
selector: string = 'body',
options?: ScreenshotElementAtUrlOptions,
) {
await this.loadElementFromURL(url, options?.waitSelector ?? selector, options?.timeout);
try {
const success = await this.loadElementFromURL(url, options?.waitSelector ?? selector, options?.timeout);

if (options?.action) {
await options.action();
}
expect(success).toBe(true);

if (options?.delay) {
await page.waitFor(options.delay);
}
if (options?.action) {
await options.action();
}

if (options?.delay) {
await page.waitFor(options.delay);
}

const element = await this.screenshotDOMElement(options?.screenshotSelector ?? selector, options);
const element = await this.screenshotDOMElement(options?.screenshotSelector ?? selector, options);

if (!element) {
throw new Error(`Error: Unable to find element\n\n\t${url}`);
}
if (!element) {
// eslint-disable-next-line no-console
console.error(`Failed to find element at \`${selector}\`\n\n\t${url}`);
}

expect(element).toMatchImageSnapshot();
expect(element).toBeDefined();
expect(element).toMatchImageSnapshot();
} catch {
// prevent throwing error on failed assertion
}
}

/**
@@ -362,9 +368,12 @@ class CommonPage {
async expectChartWithMouseAtUrlToMatchScreenshot(
url: string,
mousePosition: MousePosition,
options?: Omit<ScreenshotElementAtUrlOptions, 'action'>,
options?: ScreenshotElementAtUrlOptions,
) {
const action = async () => await this.moveMouseRelativeToDOMElement(mousePosition, this.chartSelector);
const action = async () => {
await options?.action?.();
await this.moveMouseRelativeToDOMElement(mousePosition, this.chartSelector);
};
await this.expectChartAtUrlToMatchScreenshot(url, {
...options,
action,
@@ -426,20 +435,30 @@ class CommonPage {
* @param waitSelector selector of element to wait to appear in DOM
* @param timeout timeout for waiting on element to appear in DOM
*/
async loadElementFromURL(url: string, waitSelector?: string, timeout?: number) {
async loadElementFromURL(url: string, waitSelector?: string, timeout?: number): Promise<boolean> {
const cleanUrl = CommonPage.parseUrl(url);
await page.goto(cleanUrl);

if (waitSelector) {
await this.waitForElement(waitSelector, timeout);
try {
await this.waitForElement(waitSelector, timeout);
return true;
} catch {
// eslint-disable-next-line no-console
console.error(`Failed to load url. Check story at: \n\n\tstorybook url: ${url}\n\tlocal vrt url: ${cleanUrl}`);
return false;
}
}

if (isLegacyVRTServer) {
// activate peripheral visibility
await page.evaluate(() => {
document.querySelector('html')!.classList.add('echVisualTesting');
});
return true;
}

return false;
}

/**
@@ -451,19 +470,6 @@ class CommonPage {
async waitForElement(waitSelector: string, timeout = 10000) {
await page.waitForSelector(waitSelector, { timeout });
}

/**
* puppeteer accessibility functionality
* @param {string} [url]
* @param {string} [waitSelector]
*/
async testAccessibilityTree(url: string, waitSelector: string): Promise<AXNode> {
await this.loadElementFromURL(url, waitSelector);
const accessibilitySnapshot = await page.accessibility.snapshot().then((value) => {
return value;
});
return accessibilitySnapshot;
}
}

export const common = new CommonPage();
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.