Skip to content

WIP: FE for Mirror WebIDE changes

Paul Slaughter requested to merge 5276-fe-mirror-webide-changes into master

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
Screen_Shot_2019-06-06_at_10.58.21_PM Screen_Shot_2019-06-06_at_10.59.55_PM Screen_Shot_2019-06-06_at_11.00.07_PM Screen_Shot_2019-06-06_at_11.00.17_PM Screen_Shot_2019-06-06_at_11.02.16_PM

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Closes #5276 (closed)

Edited by Paul Slaughter

Merge request reports