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(notebooks): introduce markdown pipe type #18181

Merged
merged 10 commits into from
May 22, 2020
Merged

Conversation

alexpaxton
Copy link
Contributor

@alexpaxton alexpaxton commented May 20, 2020

Closes https://github.com/influxdata/idpe/issues/7140

Introduce first pass at a markdown type pipe

  • Markdown panels have edit and preview mode (for now)
  • New markdown panels are in edit mode by default and autofocused

create-edit-markdown-panel

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

<MarkdownPanelEditor text={data.text} onChange={handleChange} />
)

if (data.mode === 'preview') {
Copy link
Contributor

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}
Copy link
Contributor

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}
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup yup

@alexpaxton alexpaxton merged commit 743fb67 into master May 22, 2020
@alexpaxton alexpaxton deleted the feat/markdown-pipe branch May 22, 2020 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants