Skip to content

refactor(components): DLT-3284 refactor props to not have native html attributes names#1204

Open
Ignacio Ropolo (iropolo) wants to merge 3 commits intonextfrom
dlt-3284
Open

refactor(components): DLT-3284 refactor props to not have native html attributes names#1204
Ignacio Ropolo (iropolo) wants to merge 3 commits intonextfrom
dlt-3284

Conversation

@iropolo
Copy link
Copy Markdown
Contributor

@iropolo Ignacio Ropolo (iropolo) commented Apr 16, 2026

Refactor props to not have native html attributes names

🛠️ Type Of Change

  • Refactor

📖 Jira Ticket

https://dialpad.atlassian.net/browse/DLT-3284

📖 Description

Components Updated

  • notice_content.vue, notice.vue, banner.vue — titleheaderText, title slot → header, titleIdheaderId
  • toast.vue, toast_layout_default.vue, toast_layout_alternate.vue — same renames
  • modal.vue — titleheaderText, bannerTitlebannerHeaderText
  • callbox.vue — titleheaderText

Updated usages in combinator too.


Breaking Changes Summary

Renamed Props

Component Old Prop New Prop
DtNoticeContent title headerText
DtNoticeContent titleId headerId
DtNotice title headerText
DtNotice titleId headerId
DtBanner title headerText
DtBanner titleId headerId
DtToast title headerText
DtToast titleId headerId
DtModal title headerText
DtModal bannerTitle bannerHeaderText
DtRecipeCallbox title headerText

Renamed Slots

Component Old Slot New Slot
DtNoticeContent title header
DtNotice title header
DtBanner title header
DtToast title header
Toast layouts (default & alternate) title header

Migration Required
Any consumer of these components that passes title, titleId, or bannerTitle as props, or uses a #title slot, will need to update to the new names. Specifically:

  • :title="..." → :header-text="..."
  • :title-id="..." → :header-id="..."
  • :banner-title="..." → :banner-header-text="..."
  • <template #title> → <template #header>

Not Affected

  • DtModal's #header slot — already named header, unchanged
  • DtModal's #footer slot — unchanged
  • Native HTML title attribute usage on close buttons — unchanged
  • CSS classes (d-notice__title, d-modal__header, etc.) — unchanged
  • data-qa attributes (dt-modal-title, notice-content-title, etc.) — unchanged
  • DtEmptyState — already used headerText, no change needed

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 16, 2026

Refactors prop and slot names across multiple components (DtNotice, DtBanner, DtToast, DtModal, DtRecipeCallbox) to avoid HTML attribute name collisions: titleheaderText, titleIdheaderId, bannerTitlebannerHeaderText, and slot #title#header. Updates are consistent across component definitions, tests, stories, and variants.

Overall Judgement: ✅ Ready to merge — The refactoring is comprehensive and consistently applied across all affected components, their tests, and documentation.

Walkthrough

Renamed header-related public APIs and slots across the codebase: titleheaderText, titleIdheaderId, and slot #title#header in components, stories, tests, combinator variants, and a renderer error call (DtNotice prop name updated).

Changes

Cohort / File(s) Summary
Banner Component
packages/dialtone-vue/components/banner/banner.vue, packages/dialtone-vue/components/banner/banner.stories.js, packages/dialtone-vue/components/banner/banner_default.story.vue
Renamed titleIdheaderId, titleheaderText; swapped #title slot for #header; updated Storybook controls and story args.
Modal Component
packages/dialtone-vue/components/modal/modal.vue, packages/dialtone-vue/components/modal/modal.stories.js, packages/dialtone-vue/components/modal/modal_default.story.vue, packages/dialtone-vue/components/modal/modal.test.js
Renamed titleheaderText, bannerTitlebannerHeaderText; updated template bindings, story args/controls, and tests.
Notice Component & Content
packages/dialtone-vue/components/notice/notice.vue, packages/dialtone-vue/components/notice/notice_content.vue, packages/dialtone-vue/components/notice/notice.stories.js, packages/dialtone-vue/components/notice/notice.test.js, packages/dialtone-vue/components/notice/notice_content.test.js, packages/dialtone-vue/components/notice/notice_default.story.vue
Renamed titleIdheaderId, titleheaderText; replaced #title slot with #header; updated stories, tests, selectors, and template logic.
Toast Component & Layouts
packages/dialtone-vue/components/toast/toast.vue, packages/dialtone-vue/components/toast/layouts/toast_layout_default.vue, packages/dialtone-vue/components/toast/layouts/toast_layout_alternate.vue, packages/dialtone-vue/components/toast/toast.stories.js, packages/dialtone-vue/components/toast/toast.test.js, packages/dialtone-vue/components/toast/toast_default.story.vue
Renamed titleIdheaderId, titleheaderText; replaced #title slot with #header; updated story argTypes and tests to assert headerId/headerText.
Callbox Recipe
packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue, packages/dialtone-vue/recipes/leftbar/callbox/callbox.stories.js, packages/dialtone-vue/recipes/leftbar/callbox/callbox.test.js, packages/dialtone-vue/recipes/leftbar/callbox/callbox_default.story.vue, packages/dialtone-vue/recipes/leftbar/callbox/callbox_variants.story.vue
Renamed prop titleheaderText; updated tooltip binding, rendered text, story args, templates, and tests.
Combinator Variants & Renderer
packages/combinator/src/components/renderer/renderer_target.vue, packages/combinator/src/variants/variants_banner.js, packages/combinator/src/variants/variants_modal.js, packages/combinator/src/variants/variants_notice.js, packages/combinator/src/variants/variants_toast.js
Replaced title prop key with headerText in renderer error DtNotice call and in exported variant configs; minor whitespace/ESLint comment tweaks.
Stories & Tests (misc)
packages/dialtone-vue/**/*.stories.js, packages/dialtone-vue/**/*.test.js
Multiple Storybook fixtures, args, and test fixtures updated to use headerText/headerId in place of title/titleId to align with component API changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Suggested labels

no-visual-test

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dlt-3284

Comment @coderabbitai help to get the list of available commands and usage tips.

@iropolo Ignacio Ropolo (iropolo) changed the title refactor(components): DLT-3284 refactor props to not have native html… refactor(components): DLT-3284 refactor props to not have native html attributes names Apr 16, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (2)
packages/dialtone-vue/components/notice/notice.stories.js (1)

17-17: Add headerText to argTypesData to keep Storybook docs/controls in sync.

Lines 17 and 135–195 move stories to headerText, but argTypesData does not define a headerText control entry in this file.

Suggested patch
 export const argTypesData = {
+  headerText: {
+    control: {
+      type: 'text',
+    },
+  },
   // Slots
   icon: {

As per coding guidelines, “Each component must have argTypes for all public props.”

Also applies to: 135-195

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dialtone-vue/components/notice/notice.stories.js` at line 17, Add a
headerText entry to the argTypesData object so Storybook docs/controls include
the new headerText prop used by the stories; locate the argTypesData definition
in this file and add a control/description/type for headerText (matching how
other props are defined in argTypesData) so the stories moved to headerText
(lines around 17 and 135–195) have a corresponding argType for the public prop
headerText.
packages/dialtone-vue/components/toast/toast.stories.js (1)

48-48: headerText is used in story args but missing from argTypesData.

Lines 144–205 switched to headerText, but only headerId was updated in argTypes (Line 48). Please add an explicit headerText argType so controls/docs stay complete.

Suggested patch
 export const argTypesData = {
   // Slots
@@
   // Props
+  headerText: {
+    control: {
+      type: 'text',
+    },
+  },
   headerId: {

As per coding guidelines, “Each component must have argTypes for all public props.”

Also applies to: 144-205

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dialtone-vue/components/toast/toast.stories.js` at line 48, The
story is missing an argType for headerText (you updated story args to use
headerText in the 144–205 block but only left headerId in the argTypesData), so
add an explicit argTypes entry named headerText alongside headerId in the
argTypesData object for the toast component story; define it as a string control
with a clear description (e.g., "Header text content" or similar) and any
defaultValue/docs needed so the controls and docs reflect the public prop
headerText.
🤖 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/banner/banner.stories.js`:
- Around line 132-136: The story's public prop headerText is present in args but
missing from argTypesData, so add an argTypes entry for headerText in the
component's argTypesData (the same object that defines controls for other props)
— include a control type (e.g., 'text'), a short description, and the
appropriate table/type metadata so Storybook prop-controls stay complete and in
sync with args; update the argTypesData object near the existing arg definitions
(referencing headerText, argTypesData, and args) to include this information.

In `@packages/dialtone-vue/components/banner/banner.vue`:
- Around line 24-31: This PR renames public props/slot on the Banner component
(title → headerText, titleId → headerId, slot `#title` → `#header`) and must include
a BREAKING CHANGE footer with a clear migration map; add a single-line "BREAKING
CHANGE: ..." footer to the commit/PR description and update the
changelog/release notes with an explicit mapping (title → headerText, titleId →
headerId, `#title` → `#header`) and guidance for consumers to rename usages
accordingly so this won't ship as a silent patch.

In `@packages/dialtone-vue/components/modal/modal.stories.js`:
- Line 20: argTypesData in modal.stories.js is missing entries for the renamed
props headerText and bannerHeaderText so Storybook controls/docs won't show
them; update the argTypesData object to add prop definitions for headerText and
bannerHeaderText (with appropriate control types, descriptions, and defaultValue
entries) alongside the existing modal prop argTypes so Storybook exposes the new
public API; locate the argTypesData constant in this file and add entries for
the two props mirroring the style/fields used for the other props.

In `@packages/dialtone-vue/components/modal/modal.vue`:
- Around line 204-217: This change renames public props and must be documented
as a breaking change: add a BREAKING CHANGE footer to the commit/PR description
stating the old and new prop names (e.g. BREAKING CHANGE: prop `title` renamed
to `headerText`; prop `bannerTitle` renamed to `bannerHeaderText`) so consumers
are warned; reference the modal component props (headerText, bannerHeaderText)
in the message and include migration guidance (old → new) before merging.

In `@packages/dialtone-vue/components/toast/toast_default.story.vue`:
- Around line 12-14: This change renames Toast props titleText/titleId to
headerText/headerId and is a breaking API change; update the commit message by
adding a "BREAKING CHANGE:" footer that explains the prop rename (old prop names
titleText, titleId -> new headerText, headerId) so the release tooling will bump
major version and inform consumers; ensure the footer clearly states the
affected component (toast_default.story.vue / Toast) and the exact props that
were renamed.

In `@packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue`:
- Around line 170-173: The prop rename in callbox.vue from title to headerText
is a breaking API change; update the commit metadata to include a BREAKING
CHANGE footer (or move this change into a breaking-release branch) and document
the change in the changelog/release notes referencing the component and prop
names (Callbox component: title -> headerText) so consumers are notified; ensure
the commit message includes a precise BREAKING CHANGE description mentioning the
old prop name `title`, the new `headerText`, and any migration guidance.

---

Nitpick comments:
In `@packages/dialtone-vue/components/notice/notice.stories.js`:
- Line 17: Add a headerText entry to the argTypesData object so Storybook
docs/controls include the new headerText prop used by the stories; locate the
argTypesData definition in this file and add a control/description/type for
headerText (matching how other props are defined in argTypesData) so the stories
moved to headerText (lines around 17 and 135–195) have a corresponding argType
for the public prop headerText.

In `@packages/dialtone-vue/components/toast/toast.stories.js`:
- Line 48: The story is missing an argType for headerText (you updated story
args to use headerText in the 144–205 block but only left headerId in the
argTypesData), so add an explicit argTypes entry named headerText alongside
headerId in the argTypesData object for the toast component story; define it as
a string control with a clear description (e.g., "Header text content" or
similar) and any defaultValue/docs needed so the controls and docs reflect the
public prop headerText.
🪄 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: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 95f8f16a-defb-4de4-ae9f-c07c615dfb76

📥 Commits

Reviewing files that changed from the base of the PR and between 265e34c and b56daa3.

📒 Files selected for processing (29)
  • packages/combinator/src/components/renderer/renderer_target.vue
  • packages/combinator/src/variants/variants_banner.js
  • packages/combinator/src/variants/variants_modal.js
  • packages/combinator/src/variants/variants_notice.js
  • packages/combinator/src/variants/variants_toast.js
  • packages/dialtone-vue/components/banner/banner.stories.js
  • packages/dialtone-vue/components/banner/banner.vue
  • packages/dialtone-vue/components/banner/banner_default.story.vue
  • packages/dialtone-vue/components/modal/modal.stories.js
  • packages/dialtone-vue/components/modal/modal.test.js
  • packages/dialtone-vue/components/modal/modal.vue
  • packages/dialtone-vue/components/modal/modal_default.story.vue
  • packages/dialtone-vue/components/notice/notice.stories.js
  • packages/dialtone-vue/components/notice/notice.test.js
  • packages/dialtone-vue/components/notice/notice.vue
  • packages/dialtone-vue/components/notice/notice_content.test.js
  • packages/dialtone-vue/components/notice/notice_content.vue
  • packages/dialtone-vue/components/notice/notice_default.story.vue
  • packages/dialtone-vue/components/toast/layouts/toast_layout_alternate.vue
  • packages/dialtone-vue/components/toast/layouts/toast_layout_default.vue
  • packages/dialtone-vue/components/toast/toast.stories.js
  • packages/dialtone-vue/components/toast/toast.test.js
  • packages/dialtone-vue/components/toast/toast.vue
  • packages/dialtone-vue/components/toast/toast_default.story.vue
  • packages/dialtone-vue/recipes/leftbar/callbox/callbox.stories.js
  • packages/dialtone-vue/recipes/leftbar/callbox/callbox.test.js
  • packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue
  • packages/dialtone-vue/recipes/leftbar/callbox/callbox_default.story.vue
  • packages/dialtone-vue/recipes/leftbar/callbox/callbox_variants.story.vue

Comment thread packages/dialtone-vue/components/banner/banner.stories.js
Comment on lines +24 to 31
:header-id="headerId"
:content-id="contentId"
:title="title"
:header-text="headerText"
>
<template #title>
<!-- @slot Slot for the title -->
<slot name="title" />
<template #header>
<!-- @slot Slot for the header -->
<slot name="header" />
</template>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add a BREAKING CHANGE: footer for this public API rename.

Lines 24–31 and 74–92 rename public props/slot (title/titleId/#titleheaderText/headerId/#header). Please ensure the PR/commit includes an explicit BREAKING CHANGE: footer with migration mapping; otherwise this can ship as a patch and silently break consumers.

As per coding guidelines, “This is a public npm design system library … Flag any prop/event/slot removal or rename without BREAKING CHANGE footer.”

Also applies to: 74-92

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dialtone-vue/components/banner/banner.vue` around lines 24 - 31,
This PR renames public props/slot on the Banner component (title → headerText,
titleId → headerId, slot `#title` → `#header`) and must include a BREAKING CHANGE
footer with a clear migration map; add a single-line "BREAKING CHANGE: ..."
footer to the commit/PR description and update the changelog/release notes with
an explicit mapping (title → headerText, titleId → headerId, `#title` → `#header`)
and guidance for consumers to rename usages accordingly so this won't ship as a
silent patch.

Comment thread packages/dialtone-vue/components/modal/modal.stories.js
Comment on lines +204 to 217
* Header text to display in the modal header.
*/
title: {
headerText: {
type: String,
default: '',
},

/**
* Title text to display in the modal banner.
* Header text to display in the modal banner.
*/
bannerTitle: {
bannerHeaderText: {
type: String,
default: '',
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Mark this API rename with a BREAKING CHANGE: footer before merge.

Line 204 and Line 214 rename public modal props (titleheaderText, bannerTitlebannerHeaderText). In this public npm package, that must be explicitly marked as breaking to prevent silent patch-level consumer breakage.

As per coding guidelines, **/*: "This is a public npm library. Breaking changes without BREAKING CHANGE footer ship as patches and silently break consumers."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dialtone-vue/components/modal/modal.vue` around lines 204 - 217,
This change renames public props and must be documented as a breaking change:
add a BREAKING CHANGE footer to the commit/PR description stating the old and
new prop names (e.g. BREAKING CHANGE: prop `title` renamed to `headerText`; prop
`bannerTitle` renamed to `bannerHeaderText`) so consumers are warned; reference
the modal component props (headerText, bannerHeaderText) in the message and
include migration guidance (old → new) before merging.

Comment on lines +12 to +14
:header-text="$attrs.headerText"
:message="$attrs.message"
:title-id="$attrs.titleId"
:header-id="$attrs.headerId"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Scan commit messages for BREAKING CHANGE footer =="
if git show-ref --verify --quiet refs/remotes/origin/next; then
  BASE="$(git merge-base HEAD refs/remotes/origin/next)"
  git log --format='%H%n%s%n%b%n---' "${BASE}..HEAD" | rg -n 'BREAKING CHANGE:'
else
  echo "origin/next not found; scanning recent commits on current branch"
  git log -n 30 --format='%H%n%s%n%b%n---' | rg -n 'BREAKING CHANGE:'
fi

echo "== Scan changeset files (if present) for breaking/major indicators =="
if [ -d .changeset ]; then
  rg -n 'major|BREAKING CHANGE' .changeset
else
  echo ".changeset directory not found"
fi

Repository: dialpad/dialtone

Length of output: 178


🏁 Script executed:

# Check toast component prop definitions
fd -e 'toast' -type f packages/dialtone-vue/components/ | head -20

Repository: dialpad/dialtone

Length of output: 230


🏁 Script executed:

# Find and inspect toast component files
find packages/dialtone-vue/components/toast -type f -name "*.js" -o -name "*.vue" | head -20

Repository: dialpad/dialtone

Length of output: 687


🏁 Script executed:

# Look for the actual prop rename evidence
rg -i 'header-text|header-id|title' packages/dialtone-vue/components/toast/ -A 2 -B 2

Repository: dialpad/dialtone

Length of output: 5528


🏁 Script executed:

# Check for PR description or metadata in git
git show --format=fuller HEAD | head -100

Repository: dialpad/dialtone

Length of output: 4832


🏁 Script executed:

git show HEAD --format=%B --no-patch

Repository: dialpad/dialtone

Length of output: 147


Add BREAKING CHANGE: footer to commit message — prop rename ships as patch and breaks consumers.

Props renamed from titleText/titleId to headerText/headerId across toast component. Without a BREAKING CHANGE: footer, this breaking change will ship as a patch version and silently break existing consumers using the old prop names.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dialtone-vue/components/toast/toast_default.story.vue` around lines
12 - 14, This change renames Toast props titleText/titleId to
headerText/headerId and is a breaking API change; update the commit message by
adding a "BREAKING CHANGE:" footer that explains the prop rename (old prop names
titleText, titleId -> new headerText, headerId) so the release tooling will bump
major version and inform consumers; ensure the footer clearly states the
affected component (toast_default.story.vue / Toast) and the exact props that
were renamed.

Comment on lines +170 to 173
* Callbox header text
*/
title: {
headerText: {
type: String,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify PR metadata and recent commit messages include a BREAKING CHANGE marker.

set -euo pipefail

echo "== PR body and commit messages containing BREAKING CHANGE =="
gh pr view 1204 --json body,commits --jq '.body, (.commits[] | .messageHeadline + "\n" + (.messageBody // ""))' \
  | rg -n "BREAKING CHANGE|BREAKING-CHANGE" || true

echo "== Potential release-note/changeset files mentioning this rename =="
fd -i 'changeset|changelog|release' \
  | xargs -r rg -n "BREAKING CHANGE|headerText|titleId|headerId|bannerHeaderText" || true

Repository: dialpad/dialtone

Length of output: 50374


🏁 Script executed:

#!/bin/bash

# Check the actual prop definition in callbox.vue
echo "=== Current prop definition in callbox.vue ==="
sed -n '165,180p' packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue

echo ""
echo "=== Check template usage of prop ==="
rg -A 2 -B 2 'headerText|title' packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue | head -30

echo ""
echo "=== Check git log for this file (recent commits) ==="
git log --oneline -20 -- packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue

echo ""
echo "=== Check git blame for prop definition area ==="
git blame -L 170,173 packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue

Repository: dialpad/dialtone

Length of output: 1604


🏁 Script executed:

#!/bin/bash

echo "=== Full commit message for b56daa3e ==="
git show b56daa3e --format=fuller | head -100

echo ""
echo "=== Diff for callbox.vue in that commit ==="
git show b56daa3e -- packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue | grep -A 5 -B 5 'title\|headerText' | head -60

Repository: dialpad/dialtone

Length of output: 6463


🏁 Script executed:

#!/bin/bash

echo "=== Full diff for callbox.vue property changes ==="
git show b56daa3e -- packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue | grep -A 10 -B 10 'title\|headerText' | head -100

echo ""
echo "=== Check if commit is in PR 1204 ==="
git log --all --oneline --grep="1204" | head -5

echo ""
echo "=== Check PR branches/tags for this commit ==="
git branch -r --contains b56daa3e | head -10

echo ""
echo "=== Check if BREAKING CHANGE appears anywhere in related PRs or recent releases ==="
rg "BREAKING CHANGE" packages/dialtone-vue/CHANGELOG.md | grep -i "header\|title\|DLT-3284" || echo "No match for header/title/DLT-3284 in BREAKING CHANGES"

Repository: dialpad/dialtone

Length of output: 2825


🏁 Script executed:

#!/bin/bash

echo "=== Get the actual old version to see what prop was renamed FROM ==="
git show b56daa3e^:packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue | grep -A 5 -B 5 'title\|headerText' | head -80

echo ""
echo "=== Full commit title and body to check for BREAKING CHANGE ==="
git log -1 b56daa3e --format="%B"

echo ""
echo "=== Check if DLT-3284 appears anywhere in commit messages ==="
git log --all --oneline | grep -i "3284" | head -5

Repository: dialpad/dialtone

Length of output: 497


🏁 Script executed:

#!/bin/bash

echo "=== Search git history for 'title' prop in callbox.vue ==="
git log --all -p packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue | grep -A 3 -B 3 "title:" | head -100

echo ""
echo "=== Check commit b56daa3e parent ==="
git log -1 b56daa3e --format="%P"

echo ""
echo "=== List all commits for callbox.vue ==="
git log --oneline packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue | head -15

echo ""
echo "=== Check if callbox.vue was recently created ==="
git log --follow --oneline packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue | tail -5

Repository: dialpad/dialtone

Length of output: 651


🏁 Script executed:

#!/bin/bash

echo "=== Verify if this commit is part of any published releases ==="
git tag --contains b56daa3e | head -10

echo ""
echo "=== Check recent version releases for dialtone-vue ==="
git tag -l "dialtone-vue/*" --sort=-version:refname | head -5

echo ""
echo "=== Check CHANGELOG for any mention of DLT-3284 ==="
rg "DLT-3284" packages/dialtone-vue/CHANGELOG.md

echo ""
echo "=== Check which version bump would apply to this refactor commit ==="
echo "Commit type: refactor (should be patch per semantic-release)"
echo "Has BREAKING CHANGE footer: NO"
echo "Expected release impact: PATCH (silent breaking change - a violation)"

Repository: dialpad/dialtone

Length of output: 464


Add BREAKING CHANGE footer to this commit or ensure it's part of a breaking-change release.

Renaming the public prop from title to headerText is a breaking change. Commit b56daa3 (DLT-3284) is a refactor without a BREAKING CHANGE footer, which means this will ship as a patch release and silently break consumers. Per repository guidelines: "Breaking changes without BREAKING CHANGE footer ship as patches and silently break consumers."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue` around lines 170 -
173, The prop rename in callbox.vue from title to headerText is a breaking API
change; update the commit metadata to include a BREAKING CHANGE footer (or move
this change into a breaking-release branch) and document the change in the
changelog/release notes referencing the component and prop names (Callbox
component: title -> headerText) so consumers are notified; ensure the commit
message includes a precise BREAKING CHANGE description mentioning the old prop
name `title`, the new `headerText`, and any migration guidance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

headerText default is undefined in toast.vue but '' in notice.vue, banner.vue, and the toast layout sub-components. Probably best to just use undefined in all cases?


// Props
titleId: {
headerId: {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a definition for headerText also?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah added it. 👍🏼

@github-actions
Copy link
Copy Markdown
Contributor

Please add either the visual-test-ready or no-visual-test label to this PR depending on whether you want to run visual tests or not.
It is recommended to run visual tests if your PR changes any UI. ‼️

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/dialtone-vue/components/toast/toast.stories.js (1)

149-149: Consider updating story sample copy from “title” to “header” for API consistency.

The prop name is now headerText, but sample values still say “... title (optional)”, which can confuse consumers reading Storybook docs.

Suggested copy-only diff
-    headerText: 'Base title (optional)',
+    headerText: 'Base header (optional)',
@@
-    headerText: 'Critical title (optional)',
+    headerText: 'Critical header (optional)',
@@
-    headerText: 'Info title (optional)',
+    headerText: 'Info header (optional)',
@@
-    headerText: 'Positive title (optional)',
+    headerText: 'Positive header (optional)',
@@
-    headerText: 'Warning title (optional)',
+    headerText: 'Warning header (optional)',

Also applies to: 167-167, 181-181, 195-195, 209-209

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dialtone-vue/components/toast/toast.stories.js` at line 149, Update
the Storybook sample text to match the prop name change: replace occurrences of
wording that say "title" with "header" for the toast story props (e.g., the
headerText prop in toast.stories.js and the sample entries referencing it around
the lines indicated); specifically update the sample strings like 'Base title
(optional)' to 'Base header (optional)' (and the other similar samples at the
other noted positions) so the displayed documentation matches the headerText
prop API.
🤖 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/toast/toast.stories.js`:
- Around line 48-53: Update the commit message for edd98b24 to include the
required BREAKING CHANGE footer so consumers are notified of the prop rename;
amend the commit (or interactive rebase if it's not the most recent commit) and
append the exact line: "BREAKING CHANGE: Renamed Toast (and other component)
props: title/titleId → headerText/headerId", then force-push the branch so the
updated message replaces the old one. Reference the changed prop names
headerText and headerId and the original names title and titleId when crafting
the commit message.

---

Nitpick comments:
In `@packages/dialtone-vue/components/toast/toast.stories.js`:
- Line 149: Update the Storybook sample text to match the prop name change:
replace occurrences of wording that say "title" with "header" for the toast
story props (e.g., the headerText prop in toast.stories.js and the sample
entries referencing it around the lines indicated); specifically update the
sample strings like 'Base title (optional)' to 'Base header (optional)' (and the
other similar samples at the other noted positions) so the displayed
documentation matches the headerText prop API.
🪄 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: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: eb0c39e9-b854-46b2-9282-1d31cc4a5473

📥 Commits

Reviewing files that changed from the base of the PR and between b938c8d and 4d397e2.

📒 Files selected for processing (8)
  • packages/dialtone-vue/components/banner/banner.vue
  • packages/dialtone-vue/components/modal/modal.vue
  • packages/dialtone-vue/components/notice/notice.vue
  • packages/dialtone-vue/components/notice/notice_content.vue
  • packages/dialtone-vue/components/toast/layouts/toast_layout_alternate.vue
  • packages/dialtone-vue/components/toast/layouts/toast_layout_default.vue
  • packages/dialtone-vue/components/toast/toast.stories.js
  • packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/dialtone-vue/recipes/leftbar/callbox/callbox.vue
  • packages/dialtone-vue/components/modal/modal.vue
  • packages/dialtone-vue/components/toast/layouts/toast_layout_default.vue
  • packages/dialtone-vue/components/notice/notice.vue
  • packages/dialtone-vue/components/toast/layouts/toast_layout_alternate.vue
  • packages/dialtone-vue/components/notice/notice_content.vue
  • packages/dialtone-vue/components/banner/banner.vue

Comment thread packages/dialtone-vue/components/toast/toast.stories.js
@github-actions
Copy link
Copy Markdown
Contributor

✔️ Deploy previews ready!
😎 Dialtone documentation preview: https://dialtone.dialpad.com/deploy-previews/pr-1204/
😎 Dialtone-vue preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-1204/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants