-
Notifications
You must be signed in to change notification settings - Fork 239
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: add custom prompt buttons to post content #4039
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
packages/shared/src/components/post/customPrompts/PromptButtons.tsx
Outdated
Show resolved
Hide resolved
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.
Nice work, some minor comments
packages/shared/src/components/post/common/PostClickbaitShield.tsx
Outdated
Show resolved
Hide resolved
icon={ | ||
<PromptIcon | ||
size={IconSize.XSmall} | ||
className={!active && `text-accent-${flags.color}-default`} |
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.
This will break tailwind, we should probably actually do a manual map function that fully qualifies or store full classnames?
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.
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.
Fixed in 0b3fe5a
threshold={50} | ||
/> | ||
</Tab> | ||
<Tab label={PromptDisplay.SimplifyIt}>simplify</Tab> |
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 can load these from the query now.
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.
I refactored it a bit. Either it didn't work react wise, or TypeScript weren't happy.
So now there's less available Tabs, as we can actually just re-use them when for streaming the content.
@@ -14,6 +15,20 @@ export type Prompt = { | |||
flags?: PromptFlags; | |||
}; | |||
|
|||
export enum PromptDisplay { |
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.
This can't really be a enum right considering they are dynamic and will change over time.
Co-authored-by: Chris Bongers <[email protected]>
Changes
Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
AS-905
Preview domain
https://as-905-post.preview.app.daily.dev