Skip to content

Add configuration option for follow-up prompts & fix overflow in FollowUpPromptBubble#330

Open
charlyhue wants to merge 1 commit intoFlowiseAI:mainfrom
greenwhey:feature/follow-up-prompts-customization
Open

Add configuration option for follow-up prompts & fix overflow in FollowUpPromptBubble#330
charlyhue wants to merge 1 commit intoFlowiseAI:mainfrom
greenwhey:feature/follow-up-prompts-customization

Conversation

@charlyhue
Copy link

This PR introduces a configuration option for follow-up prompts and improves the layout of the FollowUpPromptBubble component.

Changes:

  • Added a new configuration option to customize follow-up prompts.
  • Removed max-content from FollowUpPromptBubble to allow proper line breaks and prevent text overflow.

Why:

These changes make the follow-up prompt behavior more flexible and improve UI rendering for long prompt texts.

- Introduce configuration option for follow-up prompts
- Remove max-content on FollowUpPromptBubble to allow line break (and prevent overflow)
class="px-2 py-1 whitespace-pre-wrap max-w-full chatbot-host-bubble border"
data-testid="host-bubble"
style={{
width: 'max-content',
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @charlyhue, these are really awesome updates for the chat experience! Ive found an edge case where if the chat is the small experience (and not the Full screen experience) and the follow up prompts are all quite long, it can take up majority of the screen real estate, leaving the chat not scrollable and gives the user not much choice (but to probably choose the last or second last prompt). Rather than wrapping the whole width of the prompt how about we set it to a certain width and add ellipsis, and make the full text visible on hover?

<span title={props.prompt} ... style={{ ...
  width: 'min-content',
  'max-width': '280px', // example max width
  'text-overflow': 'ellipsis',
... 
>

Copy link
Contributor

@chloebyun-wd chloebyun-wd left a comment

Choose a reason for hiding this comment

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

Great additions, left one comment

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