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

ISSUE #5309 - Views in tickets comments UI #5447

Open
wants to merge 25 commits into
base: ISSUE_5326
Choose a base branch
from
Open

Conversation

The-Daniel
Copy link
Contributor

This fixes #5309

Description

  • Added the frontend for view support for ticket comments
  • Changed the EditComment component to use the same component as the bottom comment box

Test cases

  • Can create a comment with a viewpoint
  • Can create a comment with a viewpoint with highlights and clipping
  • Can create a comment consisting of only a viewpoint (no images of message)
  • Can click a viewpoint icon on an existing comment and see the viewpoint
  • Can edit a comment and change the viewpoint
  • Can edit a comment and delete the viewpoint
  • Can edit a comment without changing the viewpoint
  • Editing a comment works exactly as before in terms of being able to change/remove images
  • Should work logically with tabular view. I have removed create viewpoint functionality here and added a disabled viewpoint icon on comments so the user can see that a viewpoint is included with a comment but they cannot interact with it as they are not in the viewer

…tion. Cleared comment box viewpoint on submit
@@ -17,10 +17,11 @@

type IProps = {
className?: any;
onClick?: () => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

Hovering around the camera icon, the tooltip is triggered, but clicking does nothing

oggi.mp4

@@ -17,10 +17,11 @@

type IProps = {
className?: any;
onClick?: () => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

Editing a comment in staging sets the min comment height to one line and has a grey contour
image

Here the min height is much more and the contour is gone
image

author,
images = [],
metadata,
isCurrentUserComment = true,
hasMessage,
onUploadImages,
onDeleteImage,
onEditImage,
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also remove these from the props type and propagate it to the parent component

deleteCommentReply={() => setCommentReply(null)}
/>
)}
{!readOnly && <CreateCommentBox metadata={commentReply} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

If I click on "reply to comment", then delete the reply, then hit again "reply to comment", the reply is not visible.
This is only true if I do so on the same comment (I try to reply to)

oggi.mp4

commentReply: ITicketComment | null;
deleteCommentReply: () => void;
type CommentBoxProps = Pick<ITicketComment, 'message' | 'images' | 'view'> & {
onCancel?: () => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

As this component is used both by the create and the edit comment, can you rename this to something like "cancelEditing" or that reminds to it?

};

export default ({ className }: IProps) => (
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" className={className}>
export default (props: IProps) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

There's some differences in the UI for "create comment box". Like the position of the "send message" has changed as well as the initial height and padding of the textarea. Ignore this message if this was part of the new mock up

oggi.mp4

const ticketId = TicketsCardHooksSelectors.selectSelectedTicketId();
const currentUser = CurrentUserHooksSelectors.selectCurrentUser();
const isFederation = modelIsFederation(containerOrFederation);
const [commentreply, setReply] = useState(metadata);
Copy link
Contributor

Choose a reason for hiding this comment

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

The "r" should be capital in commentreply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants