From ef51083b3c21e100acde93e8697527fa02486607 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Thu, 21 Nov 2024 13:34:42 +0530 Subject: [PATCH 1/6] chore: Minor fix --- .../ContactsCard/ContactsCard.story.vue | 216 ------------------ .../ContactsForm/ContactsForm.story.vue | 101 -------- .../CustomAttributes/CheckboxAttribute.vue | 22 +- .../CustomAttributes/DateAttribute.vue | 1 - .../CustomAttributes/ListAttribute.vue | 1 - .../CustomAttributes/OtherAttribute.vue | 2 +- .../{ => story}/CustomAttributes.story.vue | 55 +---- .../CustomAttributes/story/fixtures.js | 39 ++++ .../components-next/switch/Switch.story.vue | 56 +++++ .../components-next/switch/Switch.vue | 38 +++ .../dashboard/i18n/locale/en/components.json | 3 + 11 files changed, 155 insertions(+), 379 deletions(-) delete mode 100644 app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.story.vue delete mode 100644 app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactsForm.story.vue rename app/javascript/dashboard/components-next/CustomAttributes/{ => story}/CustomAttributes.story.vue (64%) create mode 100644 app/javascript/dashboard/components-next/CustomAttributes/story/fixtures.js create mode 100644 app/javascript/dashboard/components-next/switch/Switch.story.vue create mode 100644 app/javascript/dashboard/components-next/switch/Switch.vue diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.story.vue b/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.story.vue deleted file mode 100644 index 8b06bf4e1..000000000 --- a/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.story.vue +++ /dev/null @@ -1,216 +0,0 @@ - - - diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactsForm.story.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactsForm.story.vue deleted file mode 100644 index 35d36837f..000000000 --- a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactsForm.story.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - diff --git a/app/javascript/dashboard/components-next/CustomAttributes/CheckboxAttribute.vue b/app/javascript/dashboard/components-next/CustomAttributes/CheckboxAttribute.vue index 896c1741d..d5ecc3aab 100644 --- a/app/javascript/dashboard/components-next/CustomAttributes/CheckboxAttribute.vue +++ b/app/javascript/dashboard/components-next/CustomAttributes/CheckboxAttribute.vue @@ -1,8 +1,10 @@ - @@ -28,13 +32,7 @@ const handleChange = event => { 'justify-end': !isEditingView, }" > - - + Date: Thu, 21 Nov 2024 16:25:13 +0530 Subject: [PATCH 6/6] fix: Component `` reactivity issue. (#10476) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Pull Request Template ## Description This PR will fix reactivity issue with `` component. **Cause of issue** The `` component used an internal ref, `internalActiveIndex` to track the `active` tab. However, it didn’t sync with the `index` prop when updated by the parent, causing mismatched tab selections. **Solution** The component now directly uses `props.index` to ensure it always reflects the latest value from the parent. The unnecessary `internalActiveIndex` ref has been removed. Changes to the active tab emit a `change` event to update the parent. ## 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/76eb32f1e7f7422f84055a102bf80951?sid=bc28c6ff-9640-4d3b-956c-99c1ec164971 **After** https://www.loom.com/share/6bd8125ede5d43dc8fe115c3f1fb159b?sid=c376617a-94fb-4f71-8664-e0bd9e7af0b4 ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] 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 --- app/javascript/dashboard/components/ui/Tabs/Tabs.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/javascript/dashboard/components/ui/Tabs/Tabs.vue b/app/javascript/dashboard/components/ui/Tabs/Tabs.vue index 682957204..3a7344fb4 100644 --- a/app/javascript/dashboard/components/ui/Tabs/Tabs.vue +++ b/app/javascript/dashboard/components/ui/Tabs/Tabs.vue @@ -1,5 +1,4 @@