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 2997 reusable chat preview component #5157

Conversation

ainouzgali
Copy link
Contributor

What change does this PR introduce?

Preview chat component

Why was this change needed?

Other information (Screenshots)

Copy link

linear bot commented Feb 4, 2024

@BiswaViraj BiswaViraj force-pushed the nv-2995-reusable-email-preview-component branch from 1c6b192 to c3cb3b0 Compare February 5, 2024 07:15
@BiswaViraj BiswaViraj force-pushed the nv-2997-reusable-chat-preview-component branch from 6ee5841 to 5ce224b Compare February 5, 2024 07:30
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.

❤️

import { previewChat } from '../../../../api/content-templates';
import { errorMessage } from '../../../../utils/notifications';

export function ChatPreview() {
Copy link
Contributor

Choose a reason for hiding this comment

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

lets do a small refactoring in this file after Biswa in his PR applies the suggestions #5143

Copy link
Member

Choose a reason for hiding this comment

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

I am merging this PR to my branch. I will handle this change with my refactor @LetItRock
There are many overlapping changes in both PRs, Merging now will help in avoiding conflicts

import { useNavigate, useParams } from 'react-router-dom';
import { useBasePath } from '../hooks/useBasePath';

export function PreviewEditOverlay() {
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like duplicated code apps/web/src/components/workflow/Preview/common/PreviewEditOverlay.tsx

import { forwardRef } from 'react';
import { IS_DOCKER_HOSTED } from '../../../config';

export function LocaleSelect({ locales, value, isLoading, readonly, setSelectedLocale }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicated component? apps/web/src/components/workflow/Preview/common/LocaleSelect.tsx

Copy link
Member

@BiswaViraj BiswaViraj Feb 5, 2024

Choose a reason for hiding this comment

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

I think these were left behind after my rebase, coz i moved these components to the newly created common folder.
Will delete these

@BiswaViraj BiswaViraj merged commit 5f93f0f into nv-2995-reusable-email-preview-component Feb 6, 2024
20 of 21 checks passed
@BiswaViraj BiswaViraj deleted the nv-2997-reusable-chat-preview-component branch February 6, 2024 10:36
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.

None yet

3 participants