Skip to content

Commit

Permalink
Functional thumbs up/down component (#8896)
Browse files Browse the repository at this point in the history
* Pass feedback correctly to ConversationMessageActions

* "messagethumb -> messageFEedback"

* Let ConversationMessageFeedbackSelectorProps be undefined

* Storybook story

* Try to remove front error

* Move FeedbackSelector out of ConversationMessageActions

* Feedbackselector storybook

* Lint

* Feedbackselector in page

* Remove ConversationMessageActions

* Export feedbackselector
  • Loading branch information
albandum authored Nov 26, 2024
1 parent 5ac8932 commit ca607bf
Show file tree
Hide file tree
Showing 8 changed files with 197 additions and 423 deletions.
4 changes: 2 additions & 2 deletions sparkle/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sparkle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dust-tt/sparkle",
"version": "0.2.324",
"version": "0.2.325",
"scripts": {
"build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
"tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
Expand Down
15 changes: 1 addition & 14 deletions sparkle/src/components/ConversationMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import React from "react";

import { Button } from "@sparkle/components";
import {
ConversationMessageActions,
ConversationMessageEmojiSelectorProps,
ConversationMessageThumbSelectorProps,
} from "@sparkle/components/ConversationMessageActions";
import { ConversationMessageContent } from "@sparkle/components/ConversationMessageContent";
import { ConversationMessageHeader } from "@sparkle/components/ConversationMessageHeader";
import { cn } from "@sparkle/lib/utils";
Expand All @@ -29,8 +24,6 @@ type ConversationMessageProps = {
buttons?: React.ReactElement<typeof Button>[];
children?: React.ReactNode;
citations?: React.ReactElement[];
messageEmoji?: ConversationMessageEmojiSelectorProps;
messageThumb?: ConversationMessageThumbSelectorProps;
name: string | null;
pictureUrl?: string | React.ReactNode | null;
renderName?: (name: string | null) => React.ReactNode;
Expand All @@ -47,8 +40,6 @@ export function ConversationMessage({
buttons,
children,
citations,
messageEmoji,
messageThumb,
name,
pictureUrl,
renderName = (name) => (
Expand Down Expand Up @@ -77,11 +68,7 @@ export function ConversationMessage({
{children}
</ConversationMessageContent>

<ConversationMessageActions
buttons={buttons}
messageEmoji={messageEmoji}
messageThumb={messageThumb}
/>
<div className="s-flex s-justify-end s-gap-2">{buttons}</div>
</div>
);
}
310 changes: 0 additions & 310 deletions sparkle/src/components/ConversationMessageActions.tsx

This file was deleted.

Loading

0 comments on commit ca607bf

Please sign in to comment.