[go: up one dir, main page]

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

chore(dashboard): in-app editor polished inbox preview #7027

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

LetItRock
Copy link
Contributor

What changed? Why was the change needed?

In-App Editor polished Inbox preview component.
The designs between Inbox preview in the Configure Step Sidebar and the In-App Editor were not consistent, so I had to take a decision on a few things:

  • added in the header line between bell and Inbox buttons
  • used the font 12px for the subject
  • used body color gray

Did also additional improvements:

  • Inbox preview skeleton loader
  • Collapsible payload with nice animation

Screenshots

Screenshot 2024-11-16 at 00 06 55
Screenshot 2024-11-16 at 00 07 18

Screen.Recording.2024-11-16.at.00.37.54.mov
Screen.Recording.2024-11-16.at.00.22.57.mov

Copy link
linear bot commented Nov 15, 2024

Copy link
netlify bot commented Nov 15, 2024

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
🔨 Latest commit 8f7ce09
🔍 Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/6737dd96cceb520008851808
😎 Deploy Preview https://deploy-preview-7027--novu-stg-vite-dashboard-poc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -35,7 +35,7 @@ const AccordionTrigger = React.forwardRef<React.ElementRef<typeof AccordionPrimi
>
{children}
{withChevron && (
<ChevronDownIcon className="text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200" />
<RiArrowDownSLine className="text-foreground-400 h-4 w-4 shrink-0 transition-transform duration-200" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated accordion chevron

Comment on lines +51 to +59
{isLoading && !data && (
<div className="bg-neutral-alpha-50 z-20 mt-2 rounded-lg px-2 py-2">
<div className="mb-2 flex items-center gap-2">
<Skeleton className="h-5 min-w-5 rounded-full" />
<Skeleton className="h-5 w-full" />
</div>
<Skeleton className="h-5 w-full" />
</div>
)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added skeleton loading

<Link to="https://docs.novu.co/sdks/framework/typescript/steps/inApp" reloadDocument className="text-xs">
<span>Help?</span>
<>
<Separator />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved separator down, because we had two

<Code2 className="size-5" />
Configure preview
</div>
<InAppPreview data={previewData} isLoading={isPreviewLoading} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved preview up like it is in the designs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but I think it will be less jumpy if we will keep it under the payload, because the preview content height changes between the loading state and response

setPayloadError(String(e));
}
}}
<Accordion type="single" collapsible value={accordionValue} >
Copy link
Contributor Author

Choose a reason for hiding this comment

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

used the accordion with nice animation

Comment on lines +26 to +33
useEffect(() => {
setTimeout(() => {
if (contentRef.current) {
const rect = contentRef.current.getBoundingClientRect();
setHeight(rect.height);
}
}, 0);
}, [value]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

have to calculate accordion height because the CodeMirror editor with height: auto works weird and updates the height after first render

@SokratisVidros
Copy link
Contributor

I am merging this so that it's ready for the bug bashing session.

@SokratisVidros SokratisVidros merged commit 4211947 into next Nov 18, 2024
34 checks passed
@SokratisVidros SokratisVidros deleted the nv-4772-in-app-editor-polish-inbox-preview branch November 18, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants