GitHub sync modal react port (#3711)

* GH-sync React - initial left menu github sync react skeleton

* GH-sync modal main switching logic setup and free trial mode

* GH-sync react - message for link sharing users

* GH-sync react: link gh account from modal

* GH-sync React: add export to github form modal

* GH-sync react: display commits and merge buttons

* GH-sync react: merge logic

* GH-sync React: merge endpoint error handling

* GH-sync React: update error handling to new fetch behaviour

* GH-sync React: handle ignoring external updates

* GH-sync React: main switcher modal tests

* GH-sync React: tests for export and merge

* GH-sync react: error handling and error boundary

* GH-sync React: put behind alpha flag

* GH-sync React: re-adding translations lost in rebase and cleanup

* GH-sync React: use renderWithEditorContext for tests and replace missing translations

* GH-sync React review code cleanup
GH-sync React fix state ordering causing errors

GitOrigin-RevId: 37261966683112b399ef180ec6bc4036bc689fd9
This commit is contained in:
Hugh O'Brien 2021-04-06 12:21:47 +01:00 committed by Copybot
parent ec7cd9fc3e
commit 0aba0300d1
3 changed files with 45 additions and 1 deletions

View file

@ -748,6 +748,8 @@ const ProjectController = {
req.query && req.query.new_share_modal_ui === 'false'
const wantsOldAddFilesModalUI =
req.query && req.query.new_add_files_modal_ui === 'false'
const wantsOldGithubSyncUI =
req.query && req.query.new_github_sync_ui === 'false'
AuthorizationManager.getPrivilegeLevelForProject(
userId,
@ -867,7 +869,8 @@ const ProjectController = {
showReactFileTree: !wantsOldFileTreeUI,
showReactShareModal: user.betaProgram && !wantsOldShareModalUI,
showReactAddFilesModal:
user.betaProgram && !wantsOldAddFilesModalUI
user.betaProgram && !wantsOldAddFilesModalUI,
showReactGithubSync: !wantsOldGithubSyncUI && user.alphaProgram
})
timer.done()
}

View file

@ -24,6 +24,7 @@
"change_owner": "",
"change_project_owner": "",
"chat": "",
"checking_project_github_status": "",
"clear_cached_files": "",
"clone_with_git": "",
"close": "",
@ -34,6 +35,7 @@
"collaborate_online_and_offline": "",
"collabs_per_proj": "",
"collapse": "",
"commit": "",
"common": "",
"compile_error_description": "",
"compile_error_entry_description": "",
@ -43,14 +45,17 @@
"compiling": "",
"conflicting_paths_found": "",
"connected_users": "",
"continue_github_merge": "",
"copy": "",
"copy_project": "",
"copying": "",
"create": "",
"create_project_in_github": "",
"creating": "",
"delete": "",
"deleting": "",
"demonstrating_git_integration": "",
"description": "",
"dismiss": "",
"dismiss_error_popup": "",
"done": "",
@ -60,6 +65,7 @@
"editing": "",
"error": "",
"expand": "",
"export_project_to_github": "",
"fast": "",
"file_already_exists": "",
"file_already_exists_in_this_location": "",
@ -75,6 +81,22 @@
"generic_something_went_wrong": "",
"get_collaborative_benefits": "",
"git_bridge_modal_description": "",
"github_commit_message_placeholder": "",
"github_credentials_expired": "",
"github_file_name_error": "",
"github_for_link_shared_projects": "",
"github_large_files_error": "",
"github_merge_failed": "",
"github_private_description": "",
"github_public_description": "",
"github_repository_diverged": "",
"github_symlink_error": "",
"github_sync": "",
"github_sync_error": "",
"github_sync_repository_not_found_description": "",
"github_timeout_error": "",
"github_too_many_files_error": "",
"github_validation_check": "",
"give_feedback": "",
"go_to_error_location": "",
"headers": "",
@ -82,6 +104,7 @@
"history": "",
"hotkeys": "",
"ignore_validation_errors": "",
"importing_and_merging_changes_in_github": "",
"invalid_email": "",
"invalid_file_name": "",
"invite_not_accepted": "",
@ -89,10 +112,13 @@
"learn_more_about_link_sharing": "",
"link_sharing_is_off": "",
"link_sharing_is_on": "",
"link_to_github": "",
"link_to_github_description": "",
"link_to_mendeley": "",
"link_to_zotero": "",
"linked_file": "",
"loading": "",
"loading_recent_github_commits": "",
"log_entry_description": "",
"log_hint_extra_info": "",
"logs_pane_beta_message": "",
@ -121,10 +147,12 @@
"new_folder": "",
"new_name": "",
"no_messages": "",
"no_new_commits_in_github": "",
"normal": "",
"off": "",
"ok": "",
"on": "",
"optional": "",
"or": "",
"other_logs_and_files": "",
"other_output_files": "",
@ -137,17 +165,25 @@
"please_refresh": "",
"please_set_main_file": "",
"plus_upgraded_accounts_receive": "",
"private": "",
"proj_timed_out_reason": "",
"project_approaching_file_limit": "",
"project_flagged_too_many_compiles": "",
"project_has_too_many_files": "",
"project_not_linked_to_github": "",
"project_ownership_transfer_confirmation_1": "",
"project_ownership_transfer_confirmation_2": "",
"project_synced_with_git_repo_at": "",
"project_too_large": "",
"project_too_large_please_reduce": "",
"public": "",
"pull_github_changes_into_sharelatex": "",
"push_sharelatex_changes_to_github": "",
"raw_logs": "",
"raw_logs_description": "",
"read_only": "",
"reauthorize_github_account": "",
"recent_commits_in_github": "",
"recompile": "",
"recompile_from_scratch": "",
"reference_error_relink_hint": "",
@ -156,6 +192,7 @@
"remote_service_error": "",
"remove_collaborator": "",
"rename": "",
"repository_name": "",
"resend": "",
"review": "",
"revoke_invite": "",
@ -176,6 +213,7 @@
"stop_on_validation_error": "",
"store_your_work": "",
"sure_you_want_to_delete": "",
"sync_project_to_github_explanation": "",
"sync_to_dropbox": "",
"sync_to_github": "",
"terminated": "",

View file

@ -5,6 +5,9 @@ export function setupContext() {
window.user = {
id: 'fake_user'
}
window.ExposedSettings = {
appName: 'Overleaf'
}
let $scope = {}
if (window._ide) {
$scope = {