-
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(dashboard): Activity feed panel #7238
Conversation
✅ 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. |
TODO: Missing backend support for digest events widget | ||
{job.type === 'digest' && job.digest?.events && ( | ||
<ActivityDetailCard title="Digest Events" expandable={true} open> | ||
<div className="min-w-0 max-w-full font-mono"> | ||
{job.digest.events.map((event: DigestEvent, index: number) => ( | ||
<div key={index} className="group flex items-center gap-2 rounded-sm px-1 py-1.5 hover:bg-neutral-100"> | ||
<RiCheckboxCircleLine className="text-success h-4 w-4 shrink-0" /> | ||
<div className="flex items-center gap-2 truncate"> | ||
<span className="truncate text-xs text-neutral-500">{event.type}</span> | ||
<span className="text-xs text-neutral-400"> | ||
{`${format(new Date(job.updatedAt), 'HH:mm')} UTC`} | ||
</span> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</ActivityDetailCard> | ||
)} */} |
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.
How much effort is to enrich the API accordingly?
); | ||
} | ||
|
||
function LoadingSkeleton() { |
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.
If we have it as a separate component, then whenever we update the layout of the panel or change anything in there, we will need to "remember" to make the same adjustments for the skeleton. Ideally, we should reuse the same layout component or have skeletons embedded into the ActivityPanel.
|
||
export function ActivityDetailCard({ title, timestamp, expandable = false, open, children }: ActivityDetailCardProps) { | ||
const [internalOpen, setInternalOpen] = useState(false); | ||
const isExpanded = open ?? internalOpen; |
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.
We have the accordion primitive that we can use for the nice animation. However, I don't know if it will require doing some updates.
What changed? Why was the change needed?
This PR utilized the existing API without any extra changes there.
Not in scope: Filters, Workflow Editor connectivity
Screenshots
https://www.loom.com/share/0923c3816bbc49fbae494c24266d5c98
Expand for optional sections
Related enterprise PR
Special notes for your reviewer