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(tooltip): composable tooltips - phase 1 #1725

Merged
merged 42 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d885a73
feat(tooltip): composable tooltips - phase 1
nickofthyme Jun 23, 2022
7214d79
Merge branch 'master' into composible-tooltip
nickofthyme Jun 23, 2022
a15ffb1
Merge branch 'master' into composible-tooltip
nickofthyme Jun 29, 2022
b73ad1e
Merge branch 'master' into composible-tooltip
nickofthyme Jun 29, 2022
f477564
Merge branch 'master' into composible-tooltip
nickofthyme Jul 5, 2022
9772e8c
fix: annotation tooltip with style and element changes
nickofthyme Jul 7, 2022
de77b42
chore: remove list table components and stories
nickofthyme Jul 7, 2022
c14a6ef
fix: improve tooltip header null rendering
nickofthyme Jul 7, 2022
6ea5e8d
refactor: cleanup tooltip table styles and component APIs
nickofthyme Jul 7, 2022
ef75f0e
Merge remote-tracking branch 'origin/composible-tooltip' into composi…
nickofthyme Jul 7, 2022
489975f
Merge branch 'master' into composible-tooltip
nickofthyme Jul 7, 2022
aabb324
refactor(tooltip): seperate tooltip options into new spec
nickofthyme Jul 12, 2022
b23c362
fix: tooltip specType
nickofthyme Jul 12, 2022
004b35f
docs: update stories to use new Tooltip spec
nickofthyme Jul 12, 2022
5902989
fix: annotation tooltip styles
nickofthyme Jul 12, 2022
8936b2b
refactor: tests and dataSeries to series identifier logic
nickofthyme Jul 12, 2022
87bced0
Merge branch 'master' into composible-tooltip
nickofthyme Jul 12, 2022
b8df7cd
docs: update api changes and fix tooltip component types
nickofthyme Jul 13, 2022
46ba324
Merge branch 'master' into composible-tooltip
nickofthyme Jul 13, 2022
73a54be
test(vrt): update screenshots [skip ci]
elastic-datavis[bot] Jul 13, 2022
1af9e62
fix: prettier errors
nickofthyme Jul 13, 2022
92d5c04
fix: minor issues and errors
nickofthyme Jul 13, 2022
4febacd
build: always warn on ban-types
nickofthyme Jul 13, 2022
6ef72dc
ci: fix api docs error
nickofthyme Jul 13, 2022
5436f35
Merge branch 'master' into composible-tooltip
nickofthyme Jul 19, 2022
ac488d5
style: remove tooltip hover highlight color animation
nickofthyme Jul 19, 2022
2aaabca
style: update colors to use eui variables
nickofthyme Jul 19, 2022
0a9484c
chore: implicit use of TooltipWrapper
nickofthyme Jul 19, 2022
3384b77
feat: add optional tagName to table cell
nickofthyme Jul 19, 2022
5c8540e
chore: cleanup color column logic and optionalaity
nickofthyme Jul 19, 2022
0367fde
fix: style type cleanup
nickofthyme Jul 20, 2022
84a1d25
test(vrt): update screenshots [skip ci]
elastic-datavis[bot] Jul 20, 2022
5ee27e2
fix: cleanup table row options
nickofthyme Jul 20, 2022
61104ab
refactor: color hide logic to use column typed approach
nickofthyme Jul 21, 2022
dd7b539
chore: update types from previous changes
nickofthyme Jul 21, 2022
3037975
feat: add option for header and footer on default tooltip
nickofthyme Jul 21, 2022
20ef794
Merge remote-tracking branch 'origin/composible-tooltip' into composi…
nickofthyme Jul 21, 2022
b2ffa96
test(vrt): update screenshots [skip ci]
elastic-datavis[bot] Jul 21, 2022
09d16ad
chore: update tooltip component api
nickofthyme Jul 21, 2022
3660551
test: update snapshot with new props
nickofthyme Jul 21, 2022
b28647e
Merge remote-tracking branch 'origin/composible-tooltip' into composi…
nickofthyme Jul 21, 2022
fef1c52
chore: add ColorStripCellProps to api
nickofthyme Jul 21, 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
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .buildkite/utils/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export const exec = async (
}
};

export const yarnInstall = async (cwd?: string) => {
export const yarnInstall = async (cwd?: string, ignoreScripts = true) => {
startGroup(`Installing node modules${cwd ? ` [${cwd}]` : ''}`);
await exec('yarn install --frozen-lockfile', { cwd });
const scriptFlag = ignoreScripts ? ' --ignore-scripts' : '';
markov00 marked this conversation as resolved.
Show resolved Hide resolved
await exec(`yarn install --frozen-lockfile${scriptFlag}`, { cwd });
};
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ module.exports = {
* @typescript-eslint plugin
*/
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/ban-types': process.env.NODE_ENV === 'production' ? 2 : 1,
'@typescript-eslint/ban-types': 1,
'@typescript-eslint/return-await': ['error', 'always'], // https://v8.dev/blog/fast-async
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
'@typescript-eslint/no-explicit-any': 0,
Expand Down
68 changes: 41 additions & 27 deletions e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ import { test, Page } from '@playwright/test';

import { Rotation } from './constants';

interface FileExample {
slugifiedName: string;
name: string;
filename: string;
url: string;
filePath: string;
}

type TestExamples = {
groupFile: string;
slugifiedGroupTitle: string;
groupTitle: string;
exampleFiles: {
slugifiedName: string;
name: string;
filename: string;
url: string;
filePath: string;
}[];
exampleFiles: FileExample[];
}[];

export interface StoryGroupInfo {
Expand All @@ -33,32 +35,44 @@ export interface StoryGroupInfo {
}

/**
* Stories to skip in all vrt based on group.
* Groups to skip in all vrt.
*/
const storiesToSkip: Record<string, Record<string, string[]>> = {
'Test Cases': {
storybook: ['No Series'],
examples: ['noSeries'],
},
};
const groupsToSkip: Set<string> = new Set(['Components/Tooltip']);

/**
* Stories to skip in all vrt based by group.
*/
const storiesToSkip: Map<string, string[]> = new Map(
Object.entries({
'Test Cases': ['noSeries'],
}),
);

export function getStorybookInfo(): StoryGroupInfo[] {
try {
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
const examples = require('../e2e_server/tmp/examples.json') as TestExamples;

return examples.map<StoryGroupInfo>(({ groupTitle: group, slugifiedGroupTitle, exampleFiles }) => {
return {
group,
encodedGroup: slugifiedGroupTitle,
stories: exampleFiles
.filter(({ name }: any) => name && !storiesToSkip[group]?.examples.includes(name))
.map(({ name, slugifiedName }) => ({
name,
slugifiedName,
})),
};
});
return examples
.filter(
({ groupTitle, slugifiedGroupTitle }) =>
!groupsToSkip.has(groupTitle) && !groupsToSkip.has(slugifiedGroupTitle),
)
.map<StoryGroupInfo>(({ groupTitle: group, slugifiedGroupTitle, exampleFiles }) => {
return {
group,
encodedGroup: slugifiedGroupTitle,
stories: exampleFiles
.filter(({ name, slugifiedName }: any) => {
const skipStoryName = name ? storiesToSkip.get(group)?.includes(name) : false;
const skipStorySlug = slugifiedName ? storiesToSkip.get(group)?.includes(slugifiedName) : false;
return !skipStoryName && !skipStorySlug;
})
.map(({ name, slugifiedName }) => ({
name,
slugifiedName,
})),
};
});
} catch {
throw new Error('A required file is not available, please run yarn test:e2e:generate');
}
Expand Down
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.
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.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
]
},
"scripts": {
"postinstall": "cd ./e2e && yarn install && cd ../.buildkite && yarn install && cd ../github_bot && yarn install",
markov00 marked this conversation as resolved.
Show resolved Hide resolved
"run:bk:step": "cd .buildkite && yarn run:step",
"prepack": "echo 'This package is not published, see pacakges/*' && exit 1",
"autoprefix:css": "lerna run --loglevel=silent --scope @elastic/charts autoprefix:css --stream --no-prefix",
Expand Down
Loading