@gitlab/ui 88.1.0 → 88.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [88.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v88.1.0...v88.2.0) (2024-08-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlDuoChat:** provide hooks for consumer to focus + scroll ([3bba19f](https://gitlab.com/gitlab-org/gitlab-ui/commit/3bba19fce1cab5eef641fc7b838fc207a0641275))
|
|
7
|
+
|
|
1
8
|
# [88.1.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v88.0.0...v88.1.0) (2024-08-07)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -331,9 +331,17 @@ var script = {
|
|
|
331
331
|
},
|
|
332
332
|
async scrollToBottom() {
|
|
333
333
|
var _this$$refs$anchor, _this$$refs$anchor$sc;
|
|
334
|
+
// This method is also called directly by consumers of this component
|
|
335
|
+
// https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/3269f6200dc3821c62a3992b40c971dd9ee55d87/webviews/vue2/gitlab_duo_chat/src/App.vue#L97
|
|
334
336
|
await this.$nextTick();
|
|
335
337
|
(_this$$refs$anchor = this.$refs.anchor) === null || _this$$refs$anchor === void 0 ? void 0 : (_this$$refs$anchor$sc = _this$$refs$anchor.scrollIntoView) === null || _this$$refs$anchor$sc === void 0 ? void 0 : _this$$refs$anchor$sc.call(_this$$refs$anchor);
|
|
336
338
|
},
|
|
339
|
+
focusChatInput() {
|
|
340
|
+
var _this$$refs$prompt, _this$$refs$prompt$$e;
|
|
341
|
+
// This method is also called directly by consumers of this component
|
|
342
|
+
// https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/dae2d4669ab4da327921492a2962beae8a05c290/webviews/vue2/gitlab_duo_chat/src/App.vue#L109
|
|
343
|
+
(_this$$refs$prompt = this.$refs.prompt) === null || _this$$refs$prompt === void 0 ? void 0 : (_this$$refs$prompt$$e = _this$$refs$prompt.$el) === null || _this$$refs$prompt$$e === void 0 ? void 0 : _this$$refs$prompt$$e.focus();
|
|
344
|
+
},
|
|
337
345
|
onTrackFeedback(event) {
|
|
338
346
|
/**
|
|
339
347
|
* Notify listeners about the feedback form submission on a response message.
|
|
@@ -392,7 +400,7 @@ var script = {
|
|
|
392
400
|
let prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
393
401
|
this.prompt = prompt;
|
|
394
402
|
await this.$nextTick();
|
|
395
|
-
this
|
|
403
|
+
this.focusChatInput();
|
|
396
404
|
},
|
|
397
405
|
selectSlashCommand(index) {
|
|
398
406
|
const command = this.filteredSlashCommands[index];
|
package/package.json
CHANGED
|
@@ -345,10 +345,17 @@ export default {
|
|
|
345
345
|
this.scrolledToBottom = scrollTop + offsetHeight >= scrollHeight;
|
|
346
346
|
},
|
|
347
347
|
async scrollToBottom() {
|
|
348
|
+
// This method is also called directly by consumers of this component
|
|
349
|
+
// https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/3269f6200dc3821c62a3992b40c971dd9ee55d87/webviews/vue2/gitlab_duo_chat/src/App.vue#L97
|
|
348
350
|
await this.$nextTick();
|
|
349
351
|
|
|
350
352
|
this.$refs.anchor?.scrollIntoView?.();
|
|
351
353
|
},
|
|
354
|
+
focusChatInput() {
|
|
355
|
+
// This method is also called directly by consumers of this component
|
|
356
|
+
// https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/dae2d4669ab4da327921492a2962beae8a05c290/webviews/vue2/gitlab_duo_chat/src/App.vue#L109
|
|
357
|
+
this.$refs.prompt?.$el?.focus();
|
|
358
|
+
},
|
|
352
359
|
onTrackFeedback(event) {
|
|
353
360
|
/**
|
|
354
361
|
* Notify listeners about the feedback form submission on a response message.
|
|
@@ -403,7 +410,7 @@ export default {
|
|
|
403
410
|
async setPromptAndFocus(prompt = '') {
|
|
404
411
|
this.prompt = prompt;
|
|
405
412
|
await this.$nextTick();
|
|
406
|
-
this
|
|
413
|
+
this.focusChatInput();
|
|
407
414
|
},
|
|
408
415
|
selectSlashCommand(index) {
|
|
409
416
|
const command = this.filteredSlashCommands[index];
|