-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(api): Nv 5101 email sent from new dashbord has message clipped block in #7545
feat(api): Nv 5101 email sent from new dashbord has message clipped block in #7545
Conversation
Hey there and thank you for opening this pull request! 👋 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Your PR title is: Details: Unknown scope "api" found in pull request title "feat(api): Nv 5101 email sent from new dashbord has message clipped block in". Scope must match one of: root, api-service, dashboard, inbound-mail, web, webhook, widget, worker, ws, ee-auth, ee-billing, ee-dal, ee-shared-services, ee-translation, application-generic, automation, dal, design-system, embed, notifications, novui, testing, client, framework, headless, js, nest, nextjs, node, notification-center, novu, providers, react, react-native, shared, stateless, nestjs, nextjs. |
✅ Deploy Preview for dashboard-v2-novu-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
const childNode = node.content[i]; | ||
|
||
const isEmptyParagraph = | ||
childNode.type === 'paragraph' && !childNode.text && (!childNode.content || childNode.content.length === 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: what about the other types like heading or text, don't they create an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, they might cause the issue as well.
i will check and update accordingly Thanks 🙌🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other content types don't cause this issue, as the text or content types properly handle it. However, when someone leaves an empty bullet/unordered/numbered list at the end, it leads to clipping.
I didn't handle that case as it will increase the complexity of this code and also an empty bullet list is easily identifiable on the email editor and will be very unlikely to miss it
…sage-clipped-block-in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check if this issue is caused by the invisible node that's placed in the end by maily for UX purposes? Might not be the culprit though. If it is, it might help with the solution(since the node will always be there) and @LetItRock's comment.
https://github.com/arikchakma/maily.to/blob/main/packages/core/src/editor/extensions/tailing-node/tailing-node.ts
I checked it only happens when the user manually leaves an empty paragraph at the end of the content. In other normal scenarios I was not able to reproduce the clipping |
What changed? Why was the change needed?
Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer