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

fix: 4178 - current generated message options should be visible #4196

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Dec 3, 2024

Describe Your Changes

This pull request aims to enhance the current generate message by ensuring that the message options are always visible at the bottom.

Previously, these options were absolute positioned, which meant that the parent visible frame was not measured accordingly. This fix will remove the absolute class when this is a currently generated message. Instead, it will use flex orders to swap out the components’ order accordingly.

CleanShot 2024-12-03 at 13 25 30

Short thread
CleanShot 2024-12-03 at 13 44 36

Long thread
CleanShot 2024-12-03 at 13 45 01

Error message should not be capitalized like this:
CleanShot 2024-12-03 at 13 50 55

But like this
CleanShot 2024-12-03 at 13 50 48

Fixes Issues

Changes made

The code changes involve adjustments to the ChatItem and MessageContainer components.

In ChatItem:

  • Added an isCurrentMessage prop to the MessageContainer component, defaulting to false if undefined.

In TextMessage:

  • Modified the type definition of MessageContainer to include the isCurrentMessage boolean prop.
  • Removed the getCurrentChatMessagesAtom import and its usage.
  • Redesigned the structure of rendering message components, including toolbar placement and order:
    • A conditional class is applied to different elements based on whether the message is the current one and the user role.
    • Adjusted the order of elements for better UI organization.
  • The toolbar and content display logic has been restructured, making use of conditional ordering and visibility based on message context.

These changes seem to enhance the message display logic and manage the CSS class application dynamically based on the message context.

@github-actions github-actions bot added the type: bug Something isn't working label Dec 3, 2024
Copy link
Contributor

github-actions bot commented Dec 3, 2024

@louis-jan louis-jan requested a review from a team December 3, 2024 06:44
@louis-jan louis-jan merged commit 6244bbd into dev Dec 3, 2024
9 checks passed
@louis-jan louis-jan deleted the fix/4178-generated-messages-options-always-visible branch December 3, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants