refactor(components): dlt-3283 refactor prop/slots to be consistent#1196
refactor(components): dlt-3283 refactor prop/slots to be consistent#1196Ignacio Ropolo (iropolo) merged 4 commits intonextfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
WalkthroughStandardizes named slots across Dialtone Vue components: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/dialtone-vue/components/list_item_group/list_item_group.vue`:
- Around line 16-17: The ListItemGroup component introduced a renamed public
slot "heading" but tests for that API change are missing; add/update unit tests
for the ListItemGroup component to cover both behaviors: when a <slot
name="heading"> is provided it should render the slot content (assert the slot
output is present and replaces the prop) and when the slot is absent it should
fall back to the heading prop (assert heading prop text is rendered). Target the
component tests that mount ListItemGroup (referencing the component name
ListItemGroup, the slot identifier "heading" and the prop "heading") and include
assertions for both slot-rendering and fallback behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 41ce72b3-e9c9-4060-8d9b-5fa269af974c
📒 Files selected for processing (18)
packages/dialtone-vue/components/banner/banner.stories.jspackages/dialtone-vue/components/banner/banner.vuepackages/dialtone-vue/components/banner/banner_default.story.vuepackages/dialtone-vue/components/input/input.vuepackages/dialtone-vue/components/input/input_default.story.vuepackages/dialtone-vue/components/input/input_search_variant.story.vuepackages/dialtone-vue/components/list_item_group/list_item_group.vuepackages/dialtone-vue/components/list_item_group/list_item_group_default.story.vuepackages/dialtone-vue/components/notice/notice.stories.jspackages/dialtone-vue/components/notice/notice.vuepackages/dialtone-vue/components/notice/notice_content.test.jspackages/dialtone-vue/components/notice/notice_content.vuepackages/dialtone-vue/components/notice/notice_default.story.vuepackages/dialtone-vue/components/toast/layouts/toast_layout_alternate.vuepackages/dialtone-vue/components/toast/layouts/toast_layout_default.vuepackages/dialtone-vue/components/toast/toast.stories.jspackages/dialtone-vue/components/toast/toast.vuepackages/dialtone-vue/components/toast/toast_default.story.vue
| <!-- @slot Slot for heading, will override heading prop. Can also be used as a slot. --> | ||
| <slot name="heading"> |
There was a problem hiding this comment.
Add/confirm test coverage for the renamed heading slot API.
This is a public slot contract change, but no corresponding test updates are visible in the provided diff. Please add (or point to) coverage for #heading rendering and fallback behavior.
As per coding guidelines, "Flag missing tests for non-trivial logic changes — untested behavior is unverified behavior."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/dialtone-vue/components/list_item_group/list_item_group.vue` around
lines 16 - 17, The ListItemGroup component introduced a renamed public slot
"heading" but tests for that API change are missing; add/update unit tests for
the ListItemGroup component to cover both behaviors: when a <slot
name="heading"> is provided it should render the slot content (assert the slot
output is present and replaces the prop) and when the slot is absent it should
fall back to the heading prop (assert heading prop text is rendered). Target the
component tests that mount ListItemGroup (referencing the component name
ListItemGroup, the slot identifier "heading" and the prop "heading") and include
assertions for both slot-rendering and fallback behavior.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/dialtone-vue/components/list_item_group/list_item_group.vue (1)
16-17:⚠️ Potential issue | 🟠 MajorConfirm test coverage for the new
#headingslot API.This is a public slot contract change, but test updates aren’t visible in the provided diff. Please add or point to tests covering both: (1)
#headingslot content rendering and (2) fallback toheadingprop when slot is absent.As per coding guidelines, "Flag missing tests for non-trivial logic changes — untested behavior is unverified behavior."
Also applies to: 45-45
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/dialtone-vue/components/list_item_group/list_item_group.vue` around lines 16 - 17, Add unit tests for the ListItemGroup component to cover the new public slot contract: create one test that mounts ListItemGroup with a named slot "heading" and asserts the slot content is rendered in the heading area (use the component name ListItemGroup / list_item_group.vue and the slot name "heading"), and a second test that mounts without the "heading" slot but with the heading prop set and asserts the prop value is rendered as the fallback heading; ensure both tests check DOM text presence and that slot content overrides the prop when provided.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@packages/dialtone-vue/components/list_item_group/list_item_group.vue`:
- Around line 16-17: Add unit tests for the ListItemGroup component to cover the
new public slot contract: create one test that mounts ListItemGroup with a named
slot "heading" and asserts the slot content is rendered in the heading area (use
the component name ListItemGroup / list_item_group.vue and the slot name
"heading"), and a second test that mounts without the "heading" slot but with
the heading prop set and asserts the prop value is rendered as the fallback
heading; ensure both tests check DOM text presence and that slot content
overrides the prop when provided.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 3c4e646f-25e2-4262-ad98-1c6e9611ffd3
📒 Files selected for processing (12)
packages/dialtone-vue/components/banner/banner_default.story.vuepackages/dialtone-vue/components/input/input.vuepackages/dialtone-vue/components/input/input_default.story.vuepackages/dialtone-vue/components/input/input_search_variant.story.vuepackages/dialtone-vue/components/list_item_group/list_item_group.vuepackages/dialtone-vue/components/list_item_group/list_item_group_default.story.vuepackages/dialtone-vue/components/notice/notice_content.vuepackages/dialtone-vue/components/notice/notice_default.story.vuepackages/dialtone-vue/components/select_menu/select_menu.stories.jspackages/dialtone-vue/components/select_menu/select_menu.vuepackages/dialtone-vue/components/select_menu/select_menu_default.story.vuepackages/dialtone-vue/components/toast/toast_default.story.vue
💤 Files with no reviewable changes (8)
- packages/dialtone-vue/components/input/input_search_variant.story.vue
- packages/dialtone-vue/components/select_menu/select_menu.stories.js
- packages/dialtone-vue/components/select_menu/select_menu_default.story.vue
- packages/dialtone-vue/components/banner/banner_default.story.vue
- packages/dialtone-vue/components/list_item_group/list_item_group_default.story.vue
- packages/dialtone-vue/components/input/input_default.story.vue
- packages/dialtone-vue/components/toast/toast_default.story.vue
- packages/dialtone-vue/components/notice/notice_default.story.vue
✅ Files skipped from review due to trivial changes (2)
- packages/dialtone-vue/components/input/input.vue
- packages/dialtone-vue/components/select_menu/select_menu.vue
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/dialtone-vue/components/notice/notice_content.vue
|
Please add either the |
|
✔️ Deploy previews ready! |
|
Updated breaking changes in PR descirption! |
Brad Paugh (braddialpad)
left a comment
There was a problem hiding this comment.
Thanks!
# [1.2.0-next.5](combinator/v1.2.0-next.4...combinator/v1.2.0-next.5) (2026-04-15) ### Code Refactoring * **Components:** dlt-3283 refactor prop/slots to be consistent ([#1196](#1196)) ([2d22c76](2d22c76)) ### Features * **Components:** DLT-3159 enforce positive boolean props ([#1198](#1198)) ([ac73bdc](ac73bdc))
# [3.220.0-next.1](dialtone-vue/v3.219.0...dialtone-vue/v3.220.0-next.1) (2026-04-15) ### Bug Fixes * **Editor:** NO-JIRA remove extra blank line in editor.mdx ([18c47ef](18c47ef)) * **Split Button, Filter Pill:** DLT-3260 DLT-3261 correct misalignment at size 100 ([#1176](#1176)) ([fe2b777](fe2b777)) * **Tabs:** DLT-3251 improve accessibility ([#1171](#1171)) ([01b101e](01b101e)) ### Code Refactoring * **Combobox Multi Select:** NO-JIRA use logical css properties ([#1104](#1104)) ([a675daf](a675daf)) * **Components,recipes:** DLT-3043 DLT-3046 logical start/end naming with deprecated backward-compatible fallbacks ([#1079](#1079)) ([1d26a4e](1d26a4e)) * **Components:** DLT-3100 remove rootClass references ([#1184](#1184)) ([6531783](6531783)) * **Components:** dlt-3282 renamed show prop to open ([#1190](#1190)) ([5509d0f](5509d0f)) * **Components:** dlt-3283 refactor prop/slots to be consistent ([#1196](#1196)) ([2d22c76](2d22c76)) * **Modal:** DLT-3262 migrate DtModal to native dialog element ([#1179](#1179)) ([589edb5](589edb5)) * **Text:** DLT-3302 tone prop uses css variables instead of css utilities ([#1197](#1197)) ([75df16f](75df16f)) * **Tokens,css,link,text,breadcrumbs,input Group,split Button:** tokens, CSS foundation, deprecations, tooling DLT-3011 DLT-2961 DLT-3068 DLT-3069 DLT-3070 DLT-3071 DLT-3072 ([#1092](#1092)) ([7783090](7783090)) * **Tokens:** DLT-3013 convert color system from HSL to OKLCH ([#1060](#1060)) ([42dc418](42dc418)) ### Documentation * **Dialtone Vue:** DLT-3226 update documentation and consuming code to numeric size scale ([#1158](#1158)) ([149c763](149c763)) * **Playground:** DLT-3119 refine playground UI and integrate across doc site ([#1127](#1127)) ([ba6b599](ba6b599)) ### Features * **Avatar:** DLT-2942 updated avatar component ([#1047](#1047)) ([e50563d](e50563d)) * **Avatar:** DLT-3161 change from clickable to "interactive" ([#1182](#1182)) ([2d00fe0](2d00fe0)) * **Banner, Notice, Toast, Breadcrumbs, Checkbox, Radio, Input, Select Menu, Empty State:** visual refresh, dt-text integration, form api parity DLT-2944 DLT-2945 DLT-2949 DLT-2959 DLT-2960 DLT-2957 ([#1091](#1091)) ([16e908a](16e908a)) * **Button,tabs,split Button:** visual refresh and slot updates DLT-2946 DLT-2947 DLT-2965 ([#1090](#1090)) ([ffdd56f](ffdd56f)) * **Components:** DLT-3157 align critical/positive prop values and CSS class names ([#1177](#1177)) ([edd98b2](edd98b2)) * **Components:** DLT-3159 enforce positive boolean props ([#1198](#1198)) ([ac73bdc](ac73bdc)) * **Dialtone Css, Dialtone Tokens, Dialtone Vue:** DLT-3197 DLT-3198 DLT-3199 DLT-3200 DLT-3201 DLT-3202 DLT-3203 DLT-3204 DLT-3205 DLT-3206 DLT-3207 DLT-3208 DLT-3209 DLT-3210 DLT-3211 token-stop utility classes, migration tooling, and documentation ([#1150](#1150)) ([6237b84](6237b84)) * **Dialtone Vue:** DLT-3225 migrate component size props to numeric ordinal scale ([#1157](#1157)) ([725bd41](725bd41)) * **Filter Pill:** DLT-2941 DtFilterPill improvements ([#1110](#1110)) ([23c5689](23c5689)) * **Focusgroup:** DLT-3285 add v-dt-focusgroup directive for declarative roving tabindex ([#1187](#1187)) ([e1ea074](e1ea074)) * **Focustrap:** DLT-3297 add v-dt-focustrap directive for declarative focus trapping ([#1195](#1195)) ([6ef9a21](6ef9a21)) * **Link,button:** DLT-3012 add underline prop ([#1059](#1059)) ([1cb91ea](1cb91ea)) * **Mode Directive, Mode Island:** DLT-3067 DLT-3078 DLT-3077 add `v-dt-mode` directive ([#1109](#1109)) ([f97efca](f97efca)) * **Segmented Control:** DLT-413 new component ([#1144](#1144)) ([ad4c6c3](ad4c6c3)) * **Split Button:** DLT-3257 add show-divider prop ([#1173](#1173)) ([5bef411](5bef411)) * **Tabs:** DLT-3114 add vertical orientation variant ([#1120](#1120)) ([3290a23](3290a23)) * **Tabs:** DLT-3162 add spread prop for horizontal distribution ([#1135](#1135)) ([6e7cd04](6e7cd04)) * **Text:** export text component from dialtone-vue ([757fdb7](757fdb7)) * **Tokens:** DLT-2937 introduce spacing and layout token systems ([#1045](#1045)) ([de23e12](de23e12)) * **Tokens:** update color ramps and consumer color migration tools DLT-3004 DLT-3005 DLT-3006 DLT-3007 DLT-3008 ([#1054](#1054)) ([28cb1de](28cb1de))
# [9.180.0-next.1](dialtone/v9.179.0...dialtone/v9.180.0-next.1) (2026-04-15) ### Bug Fixes * **Doc:** NO-JIRA correct font size utility json ([#1015](#1015)) ([76cf0fa](76cf0fa)) * **Editor:** NO-JIRA remove extra blank line in editor.mdx ([18c47ef](18c47ef)) * possible merge issue in sidebarItem.vue ([5e2e91b](5e2e91b)) * **Split Button, Filter Pill:** DLT-3260 DLT-3261 correct misalignment at size 100 ([#1176](#1176)) ([fe2b777](fe2b777)) * **Stylelint:** disable hue-degree-notation rule and update OKLCH color syntax ([81f886e](81f886e)) * **Stylelint:** disable hue-degree-notation rule and update OKLCH color syntax ([8721f43](8721f43)) * **Tabs:** DLT-3251 improve accessibility ([#1171](#1171)) ([01b101e](01b101e)) * **Tokens:** DLT-3053 preserve root font size variable as reference ([#1093](#1093)) ([112ab4b](112ab4b)) * **Tokens:** handle multi-layer box shadows correctly in postcss plugin ([feea7f1](feea7f1)) * **Tokens:** NO-JIRA output line-height as unitless instead of percentages ([#1040](#1040)) ([33d8505](33d8505)) * **Tokens:** wrap css math expressions with calc() in layered build ([#966](#966)) ([1635f61](1635f61)) * update @dialpad/i18n dependencies to latest versions ([7a4b777](7a4b777)) ### Code Refactoring * **Combobox Multi Select:** NO-JIRA use logical css properties ([#1104](#1104)) ([a675daf](a675daf)) * **Components,recipes:** DLT-3043 DLT-3046 logical start/end naming with deprecated backward-compatible fallbacks ([#1079](#1079)) ([1d26a4e](1d26a4e)) * **Components:** DLT-3100 remove rootClass references ([#1184](#1184)) ([6531783](6531783)) * **Components:** dlt-3282 renamed show prop to open ([#1190](#1190)) ([5509d0f](5509d0f)) * **Components:** dlt-3283 refactor prop/slots to be consistent ([#1196](#1196)) ([2d22c76](2d22c76)) * **Css:** DLT-1876 css logical properties ([#872](#872)) ([1acd6c9](1acd6c9)) * **Modal:** DLT-3262 migrate DtModal to native dialog element ([#1179](#1179)) ([589edb5](589edb5)) * **Notice,banner,toast:** DLT-3296 decouple CSS and fix specificity violations ([#1194](#1194)) ([9579ac0](9579ac0)) * **Style:** DLT-3014 wrap all styles in css cascade layers ([#1061](#1061)) ([f8b3fed](f8b3fed)) * **Text:** DLT-2883 rename headline sizes from xxl => 2xl, etc ([#1029](#1029)) ([0ac86f3](0ac86f3)) * **Text:** DLT-3302 tone prop uses css variables instead of css utilities ([#1197](#1197)) ([75df16f](75df16f)) * **Tokens,css,link,text,breadcrumbs,input Group,split Button:** tokens, CSS foundation, deprecations, tooling DLT-3011 DLT-2961 DLT-3068 DLT-3069 DLT-3070 DLT-3071 DLT-3072 ([#1092](#1092)) ([7783090](7783090)) * **Tokens:** DLT-2884 deprecate space tokens in favor of size tokens ([#1013](#1013)) ([63f6d2f](63f6d2f)) * **Tokens:** DLT-3013 convert color system from HSL to OKLCH ([#1060](#1060)) ([42dc418](42dc418)) ### Documentation * **Components:** DLT-3178 DLT-3182 unify code examples into single code-example component ([#1147](#1147)) ([d0b6e14](d0b6e14)) * **Css Utilities:** DLT-3295 DLT-3280 mark physical utilities as deprecated ([#1193](#1193)) ([73f1479](73f1479)) * **Dialtone Vue:** DLT-3226 update documentation and consuming code to numeric size scale ([#1158](#1158)) ([149c763](149c763)) * DLT-1510 DLT-1511 DLT-1512 site redesign and ia ([#968](#968)) ([6ea7eb9](6ea7eb9)) * DLT-2908 ui kits landing page ([#1049](#1049)) ([d805b9d](d805b9d)) * DLT-3243 fenced code blocks for examples and snippets ([#1166](#1166)) ([cb169df](cb169df)) * DLT-3250 display component status badges in sidebar and page headers ([#1170](#1170)) ([7d5f5d5](7d5f5d5)) * DLT-3252 add GFM alert syntax for notices ([#1172](#1172)) ([1697911](1697911)) * DLT-3258 DLT-3259 improve sidebar search with logical keywords and fuzzy matching ([#1174](#1174)) ([2bf4639](2bf4639)) * NO-JIRA fix focus left-nav items on keypress down up ([#1106](#1106)) ([882c9b9](882c9b9)) * **Playground:** DLT-3119 refine playground UI and integrate across doc site ([#1127](#1127)) ([ba6b599](ba6b599)) * **Playground:** DLT-3242 segmented control for compact enum props ([#1165](#1165)) ([fa440d8](fa440d8)) * **Utilities:** DLT-3183 convert to vue demo fenced block ([#1167](#1167)) ([522197f](522197f)) ### Features * **Avatar:** DLT-2942 updated avatar component ([#1047](#1047)) ([e50563d](e50563d)) * **Avatar:** DLT-3161 change from clickable to "interactive" ([#1182](#1182)) ([2d00fe0](2d00fe0)) * **Banner, Notice, Toast, Breadcrumbs, Checkbox, Radio, Input, Select Menu, Empty State:** visual refresh, dt-text integration, form api parity DLT-2944 DLT-2945 DLT-2949 DLT-2959 DLT-2960 DLT-2957 ([#1091](#1091)) ([16e908a](16e908a)) * **Button,tabs,split Button:** visual refresh and slot updates DLT-2946 DLT-2947 DLT-2965 ([#1090](#1090)) ([ffdd56f](ffdd56f)) * **Components:** DLT-3157 align critical/positive prop values and CSS class names ([#1177](#1177)) ([edd98b2](edd98b2)) * **Components:** DLT-3159 enforce positive boolean props ([#1198](#1198)) ([ac73bdc](ac73bdc)) * **Css Utility:** DLT-2715 add default color for border css utilities ([#874](#874)) ([71310ab](71310ab)) * **Dialtone Css, Dialtone Tokens, Dialtone Vue:** DLT-3197 DLT-3198 DLT-3199 DLT-3200 DLT-3201 DLT-3202 DLT-3203 DLT-3204 DLT-3205 DLT-3206 DLT-3207 DLT-3208 DLT-3209 DLT-3210 DLT-3211 token-stop utility classes, migration tooling, and documentation ([#1150](#1150)) ([6237b84](6237b84)) * **Dialtone Vue:** DLT-3225 migrate component size props to numeric ordinal scale ([#1157](#1157)) ([725bd41](725bd41)) * **Eslint Plugin Dialtone:** DLT-3047 physical-to-logical naming migration tooling ([#1163](#1163)) ([d94dc4b](d94dc4b)) * **Eslint Plugin Dialtone:** DLT-3227 DLT-3228 add deprecated-tshirt-sizes ESLint rule and migration codemod ([#1159](#1159)) ([21a011f](21a011f)) * **Filter Pill:** DLT-2704 create component ([#473](#473)) ([6267445](6267445)) * **Filter Pill:** DLT-2941 DtFilterPill improvements ([#1110](#1110)) ([23c5689](23c5689)) * **Focusgroup:** DLT-3285 add v-dt-focusgroup directive for declarative roving tabindex ([#1187](#1187)) ([e1ea074](e1ea074)) * **Focustrap:** DLT-3297 add v-dt-focustrap directive for declarative focus trapping ([#1195](#1195)) ([6ef9a21](6ef9a21)) * **Link,button:** DLT-3012 add underline prop ([#1059](#1059)) ([1cb91ea](1cb91ea)) * **Mode Directive, Mode Island:** DLT-3067 DLT-3078 DLT-3077 add `v-dt-mode` directive ([#1109](#1109)) ([f97efca](f97efca)) * **Segmented Control:** DLT-413 new component ([#1144](#1144)) ([ad4c6c3](ad4c6c3)) * **Split Button:** DLT-3257 add show-divider prop ([#1173](#1173)) ([5bef411](5bef411)) * **Style:** DLT-2976 update underline thickness and offset ([#1058](#1058)) ([1e56947](1e56947)) * **Tabs:** DLT-3114 add vertical orientation variant ([#1120](#1120)) ([3290a23](3290a23)) * **Tabs:** DLT-3162 add spread prop for horizontal distribution ([#1135](#1135)) ([6e7cd04](6e7cd04)) * **Text:** export text component from dialtone-vue ([757fdb7](757fdb7)) * **Text:** new vue component DLT-2864 DLT-2863 DLT-2862 ([#995](#995)) ([196ef8a](196ef8a)) * **Tokens:** DLT-1977 add high contrast design tokens and theme ([#938](#938)) ([a1c0457](a1c0457)) * **Tokens:** DLT-2767 exploratory shell themes ([#909](#909)) ([3afcf63](3afcf63)) * **Tokens:** DLT-2781 create color-assistive themes ([#921](#921)) ([a6cc397](a6cc397)) * **Tokens:** DLT-2802 DLT-2563 layered theming system and mode island component ([#945](#945)) ([5c72c6c](5c72c6c)) * **Tokens:** DLT-2937 introduce spacing and layout token systems ([#1045](#1045)) ([de23e12](de23e12)) * **Tokens:** update color ramps and consumer color migration tools DLT-3004 DLT-3005 DLT-3006 DLT-3007 DLT-3008 ([#1054](#1054)) ([28cb1de](28cb1de)) * **Typography, Tokens:** DLT-2856 DLT-2857 next typography system ([#994](#994)) ([d744e97](d744e97))
Refactor prop/slots to be consistent
🛠️ Type Of Change
These types will increment the version number on release:
📖 Jira Ticket
https://dialpad.atlassian.net/browse/DLT-3283
📖 Description
We are refactoring some props/slots names that we had for accomodate storybook. This should not be it anymore and we should appropiate fix it.
Renamed Vue slots for consistency: titleOverride→title, labelSlot→label, headingSlot→heading across Banner, Notice, Toast, Input, ListItemGroup, their stories, and Storybook argTypes. JSDoc, tests, and combinator controls updated. Run a search/replace for #titleOverride→#title, #labelSlot→#label, #headingSlot→#heading.
Breaking Changes
These are slot name renames — any consumer passing content via the old slot names will need to update:
Affects: DtBanner, DtNotice, DtToast
Affects: DtInput, DtcControlSlot, DtcControlString, DtcControlNumber
Affects: DtListItemGroup
Affects: DtSelectMenu
Migration effort
Packages affected