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

Nv 3005 the new sms editor #5197

Merged
merged 5 commits into from
Feb 16, 2024

Conversation

ainouzgali
Copy link
Contributor

What change does this PR introduce?

The new SMS editor layout with the preview

Screen Shot 2024-02-15 at 12 16 28

Why was this change needed?

Other information (Screenshots)

Copy link

linear bot commented Feb 15, 2024

Comment on lines +28 to +31
const { pathname } = useLocation();

const isPreviewPath = pathname.endsWith('/preview');
const showEditOverlay = isHovered && isPreviewPath;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Show the edit option only when in the preview route - not in the editor

Comment on lines +34 to +41
if (!showPreviewAsLoading) {
getSmsPreview({
content: previewData.current.templateContent,
payload: previewData.current.processedVariables,
locale,
});
}
}, [locale, previewData, getSmsPreview, showPreviewAsLoading]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

trigger use effect when showPreviewAsLoading is toggled, and call the preview endpoint only when typing in editor has timed out

Copy link
Member

@BiswaViraj BiswaViraj left a comment

Choose a reason for hiding this comment

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

🚀

@LetItRock LetItRock merged commit 2c49b8e into translation-management-beta Feb 16, 2024
17 checks passed
@LetItRock LetItRock deleted the nv-3005-the-new-sms-editor branch February 16, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants