Skip to content

feat(editor): DP-131851 added editor support to encase text with div tags#685

Merged
Aditya Narravula (anarravula-dialpad) merged 2 commits intostagingfrom
DP-131851-Div-Tags
Mar 31, 2025
Merged

feat(editor): DP-131851 added editor support to encase text with div tags#685
Aditya Narravula (anarravula-dialpad) merged 2 commits intostagingfrom
DP-131851-Div-Tags

Conversation

@anarravula-dialpad
Copy link
Copy Markdown
Contributor

@anarravula-dialpad Aditya Narravula (anarravula-dialpad) commented Mar 27, 2025

Dialtone Recipe Editor Support For Encasing Text With Div Tags

Obligatory GIF (super important!)

Obligatory GIF

🛠️ 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-131851

📖 Description

  1. Introduced a new extension that extends the existing tiptap paragraph extension that adds div tags to text instead of p tags
  2. Added a property to rich text editor to toggle the use of this extension. Default uses the paragraph tags, when enabled it adds the div extension to the editor instead of the paragraph extension
  3. Added the same property to the DtRecipeEditor. This way ubervoice can send the property to the component to toggle the extension.

💡 Context

Agent Experience is currently using Dialtone's Recipe Editor (DtRecipeEditor) for composing emails. One of our requirements by our customer is to match the behavior of outlook/gmail when composing emails. In outlook, and gmail when a user starts typing text the text is encased in div tags rather than the paragraph tags used by DtRecipeEditor which uses tiptap to implement the editor. This PR introduces a new extension that replaces the paragraph tags with a div tag. And enabling it when a property is sent to the recipe editor.

Purpose: We want the behavior of the editor to be similar to an editor in outlook or gmail.

Why: Customers were complaining that the email formatting was different in dialpad vs gmail and outlook because dialpad uses p tags and outlook and gmail uses div tags

Problems Solved: Customer will have a similar editing experience in both dialpad and other email clients like outlook and gmail.

📝 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. Read docs here: Dialtone Vue Sync 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.

📷 Screenshots / GIFs

Screenshot 2025-03-27 at 3 02 00 PM Screenshot 2025-03-27 at 3 02 43 PM

Screenshots of the imported component in ubervoice
Screenshot 2025-03-27 at 11 22 17 AM
Screenshot 2025-03-27 at 11 22 57 AM
Screenshot 2025-03-27 at 11 23 23 AM
Screenshot 2025-03-27 at 11 23 44 AM

…roduced a property to the component to toggle the setting
@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. ‼️

@anarravula-dialpad Aditya Narravula (anarravula-dialpad) changed the title feat(editor): DP-131851 Added Editor Support to encase text with div tags feat DP-131851 Added Editor Support to encase text with div tags Mar 27, 2025
@anarravula-dialpad Aditya Narravula (anarravula-dialpad) changed the title feat DP-131851 Added Editor Support to encase text with div tags feat: DP-131851 Added Editor Support to encase text with div tags Mar 27, 2025
@anarravula-dialpad Aditya Narravula (anarravula-dialpad) changed the title feat: DP-131851 Added Editor Support to encase text with div tags feat (editor): DP-131851 added editor support to encase text with div tags Mar 27, 2025
@anarravula-dialpad Aditya Narravula (anarravula-dialpad) changed the title feat (editor): DP-131851 added editor support to encase text with div tags feat(editor): DP-131851 added editor support to encase text with div tags Mar 27, 2025
@anarravula-dialpad Aditya Narravula (anarravula-dialpad) added the visual-test-ready Add this tag when the PR is ready for visual test, to trigger GHA visual tests label Mar 27, 2025
Copy link
Copy Markdown
Contributor

@braddialpad Brad Paugh (braddialpad) left a comment

Choose a reason for hiding this comment

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

This looks really good thanks!

make sure to port the code to vue 3 by using scripts/dialtone-vue-sync.sh

I don't think this code will need any vue 3 specific changes.

@github-actions
Copy link
Copy Markdown
Contributor

✔️ Deploy previews ready!
😎 Dialtone preview: https://dialtone.dialpad.com/deploy-previews/pr-685/
😎 Dialtone-vue 2 preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-685/
😎 Dialtone-vue 3 the preview: https://dialtone.dialpad.com/vue3/deploy-previews/pr-685/

@anarravula-dialpad
Copy link
Copy Markdown
Contributor Author

This looks really good thanks!

make sure to port the code to vue 3 by using scripts/dialtone-vue-sync.sh

I don't think this code will need any vue 3 specific changes.

Done!

@anarravula-dialpad Aditya Narravula (anarravula-dialpad) merged commit d0429a3 into staging Mar 31, 2025
11 checks passed
@anarravula-dialpad Aditya Narravula (anarravula-dialpad) deleted the DP-131851-Div-Tags branch March 31, 2025 17:51
Julio Ortega (juliodialpad) pushed a commit that referenced this pull request Apr 3, 2025
# [2.180.0](dialtone-vue2/v2.179.1...dialtone-vue2/v2.180.0) (2025-03-31)

### Bug Fixes

* **Pagination:** DLT-2373 invalid prop combination on end buttons ([#684](#684)) ([517debb](517debb))

### Features

* **Editor:** DP-131851 added editor support to encase text with div tags ([#685](#685)) ([d0429a3](d0429a3))
Julio Ortega (juliodialpad) pushed a commit that referenced this pull request Apr 3, 2025
# [3.173.0](dialtone-vue3/v3.172.1...dialtone-vue3/v3.173.0) (2025-03-31)

### Bug Fixes

* **Pagination:** DLT-2373 invalid prop combination on end buttons ([#684](#684)) ([517debb](517debb))

### Features

* **Editor:** DP-131851 added editor support to encase text with div tags ([#685](#685)) ([d0429a3](d0429a3))
Julio Ortega (juliodialpad) pushed a commit that referenced this pull request Apr 3, 2025
# [9.107.0](dialtone/v9.106.1...dialtone/v9.107.0) (2025-03-31)

### Bug Fixes

* **Pagination:** DLT-2373 invalid prop combination on end buttons ([#684](#684)) ([517debb](517debb))

### Features

* **Editor:** DP-131851 added editor support to encase text with div tags ([#685](#685)) ([d0429a3](d0429a3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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