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

[EuiEmptyPrompt] Add more guidelines #5409

Merged
merged 92 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from 91 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
7c87343
Adding anatomy figma iframe and initial design section.
elizabetdev Nov 18, 2021
141aa36
More guidelines
elizabetdev Nov 23, 2021
079154f
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Nov 24, 2021
3491a56
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Nov 25, 2021
08f992c
Adding `PanelColorPicker`
elizabetdev Nov 29, 2021
d108f9b
Adding learn more links section
elizabetdev Dec 2, 2021
37ab409
Panel picker with empty prompt color updating
elizabetdev Dec 7, 2021
342238f
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Dec 8, 2021
5fb4b82
Panel picker logic improved
elizabetdev Dec 9, 2021
c193ec7
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Dec 9, 2021
5126361
Styles and EuiText not growing
elizabetdev Dec 13, 2021
8e4bcc3
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Dec 14, 2021
3373e19
Preview using `GuideSection` with demo and source
elizabetdev Dec 14, 2021
c94e35d
Use cases texts
elizabetdev Dec 14, 2021
f163f3c
Simplifying recommendation. No more alternatives.
elizabetdev Dec 16, 2021
eb671a7
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Dec 16, 2021
c0af6ac
Adding page templates as options
elizabetdev Dec 16, 2021
b2d1c85
Reviewing texts with grammarly! 🤓
elizabetdev Dec 17, 2021
7ad3ee1
Page not found instead of page error
elizabetdev Dec 17, 2021
322a811
Adding access denied ex. in panel color picker
elizabetdev Jan 5, 2022
fb599be
Disable `multiple` thumb for 404 and 403 use cases
elizabetdev Jan 5, 2022
ac02726
Using KeyPadMenu for template selection
Jan 5, 2022
1754370
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
bbc6f13
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
0df5b82
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
50cb60e
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
79ed76c
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
be0fe39
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
ec186e1
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
b1dc0c1
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
a29c238
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
05f7dfc
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Jan 6, 2022
4806ef6
Merging panel color picker with types of empty states and goals table
elizabetdev Jan 6, 2022
4194e0f
Reusing examples in examples and guidelines pages. Using illustration…
elizabetdev Jan 10, 2022
b2b81c3
Replacing figma iframe with SVG image.
elizabetdev Jan 10, 2022
13d4ae6
Thumbnail and fixed radio group props issue
elizabetdev Jan 10, 2022
ba0cbb8
PNGs
elizabetdev Jan 10, 2022
bcd0189
Layout horizontal for 404 and 403
elizabetdev Jan 10, 2022
c47f83a
Merge remote-tracking branch '2_upstream/main' into improve-empty-pro…
Jan 11, 2022
28a3dc6
Not loading PNGs inline
elizabetdev Jan 11, 2022
b75848f
Merge branch 'improve-empty-prompt-guidelines' of https://github.com/…
elizabetdev Jan 11, 2022
c517892
New thumbnails and bettter use cases.
elizabetdev Jan 12, 2022
d473c01
Allow typescript files to import non-code files
chandlerprall Jan 13, 2022
8cafc3e
Text changes.
elizabetdev Jan 14, 2022
63a60a7
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Jan 14, 2022
bb78569
Multiple panel loading thumbnails
elizabetdev Jan 18, 2022
86c5b86
Loading spinner for multiple
elizabetdev Jan 18, 2022
e87edeb
`noPrivileges` instead of `noPermission`
elizabetdev Jan 19, 2022
648ec7d
Excluding mutiple layout for `noResults`
elizabetdev Jan 20, 2022
c54fe47
Prevent Eui* component/function names from being mangled
chandlerprall Jan 20, 2022
0594d16
Aligning thumbnails with Figma
elizabetdev Jan 24, 2022
eb3ef32
Preventing undefined props on Demo JS tab. Thumbs and texts.
elizabetdev Jan 24, 2022
0341adc
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Jan 24, 2022
9d55b52
Reverting `.guideDemo__highlightLayout` changes
elizabetdev Feb 9, 2022
e263542
Merge remote-tracking branch 'upstream/main' into improve-empty-promp…
elizabetdev Feb 9, 2022
3780595
Adding styles for the demo preview
elizabetdev Feb 9, 2022
30ce5f7
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 9, 2022
bdc558f
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 9, 2022
b952de9
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 9, 2022
22e93bb
Fixing multiple type text
elizabetdev Feb 9, 2022
44b88b4
New thumbnail for learn more inline link guide rule
elizabetdev Feb 9, 2022
fb16289
Forcing webpack to show the display name of the illustrations
elizabetdev Feb 9, 2022
a35b4d5
Fixing prettier error
elizabetdev Feb 9, 2022
7497404
Fixing unit test error
elizabetdev Feb 9, 2022
a02801b
Fixing typo in comment
elizabetdev Feb 9, 2022
810d3ba
Remove an out-of-date comment
chandlerprall Feb 9, 2022
04449ec
Showing EuiImage for illustrations in DemoJS
elizabetdev Feb 9, 2022
42b78f9
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
7cd3112
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
a6e4b04
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
30762ad
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
496c680
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
62aff56
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
5c69ca3
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
aa688ee
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
3434321
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
b07fd8c
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
604f70d
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
8735f74
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
d300f09
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
c683916
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
93ac0a3
Update src-docs/src/views/empty_prompt/guidelines.tsx
elizabetdev Feb 10, 2022
8a97352
Update src-docs/src/views/empty_prompt/_types_of_empty_states.tsx
elizabetdev Feb 10, 2022
02c6c57
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
d25649d
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
bdc88f1
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
4307049
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
7830fda
Update src-docs/src/views/empty_prompt/_types_of_use_cases.tsx
elizabetdev Feb 10, 2022
56c0f94
Text changes based on PR review
elizabetdev Feb 10, 2022
c9357f2
Text change.
elizabetdev Feb 10, 2022
0f8425d
First time use, no data exception.
elizabetdev Feb 10, 2022
2df1eaa
Adding link to KibanaPageTemplate
elizabetdev Feb 10, 2022
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"prop-types": "^15.6.0",
"react-beautiful-dnd": "^13.1.0",
"react-dropzone": "^11.5.3",
"react-element-to-jsx-string": "^14.3.4",
"react-focus-on": "^3.5.4",
"react-input-autosize": "^3.0.0",
"react-is": "^17.0.2",
Expand Down
6 changes: 5 additions & 1 deletion scripts/babel/proptypes-from-ts-props/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,8 @@ function getPropTypesForNode(node, optional, state) {
return propType;
}

const typescriptExtensions = new Set(['', '.ts', '.tsx']);

// typeDefinitionExtractors is a mapping of [ast_node_type: func] which is used to find type definitions
// these definitions come from four sources:
// - import statements
Expand All @@ -1054,9 +1056,11 @@ const typeDefinitionExtractors = {
const { fs, sourceFilename, parse, state } = extractionOptions;
const importPath = node.source.value;
const isPathRelative = /^\.{1,2}\//.test(importPath);
const pathExtension = path.extname(importPath);
const isImportTypecript = typescriptExtensions.has(pathExtension);

// only process relative imports for typescript definitions (avoid node_modules)
if (isPathRelative) {
if (isPathRelative && isImportTypecript) {
// find the variable names being imported
const importedTypeNames = node.specifiers.map(specifier => {
switch (specifier.type) {
Expand Down
29 changes: 29 additions & 0 deletions scripts/babel/proptypes-from-ts-props/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2514,6 +2514,35 @@ let something: any;

expect(result.code).toBe('let something;');
});

it('skips non-typescript imports', () => {
const result = transform(
`
import something from './somewhere.txt';
`,
{
...babelOptions,
plugins: [
[
'./scripts/babel/proptypes-from-ts-props',
{
fs: {
existsSync: () => true,
statSync: () => ({ isDirectory: () => false }),
readFileSync: () => {
return Buffer.from(`
this is not valid javascript
`);
},
},
},
],
],
}
);

expect(result.code).toBe("export {};");
});
});
});
});
4 changes: 4 additions & 0 deletions src-docs/src/components/guide_section/guide_section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export const GuideSectionCodeTypesMap = {
name: 'demoTSX',
displayName: 'Demo TS',
},
STRING_JS: {
name: 'demoJS',
displayName: 'Demo JS',
},
SNIPPET: {
name: 'snippet',
displayName: 'Snippet',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export const GuideSectionExampleCode: FunctionComponent<GuideSectionExampleCode>
return (
<>
<EuiCodeBlock
language={type === GuideSectionTypes.JS ? 'jsx' : type.toLowerCase()}
language={
type === GuideSectionTypes.JS || type === GuideSectionTypes.STRING_JS
? 'jsx'
: type.toLowerCase()
}
overflowHeight={400}
isCopyable
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export const GuideSectionTypes = {
TSX: 'TSX',
SNIPPET: 'SNIPPET',
SASS: 'SASS',
STRING_JS: 'STRING_JS',
};
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.
48 changes: 48 additions & 0 deletions src-docs/src/images/empty-prompt/inline-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
416 changes: 416 additions & 0 deletions src-docs/src/images/empty-prompt/no-results--dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
416 changes: 416 additions & 0 deletions src-docs/src/images/empty-prompt/no-results--light.svg
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.
27 changes: 27 additions & 0 deletions src-docs/src/images/empty-prompt/thumbnail_dark_page-empty.svg
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.
47 changes: 47 additions & 0 deletions src-docs/src/images/empty-prompt/thumbnail_footer-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions src-docs/src/images/empty-prompt/thumbnail_horizontal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions src-docs/src/images/empty-prompt/thumbnail_icon-do.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading