Skip to content

refactor(React Incubation): Entity Interface & EntityRegistry#2077

Merged
shirshanka merged 4 commits intodatahub-project:masterfrom
jjoyce0510:React-Entity-Registry
Feb 3, 2021
Merged

refactor(React Incubation): Entity Interface & EntityRegistry#2077
shirshanka merged 4 commits intodatahub-project:masterfrom
jjoyce0510:React-Entity-Registry

Conversation

@jjoyce0510
Copy link
Collaborator

@jjoyce0510 jjoyce0510 commented Feb 2, 2021

Description

This PR introduces 2 concepts into the incubating React app:

  1. Entity Interface: Defines a set of methods implemented by every top-level UI entity shown in the UI (Dataset, CorpUser, etc). These methods are used to signal which features are enabled for a particular entity (browse, search) as well as providing functions for rendering views across feature verticals. (Examples: DatasetEntity, UserEntity)
  2. EntityRegistry: A singleton class provided via React Context to all components which serves as the source of truth for instances of the Entity interface.

(Also included some minor refactorings)

Architecture
image

Notes
As the app is still in active incubation, this architecture is subject to change.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

jjoyce0510 and others added 2 commits February 1, 2021 18:51
Introducing the Entity Registry: an Entity-oriented Architecture

Co-authored-by: John Joyce <[email protected]>
Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

Thanks for the great feedback @igbopie, @woodyzhou and @gabe-lyons!
LGTM now.

@shirshanka shirshanka merged commit 9d38ae4 into datahub-project:master Feb 3, 2021
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.

6 participants