Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rich text editor warning/error cleanup #227

Merged
merged 2 commits into from
Mar 25, 2024
Merged

Conversation

sanjeevdialpad
Copy link
Contributor

@sanjeevdialpad sanjeevdialpad commented Mar 22, 2024

fix: Rich text editor warning/error cleanup

๐Ÿ› ๏ธ Type Of Change

These types will increment the version number on release:

  • Fix
  • Feature
  • Performance Improvement
  • Refactor

These types will not increment the version number, but will still deploy to documentation site on release:

  • Documentation
  • Build system
  • CI
  • Style (code style changes, not css changes)
  • Test
  • Other (chore)

๐Ÿ“– Jira Ticket

https://dialpad.atlassian.net/browse/DP-93915
https://dialpad.atlassian.net/browse/DP-93919

๐Ÿ“– Description

Three changes in this PR.

  • There might be a slight delay in fetching the mention suggestion list from backend due to which the component might not be mounted/rendered. And during this time, we try to access component.ref? where component itself is undefined. Hence have a check onKeyDown() method before accessing ref.

  • Similarly there can be a case where the message input itself is unmounted (edit message case) and the click event in the recipe is calling focusEditor. Make sure the ref exists before calling .focusEditor() on it.

  • The other fix is kind of a weird one, sometimes (rarely) even though fullName is set on the dt-avatar in MentionSuggestion.vue , vue still complains that we do not pass fullName or imageAlt. Pretty sure the node.name does exist if node.imageSrc exists. So i do not know why it complains. Adding imageAlt and checking if the error is suppressed when dialtone is updated.

๐Ÿ“ Checklist

For all PRs:

  • I have ensured no private Dialpad links or info are in the code or pull request description (Dialtone is a public repo!).
  • I have reviewed my changes.
  • I have added all relevant documentation.
  • I have considered the performance impact of my change.

For all Vue changes:

  • I have added / updated unit tests.
  • I have made my changes in Vue 2 and Vue 3. Note: you may sync your changes from Vue 2 to Vue 3 (or vice versa) using the ./scripts/dialtone-vue-sync.sh script.
  • I have validated components with a screen reader.
  • I have validated components keyboard navigation.

For all CSS changes:

  • I have used design tokens whenever possible.
  • I have considered how this change will behave on different screen sizes.
  • I have visually validated my change in light and dark mode.
  • I have used gap or flexbox properties for layout instead of margin whenever possible.

If new component:

  • I am exporting any new components or constants:
    • from the index.js in the component directory.
    • from the index.js in the root (either packages/dialtone-vue2 or packages/dialtone-vue3).
  • I have added the styles for the new component to the packages/dialtone-css package.
  • I have created a page for the new component on the documentation site in apps/dialtone-documentation.
  • I have added the new component to common/components_list.cjs in packages/dialtone-vue2 and packages/dialtone-vue3
  • I have created a component story in storybook
  • I have created story / stories for any relevant component variants in storybook
  • I have created a docs page for the component in storybook.
  • I have checked that changing all props/slots via the UI in storybook works as expected.

๐Ÿ”ฎ Next Steps

๐Ÿ“ท Screenshots / GIFs

๐Ÿ”— Sources

@sanjeevdialpad sanjeevdialpad added the no-visual-test Add this tag when the PR does not need visual testing label Mar 22, 2024
Copy link

โœ”๏ธ Deploy previews ready!
๐Ÿ˜Ž Dialtone preview: https://dialtone.dialpad.com/deploy-previews/pr-227/
๐Ÿ˜Ž Dialtone-vue 2 preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-227/
๐Ÿ˜Ž Dialtone-vue 3 the preview: https://dialtone.dialpad.com/vue3/deploy-previews/pr-227/

@sanjeevdialpad sanjeevdialpad changed the title fix: Rich text editor warning/error cleanup fix: rich text editor warning/error cleanup Mar 22, 2024
Copy link

โœ”๏ธ Deploy previews ready!
๐Ÿ˜Ž Dialtone preview: https://dialtone.dialpad.com/deploy-previews/pr-227/
๐Ÿ˜Ž Dialtone-vue 2 preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-227/
๐Ÿ˜Ž Dialtone-vue 3 the preview: https://dialtone.dialpad.com/vue3/deploy-previews/pr-227/

Copy link
Contributor

@iropolo iropolo left a comment

Choose a reason for hiding this comment

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

Looks good, thanks

@sanjeevdialpad sanjeevdialpad merged commit a60badb into staging Mar 25, 2024
11 checks passed
@sanjeevdialpad sanjeevdialpad deleted the DLT-DP-93915 branch March 25, 2024 16:59
braddialpad pushed a commit that referenced this pull request Mar 26, 2024
# [3.117.0](dialtone-vue3/v3.116.1...dialtone-vue3/v3.117.0) (2024-03-26)

### Bug Fixes

* **Message Input:** DLT-1672 allow spaces in mention suggestions ([#236](#236)) ([ca796d9](ca796d9))
* **Message Input:** send complete files on add media ([#230](#230)) ([15c609f](15c609f))
* **Message Input:** update mention suggestions rendering ([#229](#229)) ([5535e1f](5535e1f))
* NO-JIRA release not working with new commit convention ([#235](#235)) ([28ff27c](28ff27c))
* rich text editor warning/error cleanup ([#227](#227)) ([a60badb](a60badb))

### Features

* **Message Input:** DLT-1665 add paste event ([#233](#233)) ([d35bf6e](d35bf6e))
braddialpad pushed a commit that referenced this pull request Mar 26, 2024
# [2.124.0](dialtone-vue2/v2.123.1...dialtone-vue2/v2.124.0) (2024-03-26)

### Bug Fixes

* **Message Input:** DLT-1672 allow spaces in mention suggestions ([#236](#236)) ([ca796d9](ca796d9))
* **Message Input:** send complete files on add media ([#230](#230)) ([15c609f](15c609f))
* **Message Input:** update mention suggestions rendering ([#229](#229)) ([5535e1f](5535e1f))
* NO-JIRA release not working with new commit convention ([#235](#235)) ([28ff27c](28ff27c))
* rich text editor warning/error cleanup ([#227](#227)) ([a60badb](a60badb))

### Features

* **Message Input:** DLT-1665 add paste event ([#233](#233)) ([d35bf6e](d35bf6e))
braddialpad pushed a commit that referenced this pull request Mar 26, 2024
# [9.25.0](dialtone/v9.24.0...dialtone/v9.25.0) (2024-03-26)

### Bug Fixes

* **Message Input:** DLT-1672 allow spaces in mention suggestions ([#236](#236)) ([ca796d9](ca796d9))
* **Message Input:** send complete files on add media ([#230](#230)) ([15c609f](15c609f))
* **Message Input:** update mention suggestions rendering ([#229](#229)) ([5535e1f](5535e1f))
* NO-JIRA release not working with new commit convention ([#235](#235)) ([28ff27c](28ff27c))
* rich text editor warning/error cleanup ([#227](#227)) ([a60badb](a60badb))

### Documentation

* DLT-1575 use CodeExampleTabs from Icon to Lazy show ([#232](#232)) ([57f0b98](57f0b98))
* NO-JIRA fix example in blog post ([#234](#234)) ([bb7b28d](bb7b28d))

### Features

* **Message Input:** DLT-1665 add paste event ([#233](#233)) ([d35bf6e](d35bf6e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-visual-test Add this tag when the PR does not need visual testing
Projects
None yet
2 participants