aboutsummaryrefslogtreecommitdiffstats
path: root/static/qt-workflow-ui.js
Commit message (Collapse)AuthorAgeFilesLines
* ui: Use gerrit style variables where possible and change button orderv3.10-basedDaniel Smith2025-10-281-32/+55
| | | | | | | | | | | | | | The gerrit workflow plugin ui uses a bunch of hard-coded values for styling which break dark-mode usage. In addition, the cancel and confirm buttons are in the reverse order compared with default gerrit dialogs. This patch moves styling to use gerrit style variables where possible and switches the button order to match gerrit defaults. Fixes: QTQAINFRA-7494 Change-Id: Ib4b83e772da9cfb90464a49c7323f1a5dcc20b91 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* ui: Add keyboard hint for Ctrl+Enter to submit the dialogDaniel Smith2025-10-281-6/+54
| | | | | | | | | | This commit adds a simple hint text in the bottom-left of custom Qt dialogs to inform that a hotkey for submitting the form is available. Task-number: QTQAINFRA-5878 Change-Id: I477d8b8d59721dadeec4a50483dd9ba663e9cd8e Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* ui: Add cancel confirmation to precheck dialogDaniel Smith2025-10-281-0/+92
| | | | | | | | | | | | | | | | | This patch intercepts the Escape Key event in the precheck dialog, as well as the cancel button click, to show a confirmation dialog before closing and discarding the precheck dialog. During the implementation of this change, it was discovered that the precheck dialog left zombie elements in the DOM after being closed. This patch also addresses that issue by ensuring proper cleanup of the dialog elements on cancel. Implementation also required removal of the default gerrit UI cancel handler to avoid bypassing the confirmation dialog. Task-number: QTQAINFRA-5878 Change-Id: If88bd512781ce7818b9fb90e99d957ae38f8f7dd Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Add reason dialog to QtUnstage action to align with other actionsDaniel Smith2025-10-171-1/+2
| | | | | | Task-number: QTQAINFRA-3062 Change-Id: Ie3cb3aa0e5cba0870133edf2645fd3d9e42118ef Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Add comment inputs to defer and restore actionsDaniel Smith2025-10-171-1/+197
| | | | | | | | | The backend already supports comment inputs, and we have a user report that this is a regression. Fixes: QTQAINFRA-3062 Change-Id: I72a07e8907e86a9575c9e9604e7b1325c61f67b4 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* ui: Make Precheck open dialog from overflow via global listenersDaniel Smith2025-10-171-226/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PreCheck dialog was not opening when triggered from the overflow menu, because the listener registration was gated by seeing the PreCheck action inside show-revision-actions. The overflow entries are created/handled by Gerrit's core components, so this hook is not guaranteed to run before a user clicks the overflow item. Note: Functions and listener setup were relocated (not rewritten) to run at plugin startup and to cross shadow DOM boundaries reliably. This results in large blocks appearing as removed/added rather than modified, but the markup/logic of the dialog is unchanged. The restructuring ensures one-time, global listener registration and consistent behavior regardless of which UI path renders actions. As the diff may be difficult to read, here is a summary of changes: • Move listener registration to Gerrit.install so it's set up once at startup. • Listen for the gr-* action custom tap event: • gerrit-plugin-qt-workflow~precheck-revision-tap • Add a capturing fallback click listener that walks composedPath() to match overflow menu items by data-id. • Hoist createPrecheck() and onPrecheckBtn() to top-level and ensure idempotent custom element registration. • Store the actions map in plugin.__precheckActions and use it in the dialog confirm handler to resolve the POST url. Change-Id: Ifd51be017cc17b3c15b669d3293ad1b57723ece6 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Set precheck keyboard shortcuts to Ctrl+ReturnDaniel Smith2025-10-101-6/+57
| | | | | | | | | Includes drive-by fix to disable submit button to prevent double submits. Fixes: QTQAINFRA-7437 Change-Id: I9574800ceed9f636bc21d0db5ba6b570d5f52f29 Reviewed-by: Toni Saario <toni.saario@qt.io>
* Add UI plugin for commit message bannerDaniel Smith2024-12-181-0/+20
| | | | | | | | | | | | This UI plugin adds a red banner just below the commit message which indicates that the change modifies files marked with the Qt-Security: critical header comment, via the hashtag "Qt-Security change" which is set by another backend bot. Task-number: QTQAINFRA-6431 Change-Id: I76742937499cd500fdfe09f604ad95c85baea625 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Fix PreCheck dialog after Gerrit version updateJukka Jokiniva2024-04-021-0/+4
| | | | | Change-Id: I1a6bae3489db44f92702f5495f6662227214bfae Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Show CI load status in Gerrit UIJukka Jokiniva2024-04-021-0/+34
| | | | | | | | | | | Add ssh command API to upload CI queue info Add REST API for UI to get the info Add top menu with customized content to show the info Task-number: QTQAINFRA-4891 Change-Id: I2b7cb882a0ccc0827e1d9ae63379cb2c9d707e5e Reviewed-by: Daniel Smith <daniel.smith@qt.io> Reviewed-by: Toni Saario <toni.saario@qt.io>
* Fix precheck buildonly not workingToni Saario2023-08-011-1/+1
| | | | | | | | | It seems like the plugin API started to convert camelcase to lowercase at some point. Change the used names to lowercase. Task-number: QTQAINFRA-5612 Change-Id: I4fa131ff86e2546e0d8ebe416745ebe816f3156d Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Add option for cherry-pick in precheckToni Saario2023-08-011-2/+9
| | | | | | | | | Cherry-pick option tests the changes on top of latest HEAD of the branch rather than plain checkout of the change. Task-number: COIN-922 Change-Id: I0d3d73fa311d4ef6dfbd01e96d55ce1f3367f36a Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Add downstream precheck optionToni Saario2023-08-011-0/+1
| | | | | | | | | Downstream precheck schedules a qt5 precheck with prechecked change as part of it. Rest of the implementation in Coin repo. Task-number: COIN-1044 Change-Id: I3f9babf2f411f7fda791889c58f22546a1a6b750 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Add explicit margins for precheck elementsToni Saario2023-04-141-4/+11
| | | | | | | | Newer gerrit forces margins to 0 by default. Set the margins for relevant elements. Change-Id: Icb0230f25ac405b77be7eeec472bede4a718fb46 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Do not hide rebase in the UIJukka Jokiniva2023-04-141-3/+0
| | | | | | Task-number: QTQAINFRA-5425 Change-Id: I6ca4b9a108b2dd09ca82046b446b10b4d47501d0 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Include javascript UI plugin into the jar binaryJukka Jokiniva2023-04-141-0/+344
Change-Id: I8dfad844d35056b99b98ff4167ef05d1a6d8a810 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>