Allow files uploaded in AI chat box to be removed#18299
Open
LTan-101104 wants to merge 2 commits intotwentyhq:mainfrom
Open
Allow files uploaded in AI chat box to be removed#18299LTan-101104 wants to merge 2 commits intotwentyhq:mainfrom
LTan-101104 wants to merge 2 commits intotwentyhq:mainfrom
Conversation
…o StyledLink element
Resolve conflict
Contributor
Greptile SummaryFixed bug where clicking the remove button on file previews would also trigger navigation to the file URL. Wrapped the Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
Last reviewed commit: ccc1c8c |
Comment on lines
+46
to
+59
| <div | ||
| onMouseDown={(e) => e.stopPropagation()} | ||
| onClick={(e) => { | ||
| e.stopPropagation(); | ||
| e.preventDefault(); | ||
| onRemove(); | ||
| }} | ||
| > | ||
| <AvatarChip | ||
| Icon={IconX} | ||
| IconColor={theme.font.color.secondary} | ||
| divider="left" | ||
| /> | ||
| </div> |
Contributor
There was a problem hiding this comment.
Missing cursor: pointer on wrapper div - users won't get visual feedback that the remove button is clickable
Suggested change
| <div | |
| onMouseDown={(e) => e.stopPropagation()} | |
| onClick={(e) => { | |
| e.stopPropagation(); | |
| e.preventDefault(); | |
| onRemove(); | |
| }} | |
| > | |
| <AvatarChip | |
| Icon={IconX} | |
| IconColor={theme.font.color.secondary} | |
| divider="left" | |
| /> | |
| </div> | |
| <div | |
| onMouseDown={(e) => e.stopPropagation()} | |
| onClick={(e) => { | |
| e.stopPropagation(); | |
| e.preventDefault(); | |
| onRemove(); | |
| }} | |
| style={{ cursor: 'pointer' }} | |
| > | |
| <AvatarChip | |
| Icon={IconX} | |
| IconColor={theme.font.color.secondary} | |
| divider="left" | |
| /> | |
| </div> |
Contributor
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:47953 This environment will automatically shut down when the PR is closed or after 5 hours. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This aims to fix the bug mentioned in #18298
##Summary##
In
AgentChatFilePreview.tsx, wrap the original rightComponent with a div that would stop propagation event so this can avoid transferring event toStyledLinkand thus avoid redirecting, only triggering the remove event.