Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Create and publish dialog #2222

Merged
merged 78 commits into from
Oct 4, 2019
Merged

Create and publish dialog #2222

merged 78 commits into from
Oct 4, 2019

Conversation

smashwilson
Copy link
Contributor

@smashwilson smashwilson commented Jul 23, 2019

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

Add a dialog that:

  • Creates a new repository on GitHub, clones it to a local path, and configures a git repository at that path with a remote that pushes to it
  • Publishes an existing repository from a local path to a newly created repository on GitHub.

Within the scope of this pull request, these will be triggered with github:create-repository and github:publish-repository commands on the command palette. They'll additionally be triggered from the GitHub tab's blank state in later work.

Remaining work

  • Refactor a CreateDialogController out of CreateDialogView.
  • Flesh out the CreateDialogContainer to render the CreateDialogView within a query renderer
  • Bundle the container and view into a CreateDialog component
  • Repository create and publish action functions alongside CreateDialog
  • Pass the current BrowserWindow from the Atom environment to the CreateDialogView
  • Load additional pages of a user's organizations in RepositoryHomeSelectionView
  • Wire the CreateDialog up to commands in RootController
  • Keyboard focus does not work correctly within CreateDialog
    • Autofocus is overridden after GraphQL result arrives
    • Some elements (radio buttons) don't seem to have focus styles applied correctly
    • Select list does not appear to be tabbable
    • Arrow keys do not work correctly within Select list (filed as Arrow keys do not work in co-author select menu #2295).
    • Hidden input within TextEditor elements has a tab index of -1. This interferes with the ability of Atom's core:focus-next and core:focus-previous commands to correctly navigate among elements with sequential positive tabIndex values when any of them are <atom-text-editor> elements.
  • Repository name / directory basename syncing is janky
  • Publish command is not registered properly

Screenshot/Gif

TODO

Alternate Designs

N/A

Benefits

Users will be able to create GitHub repositories from within Atom.

Possible Drawbacks

N/A

Applicable Issues

This is the first independent chunk of the work for feature request outlined in #2111.

Metrics

TODO

Tests

  • Full patch test coverage

Manual verification:

  • Create a repository on GitHub with github:create-repository.
  • Initialize and publish a repository on GitHub with github:publish-repository.

Documentation

TODO

Release Notes

  • New repositories may be created on GitHub by running the github:create-repository command.
  • Existing git repositories may be published to GitHub by running the github:publish-repository command.

User Experience Research (Optional)

N/A

@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #2222 into master will increase coverage by 0.01%.
The diff coverage is 93.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2222      +/-   ##
==========================================
+ Coverage   92.75%   92.76%   +0.01%     
==========================================
  Files         219      222       +3     
  Lines       12322    12355      +33     
  Branches     1793     1798       +5     
==========================================
+ Hits        11429    11461      +32     
- Misses        893      894       +1
Impacted Files Coverage Δ
lib/views/directory-select.js 100% <100%> (ø)
lib/views/remote-configuration-view.js 100% <100%> (ø)
lib/views/repository-home-selection-view.js 88.88% <88.88%> (ø)
lib/atom/gutter.js 92.3% <0%> (+2.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8aa3b8...edf622b. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #2222 into master will increase coverage by 0.53%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2222      +/-   ##
==========================================
+ Coverage   92.75%   93.28%   +0.53%     
==========================================
  Files         219      228       +9     
  Lines       12322    12889     +567     
  Branches     1793     1846      +53     
==========================================
+ Hits        11429    12024     +595     
+ Misses        893      865      -28
Impacted Files Coverage Δ
lib/models/repository.js 96.35% <ø> (ø) ⬆️
lib/controllers/recent-commits-controller.js 100% <ø> (ø) ⬆️
lib/views/dialog-view.js 100% <ø> (ø) ⬆️
lib/views/commit-view.js 82.89% <ø> (+0.25%) ⬆️
lib/views/create-dialog-view.js 100% <100%> (ø)
lib/containers/create-dialog-container.js 100% <100%> (ø)
lib/views/create-dialog.js 100% <100%> (ø)
lib/models/repository-states/empty.js 77.77% <100%> (ø) ⬆️
lib/views/clone-dialog.js 100% <100%> (+2.94%) ⬆️
lib/views/recent-commits-view.js 98.57% <100%> (+0.32%) ⬆️
... and 168 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8aa3b8...9c0d6fb. Read the comment docs.

@smashwilson smashwilson marked this pull request as ready for review October 3, 2019 20:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants