WIP: FE for Mirror WebIDE changes
What does this MR do?
This MR implements the FE for oneway file syncing of the Web IDE file changes to the terminal runner.
Parts
To make it easier to review, this MR is being split into parts. After these parts have been merged, then lets close this one.
Link | Title |
---|---|
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14026 | [Part 1] Remove 'build-page' from 'ide-terminal' element |
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29331 | [CE of Part 1] |
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14027 | [Part 2] 5276 Update existing stores for terminal file sync |
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29333 | [CE of Part 2] |
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14033 | [Part 3] Update file mirror and diff modules |
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29360 | [CE of Part 3] Update file mirror and diff modules |
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14034 | [Part 4] Create terminal sync Vuex module and update plugin |
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14035 | [Part 5] Terminal sync service status label in IDE status bar |
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29371 | [CE of Part 5] |
Code design
Not sure if it helps, but here's a very informal dependency graph of what's going on...
graph TD;
A[ee/ide/stores/plugins/terminal_sync] --> |watches the state of| B[ee/ide/stores/modules/terminal]
A --> |listens to| C[ide/event_hub]
A --> |registers and controls| D[ee/ide/stores/modules/terminal_sync]
D --> |calls| E[ee/lib/mirror]
E --> |connects to| F[webide-file-sync service]
G[ide/stores] --> |emits to| C
Screenshots
Demo
20190606_webide_file_sync_demo
Features added in this MR:
- Connect to
webide-file-sync
service on terminal start and send file changes when:- The user hits CMD/CTRL+S while focused on the editor
- The editor loses focus
- File is deleted
- File is renamed
- File is added
-
terminal_sync
status label in the IDE bottom status bar. This label is only visible when the feature is available, properly configured, and a terminal is running. - If a service named
webide-file-sync
does not exist in.gitlab/.gitlab-webide.yml
then nothing happens. - If the feature flag
:build_service_proxy
is disabled, then nothing happens.
Status label
This label appears at the bottom status bar in the WebIDE and it is only visible when the service is active.
N/A | Loading | Running and last send was successful | + hover | error |
---|---|---|---|---|
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Closes #5276 (closed)
Edited by Paul Slaughter