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

Add default values #8

Open
afonsobspinto opened this issue Jul 18, 2022 · 2 comments
Open

Add default values #8

afonsobspinto opened this issue Jul 18, 2022 · 2 comments

Comments

@afonsobspinto
Copy link
Member

As per title, we need to ensure that the default are available for the library:

if the user does not specify a componentsMap ensure there is one available that uses the react-diagram default nodes and links.
if the user specify a type that does not exists in the components map, report the error in console but as a fallback use the default type for visualization.

@afonsobspinto afonsobspinto self-assigned this Jul 18, 2022
@afonsobspinto
Copy link
Member Author

afonsobspinto commented Jul 25, 2022

from @zsinnema :
Create default widgets as a sort of a base widget to which we can provide the data and type of data we want to show as children and it generates the UI widget for us.

<MetaNodeWidget>
{ 'dataToShow': Types.TypeOfInput } 
</MetaNodeWidget>

TypeOfInput can be something like TextInput and we provide default looks + default functionality (like editing)

From a application perspective:

  • We could still use the componentsMap to fully override the widget.
  • Would it be possible to edit the looks and keep the default functionality? How?

@zsinnema
Copy link
Contributor

@afonsobspinto I would look at the material ui library
also I think @vidhya-metacell can help you with this archtitecture

ad 1) yes and a new component type can "inherit" from an existing
ad 2) yes, think of "theming"

@afonsobspinto afonsobspinto removed their assignment Oct 24, 2022
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

No branches or pull requests

2 participants