From 70a65e2c342a6c08bf0667734507820a84f5f835 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Wed, 9 Apr 2025 15:25:46 +0530 Subject: [PATCH 1/6] fix: Prevent mentions menu from triggering on reply mode change (#11264) # Pull Request Template ## Description **Issue:** When typing "@" in reply mode and then switching to private note mode, the user mentions menu remains visible and cannot be dismissed. **Cause:** The Prose Mirror suggestion plugin for "@" was active in both reply modes (normal and private). When triggered in normal reply mode and then switching to private note mode, the menu would remain open and couldn't be dismissed. **Solution** ``` createSuggestionPlugin({ trigger: '@', showMenu: showUserMentions, searchTerm: mentionSearchKey, isAllowed: () => props.isPrivate, // Only allow @ mentions in private note mode }), ``` 1. By setting `isAllowed: () => props.isPrivate`, the @ mention trigger will only activate when in private note mode 2. In normal reply mode, the plugin won't activate at all since `isAllowed` returns false 3. This prevents the menu from being triggered in the wrong context and fix the scenario where the menu gets stuck. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? ### Loom video **Before** https://www.loom.com/share/5333f0c6498d4a9ea4d220b1de1b608c?sid=1425f24f-2c6f-4ff5-aab3-23c3203d2e05 **After** https://www.loom.com/share/9f183c76d6a94b618a7c2aaed280b780?sid=19ef08b8-2b70-434b-ad5a-267410212e11 ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- .../dashboard/components/widgets/WootWriter/Editor.vue | 1 + .../dashboard/components/widgets/conversation/TagAgents.vue | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue index d9a0341b4..628c88ad3 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue @@ -220,6 +220,7 @@ const plugins = computed(() => { trigger: '@', showMenu: showUserMentions, searchTerm: mentionSearchKey, + isAllowed: () => props.isPrivate, }), createSuggestionPlugin({ trigger: '/', diff --git a/app/javascript/dashboard/components/widgets/conversation/TagAgents.vue b/app/javascript/dashboard/components/widgets/conversation/TagAgents.vue index 793275e3d..2e055cae6 100644 --- a/app/javascript/dashboard/components/widgets/conversation/TagAgents.vue +++ b/app/javascript/dashboard/components/widgets/conversation/TagAgents.vue @@ -69,10 +69,6 @@ const onAgentSelect = index => { v-if="items.length" ref="tagAgentsRef" class="vertical dropdown menu mention--box bg-n-solid-1 p-1 rounded-xl text-sm overflow-auto absolute w-full z-20 shadow-md left-0 leading-[1.2] bottom-full max-h-[12.5rem] border border-solid border-n-strong" - :class="{ - 'border-b-[0.5rem] border-solid border-white dark:!border-slate-700': - items.length <= 4, - }" >
  • Date: Wed, 9 Apr 2025 16:03:53 +0530 Subject: [PATCH 2/6] chore: Update date range picker with new theme colors (#11267) --- .../dashboard/assets/scss/_next-colors.scss | 26 ++++++++++++ .../components/ui/DatePicker/DatePicker.vue | 8 ++-- .../DatePicker/components/CalendarAction.vue | 40 +++++++++---------- .../components/CalendarDateInput.vue | 2 +- .../components/CalendarDateRange.vue | 8 ++-- .../DatePicker/components/CalendarFooter.vue | 25 +++++++----- .../DatePicker/components/CalendarMonth.vue | 6 ++- .../ui/DatePicker/components/CalendarWeek.vue | 13 +++--- .../ui/DatePicker/components/CalendarYear.vue | 6 +-- .../components/DatePickerButton.vue | 2 +- theme/colors.js | 15 +++++++ 11 files changed, 97 insertions(+), 54 deletions(-) diff --git a/app/javascript/dashboard/assets/scss/_next-colors.scss b/app/javascript/dashboard/assets/scss/_next-colors.scss index 48cfce921..f23c01d42 100644 --- a/app/javascript/dashboard/assets/scss/_next-colors.scss +++ b/app/javascript/dashboard/assets/scss/_next-colors.scss @@ -29,6 +29,19 @@ --iris-11: 87 83 198; --iris-12: 39 41 98; + --blue-1: 251 253 255; + --blue-2: 245 249 255; + --blue-3: 233 243 255; + --blue-4: 218 236 255; + --blue-5: 201 226 255; + --blue-6: 181 213 255; + --blue-7: 155 195 252; + --blue-8: 117 171 247; + --blue-9: 39 129 246; + --blue-10: 16 115 233; + --blue-11: 8 109 224; + --blue-12: 11 50 101; + --ruby-1: 255 252 253; --ruby-2: 255 247 248; --ruby-3: 254 234 237; @@ -131,6 +144,19 @@ --iris-11: 158 177 255; --iris-12: 224 223 254; + --blue-1: 10 17 28; + --blue-2: 15 24 38; + --blue-3: 15 39 72; + --blue-4: 10 49 99; + --blue-5: 18 61 117; + --blue-6: 29 84 134; + --blue-7: 40 89 156; + --blue-8: 48 106 186; + --blue-9: 39 129 246; + --blue-10: 21 116 231; + --blue-11: 126 182 255; + --blue-12: 205 227 255; + --ruby-1: 25 17 19; --ruby-2: 30 21 23; --ruby-3: 58 20 30; diff --git a/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue b/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue index ce9330076..bbb31d72c 100644 --- a/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue +++ b/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue @@ -218,14 +218,14 @@ const emitDateRange = () => { />
    @@ -251,12 +251,12 @@ const emitDateRange = () => { @validate="updateManualInput($event, calendar)" @error="handleManualInputError($event)" /> -
    +
    import { CALENDAR_PERIODS } from '../helpers/DatePickerHelper'; +import NextButton from 'dashboard/components-next/button/Button.vue'; + defineProps({ calendarType: { type: String, @@ -38,42 +40,38 @@ const onClickSetView = (type, mode) => { diff --git a/app/javascript/dashboard/components/ui/DatePicker/components/CalendarDateInput.vue b/app/javascript/dashboard/components/ui/DatePicker/components/CalendarDateInput.vue index b9fe88993..715bc8cb3 100644 --- a/app/javascript/dashboard/components/ui/DatePicker/components/CalendarDateInput.vue +++ b/app/javascript/dashboard/components/ui/DatePicker/components/CalendarDateInput.vue @@ -65,7 +65,7 @@ const validateDate = () => { {