Skip to content

Commit

Permalink
Improved vertical indentation alignment (#21718)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanne-san authored Nov 25, 2024
1 parent 5e42c31 commit 5b70c7d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/comments-ui/src/components/content/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const RepliesContainer: React.FC<RepliesProps & {className?: string}> = ({commen
}

return (
<div className={`mb-4 ml-[-1.4rem] mt-7 sm:mb-0 sm:mt-8 ${className}`}>
<div className={`-ml-2 mb-4 mt-7 sm:mb-0 sm:mt-8 ${className}`}>
<Replies comment={comment} />
</div>
);
Expand Down Expand Up @@ -316,7 +316,7 @@ const CommentHeader: React.FC<CommentHeaderProps> = ({comment, className = ''})
</div>
{(isReplyToReply &&
<div className="mb-2 line-clamp-1 font-sans text-base leading-snug text-neutral-900/50 sm:text-sm dark:text-white/60">
<span>{t('Replied to')}</span>:<a className="ml-0.5 font-semibold text-neutral-900/60 transition-colors hover:text-neutral-900/70 dark:text-white/70 dark:hover:text-white/80" data-testid="comment-in-reply-to" href={`#${comment.in_reply_to_id}`} onClick={scrollRepliedToCommentIntoView}>{comment.in_reply_to_snippet}</a>
<span>{t('Replied to')}</span>:&nbsp;<a className="font-semibold text-neutral-900/60 transition-colors hover:text-neutral-900/70 dark:text-white/70 dark:hover:text-white/80" data-testid="comment-in-reply-to" href={`#${comment.in_reply_to_id}`} onClick={scrollRepliedToCommentIntoView}>{comment.in_reply_to_snippet}</a>
</div>
)}
</>
Expand Down
2 changes: 1 addition & 1 deletion apps/comments-ui/src/components/content/forms/EditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const EditForm: React.FC<Props> = ({comment, openForm, parent}) => {
}, [dispatchAction, openForm]);

return (
<div className='px-3 pb-2 pt-3'>
<div className='px-2 pb-2 pt-3'>
<div className='mt-[-16px] pr-3'>
<Form
close={close}
Expand Down
6 changes: 3 additions & 3 deletions apps/comments-ui/src/components/content/forms/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ const FormHeader: React.FC<FormHeaderProps> = ({show, name, expertise, replyingT
</div>
</div>
{isReplyingToReply && (
<div className="line-clamp-1 font-sans text-base leading-snug text-neutral-900/50 sm:text-sm dark:text-white/60" data-testid="replying-to">
<span>{t('Reply to')}:</span>&nbsp;<span className="font-semibold">{replyingToText}</span>
<div className="mt-0.5 line-clamp-1 font-sans text-base leading-snug text-neutral-900/50 sm:text-sm dark:text-white/60" data-testid="replying-to">
<span>{t('Reply to')}:</span>&nbsp;<span className="font-semibold text-neutral-900/60 dark:text-white/70">{replyingToText}</span>
</div>
)}
</Transition>
Expand Down Expand Up @@ -329,7 +329,7 @@ const Form: React.FC<FormProps> = ({comment, submit, submitText, submitSize, clo
return (
<form
ref={formEl}
className={`-mx-3 mb-7 mt-[-10px] rounded-md transition duration-200 ${isOpen ? 'cursor-default' : 'cursor-pointer'}`}
className={`-mx-2 mb-7 mt-[-10px] rounded-md transition duration-200 ${isOpen ? 'cursor-default' : 'cursor-pointer'}`}
data-testid="form"
onClick={focusEditor}
onMouseDown={preventIfFocused}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ReplyForm: React.FC<Props> = ({openForm, parent}) => {

return (
<div ref={setForm}>
<div className='mt-[-16px] pr-3'>
<div className='mt-[-16px] pr-2'>
<Form
close={close}
editor={editor}
Expand Down

0 comments on commit 5b70c7d

Please sign in to comment.