Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

fix(general-row): adjust label width on prop change #1095

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

juliodialpad
Copy link
Contributor

Fix (General row): Adjust label width on prop change

🛠️ Type Of Change

  • Fix
  • Feature
  • Refactoring
  • Documentation

📖 Description

Added adjustLabelWidth to $props watcher to make sure we're adjusting the width of the component after updating some props.

💡 Context

We were only adjusting the size of the component with a resize observer, but some props might change the size too like hasUnreads or hasCallButton.

📝 Checklist

  • I have reviewed my changes
  • I have added tests
  • I have added all relevant documentation
  • I have validated components with a screen reader
  • I have validated components keyboard navigation
  • I have considered the performance impact of my change
  • I have checked that my change did not significantly increase bundle size
  • I am exporting any new components or constants in the index.js in the component directory
  • I am exporting any new components or constants in the index.js in the root

🔮 Next Steps

CP to dialtone8 branch, release next, update on product and CP.

@github-actions
Copy link

Thanks for contributing to Dialtone Vue! Please read below for some important info regarding Vue 3 compatibility.

Currently we need to maintain two branches in Dialtone Vue, one for Vue 2, one for Vue 3.

This means you must create two PRs for every feature change you make. One into staging and one into staging-vue3.

Many times the change you have made in Vue 2 will be identical to the change you need to make in Vue 3. To make this easier we have made a script that can copy your changes from this branch to a new branch off of staging-vue3 suffixed with -vue3.

run ./copy_pr_vue3.sh from the root dialtone-vue directory.

Once the new branch is created, you will need to look at your code to make sure it still makes sense and test that your changes all work in vue 3. If everything is good you can push it and create a PR into staging-vue3.

It is a required check for every PR to have a corresponding branch called yourbranch-vue3 so that we do not forget to do it. In the special case that you need to make a change to vue2 without making it in vue3, you can set the label vue2-only on this PR.

I got "commit SHA is a merge but no -m option was given."

This happens if there are merge commits in your branch. It's no problem, you can simply skip them with git cherry-pick --skip. We don't want to copy merge commits to the Vue 3 branch.

What if I make more changes to my vue 2 branch after running ./copy_pr_vue3.sh?

You can copy these to the existing -vue3 branch by running the script with a git SHA param like so:

./copy_pr_vue3.sh 2a78db7

where 2a78db7 is the last commit from your branch that was copied to the other branch (all commits after this will be copied)

If it's just one or two commits, you may prefer to just manually use git cherry-pick which will work fine as well.

What if I get a conflict?

It's possible to get a conflict when running copy_pr_vue3.sh as there are differences in Vue 2 and Vue 3 code. If this happens you can manually fix the conflict, commit it and do git cherry-pick --continue.

@github-actions
Copy link

✔️ Deploy Preview ready!
😎 Browse the preview: https://vue.dialpad.design/deploy-previews/pr-1095/
🔨 If you experience an SSL issue then wait 2 minutes and try again.

@github-actions github-actions bot added the visual-test-ready Add this tag when the PR is ready for visual test, to trigger GHA visual tests label Jul 25, 2023
@juliodialpad juliodialpad merged commit be00936 into staging Jul 25, 2023
@juliodialpad juliodialpad deleted the general-row/label_width branch July 25, 2023 01:01
juliodialpad pushed a commit that referenced this pull request Jul 25, 2023
# [2.92.0-dialtone8.6](v2.92.0-dialtone8.5...v2.92.0-dialtone8.6) (2023-07-25)

### Bug Fixes

* **General Row:** adjust label width on prop change ([#1095](#1095)) ([01ed220](01ed220))
juliodialpad pushed a commit that referenced this pull request Jul 25, 2023
## [2.92.3](v2.92.2...v2.92.3) (2023-07-25)

### Bug Fixes

* **General Row:** adjust label width on prop change ([#1095](#1095)) ([be00936](be00936))
* **General Row:** call resize handler on mounted ([#1093](#1093)) ([25791d7](25791d7))
* **Tooltip:** change anchor tag to span ([#1088](#1088)) ([2bd0be2](2bd0be2))
@github-actions
Copy link

🎉 This PR is included in version 2.92.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

braddialpad pushed a commit that referenced this pull request Jul 27, 2023
# [2.93.0-dialtone8.1](v2.92.4...v2.93.0-dialtone8.1) (2023-07-27)

### Bug Fixes

* `contact_info` style override issue ([#1078](#1078)) ([2090704](2090704))
* add customized css to badge label and contact info ([#1076](#1076)) ([6e8b374](6e8b374))
* add placeholder text for richtexteditor ([#1004](#1004)) ([19e1ef9](19e1ef9))
* **Avatar:** thin border behind image ([#1098](#1098)) ([c942386](c942386))
* change to fnv algo ([f6e01a1](f6e01a1))
* **Combobox Multi Select:** fix ref not existing error ([#1083](#1083)) ([de054f4](de054f4))
* component documentation link class ([#985](#985)) ([95c178c](95c178c))
* **Contact Info Avatar:** show avatar halo as required ([#1059](#1059)) ([b429531](b429531))
* **Contact Info, Leftbar Row:** stylings ([#1085](#1085)) ([34c27e8](34c27e8))
* **Contact Info:** avatar's border color ([#1097](#1097)) ([1639989](1639989))
* **Contact Row, Group Row, General Row:** null on description ([#1013](#1013)) ([8092faf](8092faf))
* DIALTONE-1089 pagination muted clear button error ([4bd3170](4bd3170))
* **General Row:** adjust label width on prop change ([#1095](#1095)) ([01ed220](01ed220))
* **General Row:** call resize handler on mounted ([#1093](#1093)) ([53768c1](53768c1))
* **General Row:** overridden display property ([#1069](#1069)) ([7b5f27b](7b5f27b))
* **General Row:** resize observer ([#1074](#1074)) ([7e27e9c](7e27e9c))
* **Item Layout:** remove align-self from item layout ([80ab209](80ab209))
* **Keyboard Shortcut:** inverted border color ([b68387c](b68387c))
* **Leftbar General Row:** add href for focusability ([#994](#994)) ([73bc4e0](73bc4e0))
* merge branch 'staging' into dialtone8 ([aa95eb4](aa95eb4))
* merge branch 'staging' into dialtone8 ([2dec412](2dec412))
* missing migrations ([7483e16](7483e16))
* **Modal:** secondary action button kind ([#1011](#1011)) ([f899cb8](f899cb8))
* package-lock ([48f3120](48f3120))
* remove peer dep ([b5be026](b5be026))
* revert [DIALTONE-1089] fix: pagination muted clear button error ([f43066c](f43066c))
* set node engine minimum to 12.20 ([#988](#988)) ([a53db3c](a53db3c))
* **Tooltip:** change anchor tag to span ([#1088](#1088)) ([0735fc8](0735fc8))
* update dialtone-icons ([9a8c31a](9a8c31a))

### Code Refactoring

* **Datepicker:** name refactoring ([#1049](#1049)) ([f6d34aa](f6d34aa))

### Documentation

* **Collapsible:** fix opened event not displayed on panel ([#1064](#1064)) ([51a8f52](51a8f52))
* fix broken story ([8097ff2](8097ff2))

### Features

* **Avatar:** update to flat colors ([#982](#982)) ([469fe05](469fe05))
* **Confact Info:** add `showAvatar` and `avatarIcon` props ([#981](#981)) ([4a7a674](4a7a674))
* **Datepicker:** date format utils ([#1060](#1060)) ([42b8572](42b8572))
* **Datepicker:** datepicker component ([#1007](#1007)) ([335af23](335af23))
* **General Row:** overridden display property ([#1069](#1069)) ([d6fd5ac](d6fd5ac))
* **General Row:** overridden display property ([#1069](#1069)) ([080afc0](080afc0))
* merge branch 'staging' into dialtone8 ([cf8d810](cf8d810))
* Merge branch 'staging' into dialtone8 ([001d2f7](001d2f7))
* migration to dialtone 8 ([#979](#979)) ([defcb77](defcb77)), closes [#993](#993)
* **Modal:** show event and initial-focus-element ([#1009](#1009)) ([935d6da](935d6da))
* **Rich Text Editor:** link extension ([#991](#991)) ([d88e704](d88e704))
* **Rich Text Editor:** tests for rich text editor link extension and utils ([#1001](#1001)) ([b947270](b947270))
* state changes for feed item row ([#1002](#1002)) ([9aeefc6](9aeefc6))
* update dialtone-icons ([1fb19be](1fb19be))
* update item-layout to use tokens ([c9151aa](c9151aa))

### Reverts

* Revert "feat(general-row): overridden display property (#1069)" ([3e619ba](3e619ba)), closes [#1069](#1069)
* revert fix(general-row): overridden display property (#1069) ([5355902](5355902)), closes [#1069](#1069)
juliodialpad pushed a commit that referenced this pull request Aug 4, 2023
# [2.93.0](v2.92.4...v2.93.0) (2023-08-04)

### Bug Fixes

* `contact_info` style override issue ([#1078](#1078)) ([2090704](2090704))
* add customized css to badge label and contact info ([#1076](#1076)) ([6e8b374](6e8b374))
* add placeholder text for richtexteditor ([#1004](#1004)) ([19e1ef9](19e1ef9))
* **Avatar:** remove util classes, set tokens ([#1106](#1106)) ([3a24d2c](3a24d2c))
* **Avatar:** thin border behind image ([#1098](#1098)) ([c942386](c942386))
* change to fnv algo ([f6e01a1](f6e01a1))
* **Combobox Multi Select:** fix ref not existing error ([#1083](#1083)) ([de054f4](de054f4))
* component documentation link class ([#985](#985)) ([95c178c](95c178c))
* **Contact Info Avatar:** show avatar halo as required ([#1059](#1059)) ([b429531](b429531))
* **Contact Info, Leftbar Row:** stylings ([#1085](#1085)) ([34c27e8](34c27e8))
* **Contact Info:** avatar's border color ([#1097](#1097)) ([1639989](1639989))
* **Contact Row, Group Row, General Row:** null on description ([#1013](#1013)) ([8092faf](8092faf))
* DIALTONE-1089 pagination muted clear button error ([4bd3170](4bd3170))
* **General Row:** adjust label width on prop change ([#1095](#1095)) ([01ed220](01ed220))
* **General Row:** call resize handler on mounted ([#1093](#1093)) ([53768c1](53768c1))
* **General Row:** overridden display property ([#1069](#1069)) ([7b5f27b](7b5f27b))
* **General Row:** resize observer ([#1074](#1074)) ([7e27e9c](7e27e9c))
* **Item Layout:** remove align-self from item layout ([80ab209](80ab209))
* **Keyboard Shortcut:** inverted border color ([b68387c](b68387c))
* **Leftbar General Row:** add href for focusability ([#994](#994)) ([73bc4e0](73bc4e0))
* **Leftbar Row:** presence border color on selected row ([#1110](#1110)) ([05c9b15](05c9b15))
* merge branch 'staging' into dialtone8 ([aa95eb4](aa95eb4))
* merge branch 'staging' into dialtone8 ([2dec412](2dec412))
* missing migrations ([7483e16](7483e16))
* **Modal:** secondary action button kind ([#1011](#1011)) ([f899cb8](f899cb8))
* package-lock ([48f3120](48f3120))
* remove peer dep ([b5be026](b5be026))
* revert [DIALTONE-1089] fix: pagination muted clear button error ([f43066c](f43066c))
* set node engine minimum to 12.20 ([#988](#988)) ([a53db3c](a53db3c))
* **Tooltip:** change anchor tag to span ([#1088](#1088)) ([0735fc8](0735fc8))
* update dialtone-icons ([9a8c31a](9a8c31a))

### Code Refactoring

* **Datepicker:** name refactoring ([#1049](#1049)) ([f6d34aa](f6d34aa))

### Documentation

* **Collapsible:** fix opened event not displayed on panel ([#1064](#1064)) ([51a8f52](51a8f52))
* fix broken story ([8097ff2](8097ff2))

### Features

* add typescript ([#1108](#1108)) ([4f5e2ec](4f5e2ec))
* **Avatar:** add icon-class prop ([#1111](#1111)) ([43b0561](43b0561))
* **Avatar:** extract initials from full name ([6c80963](6c80963))
* **Avatar:** extract initials from full name ([#1102](#1102)) ([3082209](3082209)), closes [#1097](#1097) [#1098](#1098)
* **Avatar:** update to flat colors ([#982](#982)) ([469fe05](469fe05))
* **Confact Info:** add `showAvatar` and `avatarIcon` props ([#981](#981)) ([4a7a674](4a7a674))
* **Datepicker:** date format utils ([#1060](#1060)) ([42b8572](42b8572))
* **Datepicker:** datepicker component ([#1007](#1007)) ([335af23](335af23))
* **General Row:** overridden display property ([#1069](#1069)) ([d6fd5ac](d6fd5ac))
* **General Row:** overridden display property ([#1069](#1069)) ([080afc0](080afc0))
* merge branch 'staging' into dialtone8 ([cf8d810](cf8d810))
* Merge branch 'staging' into dialtone8 ([001d2f7](001d2f7))
* migration to dialtone 8 ([#979](#979)) ([defcb77](defcb77)), closes [#993](#993)
* **Modal:** show event and initial-focus-element ([#1009](#1009)) ([935d6da](935d6da))
* **Rich Text Editor:** link extension ([#991](#991)) ([d88e704](d88e704))
* **Rich Text Editor:** tests for rich text editor link extension and utils ([#1001](#1001)) ([b947270](b947270))
* state changes for feed item row ([#1002](#1002)) ([9aeefc6](9aeefc6))
* update dialtone-icons ([1fb19be](1fb19be))
* update item-layout to use tokens ([c9151aa](c9151aa))

### Reverts

* Revert "feat(general-row): overridden display property (#1069)" ([3e619ba](3e619ba)), closes [#1069](#1069)
* revert fix(general-row): overridden display property (#1069) ([5355902](5355902)), closes [#1069](#1069)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released visual-test-ready Add this tag when the PR is ready for visual test, to trigger GHA visual tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants