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

Rework PaneItem management #1414

Merged
merged 27 commits into from Apr 28, 2018

Conversation

Projects
None yet
3 participants
@smashwilson
Member

smashwilson commented Apr 23, 2018

Another bit of ambient cleanup work. This is me trying to get our PaneItem and opener management consistent and React-y. If we like it, I should be able to port over all of our existing PaneItems pretty quickly, as we don't have that many.

Here's a spoiler of what I'm building toward:

render() {
  return (
    <PaneItem
      workspace={this.props.workspace}
      uriPattern='atom-github://something/root/{filePath...}?q={search}'>
      {({itemHolder, params}) => (
        <ItemComponent
          ref={itemHolder.setter}
          filePath={params.filePath}
          search={params.search}
          another='prop'
        />
      )}
    </PaneItem>
  )
}

Fixes #1405.

Pane items to convert

  • FilePatchController
  • IssueishPaneItem
  • GitTimingsView

smashwilson added some commits Apr 23, 2018

smashwilson added some commits Apr 23, 2018

@smashwilson smashwilson requested review from kuychaco and BinaryMuse Apr 24, 2018

@smashwilson

This comment has been minimized.

Member

smashwilson commented Apr 24, 2018

@kuychaco @annthurium: I'm curious if you two like the API I've come up with here, and if you think it's a net benefit from the way that we used to manage pane items.

For reference, here's the new style:

The old style had a few different variants:

@smashwilson smashwilson requested review from annthurium and removed request for BinaryMuse Apr 26, 2018

@smashwilson

This comment has been minimized.

Member

smashwilson commented Apr 26, 2018

😆 Sorry about that, @BinaryMuse. I'm guessing I was overzealously clicking on suggested reviewers?

import url from 'url';
/**
* Match and capture parts of a URI, like a specialized dialect of regular expression. This is used by PaneItem to

This comment has been minimized.

@annthurium

annthurium Apr 26, 2018

Contributor

yay documentation!!

@annthurium

This comment has been minimized.

Contributor

annthurium commented Apr 26, 2018

looks good to me!

* </PaneItem>
* );
* }
*/

This comment has been minimized.

@kuychaco

kuychaco Apr 27, 2018

Member

👍👍

@kuychaco

Looks good! Thanks for doing this @smashwilson

@smashwilson

This comment has been minimized.

Member

smashwilson commented Apr 28, 2018

Cool, thanks for the sanity check 😄

@smashwilson smashwilson merged commit 3fab272 into master Apr 28, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@smashwilson smashwilson deleted the aw/pane-item-pain branch Apr 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment