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(React Incubation): React Playground Proof of Concept #2059

Merged
merged 3 commits into from
Jan 17, 2021

Conversation

jjoyce0510
Copy link
Collaborator

@jjoyce0510 jjoyce0510 commented Jan 15, 2021

This PR includes a React proof-of-concept under a new 'datahub-web-react' module. I chose to locate it there instead of /contrib because I've been testing serving this from datahub-frontend and gradle modules are required for that!

Take a look around, explore! To run the mock server, run yarn run start from inside the datahub-web-react module. As of now, we are simply mocking GraphQL response data using Apollo MockProvider. You can find the request-response mocks under Mocks.tsx in /src directory. This can be changed using a variable in App.tsx if you want to hit a local datahub-frontend (but must have /graphql endpoint changes from my prev PRs).

You'll notice that the reason we can work with type-safe GQL bindings is because I've provided a temporary GQL schema file directly within the react app directory (datahub-frontend.graphql). Once the other pending GQL PRs are in, this will be replaced by the .graphql file inside /datahub-frontend.

Currently, most requests simply won't return any mocked data, try navigating to the following paths to see some content:

localhost:3000/logIn
localhost:3000/datasets/urn:li:dataset:1
localhost:3000/search?type=dataset&query=test

Notice that this is a major work-in-progress, many components need to be cleaned up & iterated on. Specifically we'll need to address styling convention (currently inlining styles, ew), testing convention, design, how we permit configurability / extensibility & more.

Some fun screenshots!
Screen Shot 2021-01-14 at 9 38 46 PM
Screen Shot 2021-01-14 at 11 30 41 PM
Screen Shot 2021-01-14 at 9 38 09 PM

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
Copy link
Collaborator Author

The architecture / layout of the components shown as of today are not the final proposal. One interesting thing to consider further is how 'entity-oriented' we should go. The existing Ember app provides Entity classes where details, search, & browse information is all located. Following a similar pattern here should be considered!

@shirshanka shirshanka changed the title feat(React Incubation): React Playground PoC! (WIP) feat(React Incubation): React Playground Proof of Concept Jan 17, 2021
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.

Build is green. Approving and merging in, so community can play with it, while we can iterate on further design and extract common components from Ember app with LI team.

@shirshanka shirshanka merged commit 550cdc5 into datahub-project:master Jan 17, 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.

2 participants