@gitlab/ui 93.2.0 → 93.3.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
+ # [93.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v93.2.0...v93.3.0) (2024-09-19)
2
+
3
+
4
+ ### Features
5
+
6
+ * **DuoChatContextItemPopover:** fix styling for long strings ([b7b4517](https://gitlab.com/gitlab-org/gitlab-ui/commit/b7b451796eb0585b57922682a5cef42ac945a1f9))
7
+
1
8
  # [93.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v93.1.0...v93.2.0) (2024-09-19)
2
9
 
3
10
 
@@ -184266,7 +184266,14 @@ var tailwindEquivalents = {
184266
184266
  "gl-bg-data-viz-magenta-950!": "!gl-bg-data-viz-magenta-950",
184267
184267
  "gl-inset-border-1-red-300": "gl-shadow-inner-1-red-300",
184268
184268
  "gl-inset-border-1-red-500": "gl-shadow-inner-1-red-500",
184269
- "gl-column-gap-3": "gl-gap-x-3"
184269
+ "gl-column-gap-3": "gl-gap-x-3",
184270
+ // The following equivalents were found while migrating GitLab UI's stylesheets
184271
+ "gl-text-decoration-color-gray-900": "gl-decoration-gray-900",
184272
+ "gl-text-decoration-color-gray-500": "gl-decoration-gray-500",
184273
+ "gl-text-transform-none": "gl-normal-case",
184274
+ "gl-bg-current-color": "gl-bg-current",
184275
+ "gl-w-eighth": "gl-w-1/8",
184276
+ "gl-w-max-content": "gl-w-max"
184270
184277
  };
184271
184278
 
184272
184279
  // bin/lib/tailwind_migrations.mjs
@@ -98,7 +98,7 @@ var script = {
98
98
  const __vue_script__ = script;
99
99
 
100
100
  /* template */
101
- var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-popover',{attrs:{"target":_vm.target,"triggers":"hover focus","placement":_vm.placement,"title":_vm.title,"custom-class":"gl-duo-chat-item-popover"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_c('div',{staticClass:"gl-heading-3 gl-mb-1 gl-mt-2 gl-leading-1",attrs:{"data-testid":"chat-context-popover-title"}},[_vm._v("\n "+_vm._s(_vm.contextItem.metadata.title)+"\n ")]),_vm._v(" "),_c('div',{staticClass:"gl-font-normal gl-text-subtle"},[_vm._v(_vm._s(_vm.itemTypeLabel))])])]},proxy:true}])},[_vm._v(" "),_c('div',[(_vm.filePath !== null)?_c('div',{staticClass:"gl-flex gl-flex-wrap gl-items-center"},[_c('gl-icon',{staticClass:"gl-mr-1",attrs:{"name":"document","size":12,"variant":"subtle"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.contextItem.metadata.project))]),_vm._l((_vm.filePathArray),function(pathPart,index){return _c('span',{key:pathPart,staticClass:"gl-break-all"},[_vm._v(_vm._s(pathPart)+_vm._s(index + 1 < _vm.filePathArray.length ? '/' : ''))])})],2):_vm._e(),_vm._v(" "),(_vm.filePath === null)?_c('div',{staticClass:"gl-flex gl-flex-wrap gl-items-center gl-leading-1 gl-text-subtle"},[_c('gl-icon',{staticClass:"gl-mr-1",attrs:{"name":_vm.iconName,"size":12,"variant":"subtle"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.contextItem.metadata.project))]),(_vm.id !== null)?_c('span',[_vm._v(_vm._s(_vm.formattedId))]):_vm._e()],1):_vm._e(),_vm._v(" "),(!_vm.isEnabled)?_c('gl-alert',{staticClass:"gl-mb-1 gl-mt-3 gl-p-4 gl-text-sm",attrs:{"variant":"danger","data-testid":"chat-context-popover-disabled","dismissible":false,"show-icon":false}},[_vm._v("\n "+_vm._s(_vm.disabledMessage)+"\n ")]):_vm._e()],1)])};
101
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-popover',{attrs:{"target":_vm.target,"triggers":"hover focus","placement":_vm.placement,"title":_vm.title,"custom-class":"gl-duo-chat-item-popover"},scopedSlots:_vm._u([{key:"title",fn:function(){return [_c('div',[_c('div',{staticClass:"gl-heading-3 gl-mb-1 gl-mt-2 gl-leading-1",attrs:{"data-testid":"chat-context-popover-title"}},[_vm._v("\n "+_vm._s(_vm.contextItem.metadata.title)+"\n ")]),_vm._v(" "),_c('div',{staticClass:"gl-font-normal gl-text-subtle"},[_vm._v(_vm._s(_vm.itemTypeLabel))])])]},proxy:true}])},[_vm._v(" "),_c('div',[(_vm.filePath !== null)?_c('div',[_c('gl-icon',{staticClass:"gl-mr-1",attrs:{"name":"document","size":12,"variant":"subtle"}}),_c('span',{staticClass:"gl-break-all"},[_vm._v(_vm._s(_vm.contextItem.metadata.project))]),_vm._l((_vm.filePathArray),function(pathPart,index){return _c('span',{key:pathPart,staticClass:"gl-break-all"},[_vm._v(_vm._s(pathPart)+_vm._s(index + 1 < _vm.filePathArray.length ? '/' : ''))])})],2):_c('div',[_c('gl-icon',{staticClass:"gl-mr-1",attrs:{"name":_vm.iconName,"size":12,"variant":"subtle"}}),_c('span',{staticClass:"gl-break-all"},[_vm._v(_vm._s(_vm.contextItem.metadata.project))]),(_vm.id !== null)?_c('span',{staticClass:"gl-break-all"},[_vm._v(_vm._s(_vm.formattedId))]):_vm._e()],1),_vm._v(" "),(!_vm.isEnabled)?_c('gl-alert',{staticClass:"gl-mb-1 gl-mt-3 gl-p-4 gl-text-sm",attrs:{"variant":"danger","data-testid":"chat-context-popover-disabled","dismissible":false,"show-icon":false}},[_vm._v("\n "+_vm._s(_vm.disabledMessage)+"\n ")]):_vm._e()],1)])};
102
102
  var __vue_staticRenderFns__ = [];
103
103
 
104
104
  /* style */
@@ -16,7 +16,6 @@ import GlDuoChatLoader from './components/duo_chat_loader/duo_chat_loader';
16
16
  import GlDuoChatPredefinedPrompts from './components/duo_chat_predefined_prompts/duo_chat_predefined_prompts';
17
17
  import GlDuoChatConversation from './components/duo_chat_conversation/duo_chat_conversation';
18
18
  import { CHAT_RESET_MESSAGE, CHAT_INCLUDE_MESSAGE, MESSAGE_MODEL_ROLES, CHAT_CLEAN_MESSAGE, CHAT_CLEAR_MESSAGE } from './constants';
19
- import { INCLUDE_SLASH_COMMAND } from './mock_data';
20
19
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
21
20
 
22
21
  const i18n = {
@@ -275,7 +274,7 @@ var script = {
275
274
  // if user has removed entire command (or whole command except for '/') we should close context item menu and allow slash command menu to show again
276
275
  return false;
277
276
  }
278
- return INCLUDE_SLASH_COMMAND.name.startsWith(this.caseInsensitivePrompt);
277
+ return CHAT_INCLUDE_MESSAGE.startsWith(this.caseInsensitivePrompt);
279
278
  },
280
279
  inputPlaceholder() {
281
280
  if (this.chatPromptPlaceholder) {
@@ -412,7 +411,7 @@ var script = {
412
411
  (_this$contextItemMenu = this.contextItemMenuRef) === null || _this$contextItemMenu === void 0 ? void 0 : _this$contextItemMenu.handleKeyUp(e);
413
412
  return;
414
413
  }
415
- if (this.caseInsensitivePrompt === INCLUDE_SLASH_COMMAND.name) {
414
+ if (this.caseInsensitivePrompt === CHAT_INCLUDE_MESSAGE) {
416
415
  this.contextItemsMenuIsOpen = true;
417
416
  return;
418
417
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "93.2.0",
3
+ "version": "93.3.0",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -124,22 +124,19 @@ export default {
124
124
  </div>
125
125
  </template>
126
126
  <div>
127
- <div v-if="filePath !== null" class="gl-flex gl-flex-wrap gl-items-center">
128
- <gl-icon name="document" :size="12" variant="subtle" class="gl-mr-1" />
129
- <span>{{ contextItem.metadata.project }}</span
127
+ <div v-if="filePath !== null">
128
+ <gl-icon name="document" :size="12" variant="subtle" class="gl-mr-1" /><span
129
+ class="gl-break-all"
130
+ >{{ contextItem.metadata.project }}</span
130
131
  ><span v-for="(pathPart, index) in filePathArray" :key="pathPart" class="gl-break-all"
131
132
  >{{ pathPart }}{{ index + 1 < filePathArray.length ? '/' : '' }}</span
132
133
  >
133
134
  </div>
134
-
135
- <div
136
- v-if="filePath === null"
137
- class="gl-flex gl-flex-wrap gl-items-center gl-leading-1 gl-text-subtle"
138
- >
139
- <gl-icon :name="iconName" :size="12" variant="subtle" class="gl-mr-1" />
140
-
141
- <span>{{ contextItem.metadata.project }}</span
142
- ><span v-if="id !== null">{{ formattedId }}</span>
135
+ <div v-else>
136
+ <gl-icon :name="iconName" :size="12" variant="subtle" class="gl-mr-1" /><span
137
+ class="gl-break-all"
138
+ >{{ contextItem.metadata.project }}</span
139
+ ><span v-if="id !== null" class="gl-break-all">{{ formattedId }}</span>
143
140
  </div>
144
141
  <gl-alert
145
142
  v-if="!isEnabled"
@@ -23,7 +23,6 @@ import {
23
23
  CHAT_INCLUDE_MESSAGE,
24
24
  MESSAGE_MODEL_ROLES,
25
25
  } from './constants';
26
- import { INCLUDE_SLASH_COMMAND } from './mock_data';
27
26
 
28
27
  export const i18n = {
29
28
  CHAT_DEFAULT_TITLE: translate('GlDuoChat.chatDefaultTitle', 'GitLab Duo Chat'),
@@ -324,7 +323,7 @@ export default {
324
323
  return false;
325
324
  }
326
325
 
327
- return INCLUDE_SLASH_COMMAND.name.startsWith(this.caseInsensitivePrompt);
326
+ return CHAT_INCLUDE_MESSAGE.startsWith(this.caseInsensitivePrompt);
328
327
  },
329
328
  inputPlaceholder() {
330
329
  if (this.chatPromptPlaceholder) {
@@ -462,7 +461,7 @@ export default {
462
461
  this.contextItemMenuRef?.handleKeyUp(e);
463
462
  return;
464
463
  }
465
- if (this.caseInsensitivePrompt === INCLUDE_SLASH_COMMAND.name) {
464
+ if (this.caseInsensitivePrompt === CHAT_INCLUDE_MESSAGE) {
466
465
  this.contextItemsMenuIsOpen = true;
467
466
  return;
468
467
  }