-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(notebooks): introduce markdown pipe type #18181
Conversation
<MarkdownPanelEditor text={data.text} onChange={handleChange} /> | ||
) | ||
|
||
if (data.mode === 'preview') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my inner watts is saying that the wrapped renderer and the editor are two different components with a data.mode
guard in each of them so that you'd add both as children, and they choose to toggle
) | ||
|
||
const handleChange = (text: string): void => { | ||
const updatedData = {...data, text} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the onUpdate already does the ...data
part
@@ -54,6 +58,7 @@ const NotebookPanel: FC<Props> = ({index, children}) => { | |||
margin={ComponentSize.Small} | |||
justifyContent={JustifyContent.FlexEnd} | |||
> | |||
{controls} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this conjure the feels you were looking for? it looks pretty lightweight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup yup
Closes https://github.com/influxdata/idpe/issues/7140
Introduce first pass at a markdown type pipe
edit
andpreview
mode (for now)edit
mode by default and autofocused