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

Relation preview improvements #470

Merged
merged 7 commits into from
Jul 10, 2017
Merged

Conversation

erquhart
Copy link
Contributor

- Summary

This PR addresses three problems:

  • No documented example of a custom widget preview
  • Very little documentation for the relation widget
  • A custom preview can't be provided for an existing widget

- Description for the changelog

Allow custom widgets to reuse existing widget controls

- A picture of a cute animal (not mandatory but encouraged)
cover-squirrel

Param | Type | Description
--- | --- | ---
`name` | string | Widget name, allows this widget to be used via the field `widget` property in config
`control` | React.Component \| string | <ul><li>React component that renders the control, receives the following props: <ul><li>**value:** Current field value</li><li>**onChange**: Callback function to update the field value</li></ul></li><li>Name of a registered widget whose control should be used (includes built in widgets).</li></ul>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, all of this nested list markup is horrible. I am very ashamed.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's better than nothing! And it does render fairly well. Tables are the worst thing about markdown. 😛

Copy link
Contributor

@Benaiah Benaiah left a comment

Choose a reason for hiding this comment

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

LGTM

@Benaiah Benaiah force-pushed the relation-preview-improvements branch from 746930b to 9fdc458 Compare July 10, 2017 18:53
@erquhart erquhart force-pushed the relation-preview-improvements branch from 9fdc458 to 6af9a31 Compare July 10, 2017 19:05
@erquhart erquhart merged commit 1d08f1a into master Jul 10, 2017
@erquhart erquhart deleted the relation-preview-improvements branch July 10, 2017 19:46
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.

None yet

3 participants