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

support Component DataSource #650

Merged
merged 2 commits into from
Dec 23, 2022
Merged

support Component DataSource #650

merged 2 commits into from
Dec 23, 2022

Conversation

tanbowensg
Copy link
Collaborator

@tanbowensg tanbowensg commented Dec 7, 2022

What Changes?

The general idea is to reduce the DataSource's special logic and reuse the Component's mechanism.

Runtime level changes

  • The DataSource now can be either a Trait+Component or a single Component.
  • The metadata adds an isDataSource attribute to distinguish it from a generic Component or Trait. A Component or Trait with isDataSource will be shown in the DataSource list.
  • dummy components also add an isDataSource.

Editor level changes

  • Adding Trait such as state, fetch, etc. to Component is no longer prohibited.
  • All DataSource reuse Component's forms. For special forms such as Fetch Trait, they should be wrapped into Widgets.
  • DataSourceList reuse StructureTree components and have the same capabilities as component trees.
  • When creating a new DataSource, two methods are provided, either directly creating a Component that has isDataSource or selecting a Trait to create with dummy Component.
  • It is best practice to have only one Trait for a DataSource, but adding more than one at the UI level is not prohibited.

#639 #571

@tanbowensg tanbowensg marked this pull request as ready for review December 13, 2022 08:02
@tanbowensg tanbowensg changed the title Update DataSource support Component DataSource Dec 13, 2022
@tanbowensg tanbowensg force-pushed the refactor/datasource2 branch 2 times, most recently from 6309fc8 to 0fbbc1e Compare December 14, 2022 05:48
@tanbowensg tanbowensg merged commit c310b33 into develop Dec 23, 2022
@tanbowensg tanbowensg deleted the refactor/datasource2 branch December 23, 2022 10:17
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