-
Notifications
You must be signed in to change notification settings - Fork 844
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into storybook/7646-v8-upgrade
- Loading branch information
Showing
26 changed files
with
575 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**Dependency updates** | ||
|
||
- Updated `remark-rehype` to v8.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**Accessibility** | ||
|
||
- Improved `EuiBasicTable` and `EuiInMemoryTable`'s selection checkboxes to have unique aria-labels per row |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- Updated `getDefaultEuiMarkdownPlugins()` to allow excluding the following plugins in addition to `tooltip`: | ||
- `checkbox` | ||
- `linkValidator` | ||
- `lineBreaks` | ||
- `emoji` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**Bug fixes** | ||
|
||
- Visual fixes for `EuiRange`s with `showInput`: | ||
- Longer `append`/`prepend` labels no longer cause a background bug | ||
- Inputs can no longer overwhelm the actual range in width |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**Bug fixes** | ||
|
||
- Fixed a visual text alignment regression in `EuiTableRowCell`s with the `row` header scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Updated `EuiSelectable`'s `isPreFiltered` prop to allow passing a configuration object, which allows disabling search highlighting in addition to search filtering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 93 additions & 16 deletions
109
src-docs/src/views/markdown_editor/markdown_editor_no_plugins.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,112 @@ | ||
import React, { useState } from 'react'; | ||
import React, { useState, useMemo } from 'react'; | ||
|
||
import { | ||
EuiMarkdownEditor, | ||
getDefaultEuiMarkdownPlugins, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiSwitch, | ||
} from '../../../../src/components'; | ||
|
||
const initialContent = `## This is how we do it :smile: | ||
const initialContent = ` | ||
### tooltip | ||
In this example, we unregistered the built in **tooltip** plugin. So the button in the toolbar and the help syntax won't be displayed. | ||
And the following syntax no longer works. | ||
When disabled, the button in the toolbar and the help syntax won't be displayed, and the following syntax will no longer works. | ||
!{tooltip[anchor text](Tooltip content)} | ||
`; | ||
const { parsingPlugins, processingPlugins, uiPlugins } = | ||
getDefaultEuiMarkdownPlugins({ exclude: ['tooltip'] }); | ||
### checkbox | ||
When disabled, a EuiCheckbox will no longer render. | ||
- [ ] TODO: Disable some default plugins | ||
### emoji | ||
When disabled, text will render instead of an emoji. | ||
:smile: | ||
### linkValidator | ||
When disabled, all links will render as links instead of as text. | ||
[This is a sus link](file://) | ||
### lineBreaks | ||
When disabled, these sentence will be in the same line. | ||
When enabled, these sentences will be separated by a line break. | ||
Two blank lines in a row will create a new paragraph as usual. | ||
`; | ||
|
||
export default () => { | ||
const [value, setValue] = useState(initialContent); | ||
|
||
const [tooltip, excludeTooltips] = useState(false); | ||
const [checkbox, excludeCheckboxes] = useState(true); | ||
const [emoji, excludeEmojis] = useState(true); | ||
const [linkValidator, excludeLinkValidator] = useState(true); | ||
const [lineBreaks, excludeLineBreaks] = useState(false); | ||
|
||
const { parsingPlugins, processingPlugins, uiPlugins } = useMemo(() => { | ||
const excludedPlugins = []; | ||
if (!tooltip) excludedPlugins.push('tooltip'); | ||
if (!checkbox) excludedPlugins.push('checkbox'); | ||
if (!emoji) excludedPlugins.push('emoji'); | ||
if (!linkValidator) excludedPlugins.push('linkValidator'); | ||
if (!lineBreaks) excludedPlugins.push('lineBreaks'); | ||
|
||
return getDefaultEuiMarkdownPlugins({ | ||
exclude: excludedPlugins, | ||
}); | ||
}, [tooltip, checkbox, emoji, linkValidator, lineBreaks]); | ||
|
||
return ( | ||
<> | ||
<EuiMarkdownEditor | ||
aria-label="EUI markdown editor with no default plugins demo" | ||
value={value} | ||
onChange={setValue} | ||
parsingPluginList={parsingPlugins} | ||
processingPluginList={processingPlugins} | ||
uiPlugins={uiPlugins} | ||
/> | ||
<EuiFlexGroup> | ||
<EuiFlexItem grow={false} css={{ gap: 20 }}> | ||
<EuiSwitch | ||
label="tooltip" | ||
checked={tooltip} | ||
onChange={() => excludeTooltips(!tooltip)} | ||
/> | ||
<EuiSwitch | ||
label="checkbox" | ||
checked={checkbox} | ||
onChange={() => excludeCheckboxes(!checkbox)} | ||
/> | ||
<EuiSwitch | ||
label="emoji" | ||
checked={emoji} | ||
onChange={() => excludeEmojis(!emoji)} | ||
/> | ||
<EuiSwitch | ||
label="linkValidator" | ||
checked={linkValidator} | ||
onChange={() => excludeLinkValidator(!linkValidator)} | ||
/> | ||
<EuiSwitch | ||
label="lineBreaks" | ||
checked={lineBreaks} | ||
onChange={() => excludeLineBreaks(!lineBreaks)} | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<EuiMarkdownEditor | ||
aria-label="Demo with excluded default plugins" | ||
value={value} | ||
onChange={setValue} | ||
parsingPluginList={parsingPlugins} | ||
processingPluginList={processingPlugins} | ||
uiPlugins={uiPlugins} | ||
initialViewMode="viewing" | ||
autoExpandPreview={false} | ||
height={400} | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.