Skip to content

Render the overview page with React #1096

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

Merged
merged 59 commits into from
May 8, 2019
Merged

Render the overview page with React #1096

merged 59 commits into from
May 8, 2019

Conversation

queerviolet
Copy link
Contributor

@queerviolet queerviolet commented Apr 1, 2019

This PR introduces React, which we then use to render the preview page.

The conversion is fairly straightforward, mostly maintaining the page structure and appearance while converting the plumbing to React. We now use a React context—the PullRequestContext, defined in context.tsx, to pass mutation functions down to components. The context object, initialized at page load time, also maintains the current state of the PR, and sends it to the root component via an event listener.

Fixes #416

TODO:

  • Render the header and details view
  • Render timeline events:
    • Commit
    • Review
    • Merged
  • Render diffs
  • Comment widget
  • Action bar
  • Wire actions via a pull request context
    • For checking out branches
    • For exiting review mode
    • For submitting comments
    • For editing comments

@meaghanlewis meaghanlewis mentioned this pull request Apr 1, 2019
7 tasks
Copy link
Contributor

@RMacfarlane RMacfarlane left a comment

Choose a reason for hiding this comment

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

I like the structure of this!! Breaking things up into smaller files is really nice. I think having a components folder within preview-src for tsx files would be helpful.

One other piece I noticed was missing is the reviewers/labels sidebar section

@queerviolet queerviolet changed the title Render the overview page with React [WIP] Render the overview page with React Apr 8, 2019
@queerviolet
Copy link
Contributor Author

Okay, got through those changes, and finally got us saving and restoring draft comments appropriately. PTAL @RMacfarlane @StanleyGoldman

@StanleyGoldman
Copy link
Contributor

Two things just noticed, don't want to forget.

  • On leaving a comment, timeout remains pending
  • On leaving a comment, user avatar does not appear

@queerviolet queerviolet requested a review from RMacfarlane May 7, 2019 17:58
Copy link
Contributor

@RMacfarlane RMacfarlane left a comment

Choose a reason for hiding this comment

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

LGTM!

@queerviolet queerviolet merged commit 1d7cff2 into master May 8, 2019
@queerviolet queerviolet deleted the qv/react branch May 8, 2019 18:27
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.

Cannot load avatars from GitHub Enterprise URLs
4 participants