-
Notifications
You must be signed in to change notification settings - Fork 299
Git / Version Control Integration #2110
Comments
Some open issues:
|
On top of the interface, there'd be several pieces of UI we could expose:
The nice thing about decoupling the 'interface' from the actual underlying implementation is it makes it easy for us to create a 'Mock' version control provider and ensure the UI works against it - so the work could be parallelized between the 'backend' providers and the UI work. |
@bryphe I very much like Fugitive, it's my favourite plugin, but I am not sure it would interface well to provide visual features. E.G. this is the blame feature As you can see it's a separate buffer that would have to be parsed to extract data. Or you would overlay it in some way for when you want to see the blame, the good thing is that it's so complete that if you click on the commit hash you are directed to a new buffer containing the It does have some functionalities you require, e.g. you can jump between conflict markers (using unimpaired.vim) with For managing the index, You can, for example, navigate with the cursor to an index entry and hit a shortcut:
As I said, since it had to interface with normal vim it does not have a IDE friendly output, unless you parse the buffers for some responses or change it to fit your needs, most of the functionality is already built. |
* add git addition and deletion count * add typing to git service * add ideas for styling * add error handling and checks to determine rendering * reorder comma separator * get gitroot utility and pass in current dit * fix name typo for gitroot fn * add logs for debugging * [WIP] debug ocaml lang server * promisify exec command merge upstream * add semicolon to external commandline config * add semicolon to js file as per lint error * write manual diffSummary function add per file changes and option to show perfile changes * add try catch block to prevent errors * add further check for error points * comment out unused fn call cast promisified type to any add fixme comment to check back in re this typing * add FA icons add spacer char change rendering so elements are only created as necessary * change long line initialisation to explicit decls * typos re variable names * revert markdown changes * revert markdown changes * remove local changes as they make little sense fix counting of local changes in case of future use case * re-add git-js * tweak use of git js * initialise git sync then use return git obj * remove cwd calls from git instantiation * ongoing experimentations with git plugin * initial re-implementation of git vcs as per #2110 * attempt promises with git and use workspace * use simple-git to get branch * remove console.log return empty string if no current branch * try using require version of simple git and saving git instance * try using chaining api rather than async/await * add git branch menu and tidy up plugin add get branches method and git checkout method to vcs provider * move git into version control service and add index * Use arrow functions in git vcs provider * add simple git to webpack external to prevent minfication mangling * add fetch branch commands * invert git plugin and git provider [WIP] * add functioning vcs manager * separate components into separate file remove specific references to git * add vcs components file * remove errant console.log * switch to using the registerProvider pattern * add sidebar plugin for vcs * tweak title styles and add modified count * use npm/yarn-run-all for start command to avoid memory leak * fix typing of files in vcsStore * use oni.log to log errors or default to console * revert changes in README.md * add simple-git as a dependency and typescript as a dev dependency * use run-s for unit tests * format response from git js to match VCSProvider return status object and render based on that * add more events to VersionControl interface * add enzyme tests for components, refactor additions and completions * add enzyme test file * tweak styles following component refactor * tidy up deletions and insertions component * add tests for VersionControlView component * fix stagedfileschanged event name typo use events to trigger getStatus in vcs pane * encapsulate getInstance phew.. really bugged me trade accuracy for cleverness in update branch indicator * fix use of menu api as it miss matches with the menumanager * dont export the init function in vcsmanager * Set error state in redux on error * update rxjs to 5.5.10 to match oni-types package * use fork of "oni-type" to test if ci passes * fix overflow issues and use word-break * wrap provider methods in try catch and explicitly return void or val * downgrade to rxjs 5.5.8 * revert to now fixed oni-types package * add initial functionality to activate and deactivate plugin * [WIP] Switch to activation and deactivation exclusively through events * remove console.log * add check inside vcsManager to control when plugin loads WIP * fix provider selection check * remove extra newline * upgrade oni types to 0.0.8 * fix manager comment typo add, ability to navigate titles add visibility filter to view component remove unused check in get status * add ability to collapse and expand sections * update tests and change from using capitalize fn :( * Move version control components, tidy up provider activations handler fix tests and componentize the caret * update snapshots * fix parsing issues in ui-test tabs * revert changes in FileConfiguration and tsconfig react * only create sidebar if none is existent remove unnecessary return, revert prettier to master version * remove useless wrapper div * update snapshots * allow git provider errors to bubble up so they can be handled with notifications which inform the user of why something is not working * remove unused var * add vcsmanager test in jest * fix not re-applying state error * pull upstream * remove uses of Log and use oni-core-logging * merge upstream fix conflicts * fix vcs name issue re. notifications * remove extra variable in App.ts * set simple git working dir constructor and handle updates there remove explicit passing in of working dir * remove vcs provider from duplicate interface * update functions to remove unnecessary args * run get diff and get branch in parallel fix missing return in diff fn * explicitly pass in the project root to prevent race conditions whilst changing dir * fix removal of initial gitp assignment in constructor * improve version control manager tests * update jest to avoid coverage bug improve test further * add send notification to vcs pane args * update snapshots * fix import ordering in view * gst * separate out subscription creation and error notifications switch package json plugin commands to && chain * remove console.logs * rename args * split out mocks into separate files * update tests wip * remove is repo check since plugin should only activate if is true convert handle provider to async function * await handle provider status * remove console.log assign subscriptions directly * upgrade ts-jest and redux mock store * add readable names to handle provider status * import * for vcs types fix import of redux mock store * add vcs definition file to be deleted once oni-api adds vcs * initialise project root to activeWorkspace * revert changes to commont.ts use SFC typing * fix package json * add vcs store test * fix new name of versioncontrolstate * hide sidebar behind experimental feature flag * remove collect coverage from jest config option * update version control pane to focus on testing react not redux * add jest to codecov command remove unnecessary type annotations * add jest coverage json to final istanbul report * update jest coverage runner * change path name for jest coverage file * add inlineSourceMap option to jest tsconfig * remove jest coverage merging * add jest coverage upload command * remove unnecessary coverage flag and type annotations * fix chained and operator ui bug using thing && thing && component can cause 0 to be rendered
I was going to mention magit but I see you've already heard. I would like to suggest if this "git integration" isn't similar to magit. Could you add the git commands used to the oni api so that I could build an oni magit plugin? 🤔 |
@basicBrogrammer we've implemented a Git vcs provider for oni on master though a lot of the functionality is still We also merged a buffer layer that adds a git blame per line as an example of some of the functionality that can be created. You can try it out on master and leave some feedback, or it should be out with the next release |
@Akin909 noice! I'm super stoked about this project and would love to get involved. Maybe I'll look into some "good first issues". I'll prolly start playing around with it this weekend |
@basicBrogrammer 😍 that'd be great to have some contributions, think atm we still need to label some of our issues as |
These are some thoughts on scenarios I'd like to support with version control integration.
Some specific scenarios that are important to enable:
These are primarily common problems across VCS providers. It'd be great if we could generalize these capabilities to work with different VCS providers, and allow a way to implement providers.
The 'provider' could be implemented as an interface - this is just a quick sketch of what a VCS Provider could look like:
Then, individual plugins could provide implementations of this. For example, a plugin like
oni-plugin-git
might have this:In addition, we'd want to add a 'contributes' section to the plugin metadata and a relevant activation event, so that we can 'lazy load' these plugins - we wouldn't need to load the VCS plugin until we've opened a workspace.
(I anticipate that the version control provider would listen to buffer events, like save, so it could use those to decide when it should check VCS status).
Even the relatively simple interface above would let us accomplish a pretty significant subset of functionality!
I think it would make sense to bundle the git integration as a first-class citizen, but allow this API to be open for other version control providers, too.
The text was updated successfully, but these errors were encountered: