Get rid of some global variables - Part 1 * Replace the following global variables with named imports: - GrChangeReplyInterface - GrEditConstants - GrFileListConstants * Update gr-app-global-var-init.js Change-Id: I8f19739784789d1f26b893b9faab9d6a279bfc60
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js index dfb378e..63f9471 100644 --- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js +++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
@@ -21,7 +21,6 @@ import '../../core/gr-navigation/gr-navigation.js'; import '../../core/gr-reporting/gr-reporting.js'; import '../../diff/gr-comment-api/gr-comment-api.js'; -import '../../edit/gr-edit-constants.js'; import '../../plugins/gr-endpoint-decorator/gr-endpoint-decorator.js'; import '../../plugins/gr-endpoint-param/gr-endpoint-param.js'; import '../../shared/gr-account-link/gr-account-link.js'; @@ -60,6 +59,7 @@ import {PatchSetBehavior} from '../../../behaviors/gr-patch-set-behavior/gr-patch-set-behavior.js'; import {KeyboardShortcutBehavior} from '../../../behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.js'; import {RESTClientBehavior} from '../../../behaviors/rest-client-behavior/rest-client-behavior.js'; +import {GrEditConstants} from '../../edit/gr-edit-constants.js'; import {PrimaryTabs, SecondaryTabs} from '../../../constants/constants.js'; import {NO_ROBOT_COMMENTS_THREADS_MSG} from '../../../constants/messages.js';
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html index 1c82e5e..40528ff 100644 --- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html +++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html
@@ -45,6 +45,8 @@ import {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js'; import {KeyboardShortcutBinder} from '../../../behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.js'; +import {GrEditConstants} from '../../edit/gr-edit-constants.js'; + suite('gr-change-view tests', () => { const kb = KeyboardShortcutBinder; kb.bindShortcut(kb.Shortcut.SEND_REPLY, 'ctrl+enter');