KEMBAR78
Render the overview page with React by queerviolet · Pull Request #1096 · microsoft/vscode-pull-request-github · GitHub
Skip to content

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

Ashi Krishnan added 3 commits May 6, 2019 16:08
Co-Authored-By: stanleygoldman@github.com
Co-Authored-By: stanleygoldman@github.com
Co-Authored-By: stanleygoldman@github.com
Co-Authored-By: stanleygoldman@github.com
@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