mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
[CORL-125] change wording for showing hidden comments (#2180)
* chore: change wording for showing hidden comments * test: update snapshots
This commit is contained in:
@@ -5,3 +5,7 @@
|
||||
padding-left: var(--spacing-unit);
|
||||
padding-bottom: var(--spacing-unit);
|
||||
}
|
||||
|
||||
.showMoreButton {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
+3
-3
@@ -71,16 +71,16 @@ const ConversationThread: StatelessComponent<
|
||||
<Circle hollow className={styles.loadMore}>
|
||||
<Flex alignItems="center" itemGutter="half">
|
||||
<Localized
|
||||
id="comments-conversationThread-showHiddenComments"
|
||||
id="comments-conversationThread-showMoreOfThisConversation"
|
||||
$count={props.remaining}
|
||||
>
|
||||
<Button
|
||||
className={styles.showMoreButton}
|
||||
onClick={props.loadMore}
|
||||
disabled={props.disableLoadMore}
|
||||
id="comments-conversationThread-showHiddenComments"
|
||||
variant="underlined"
|
||||
>
|
||||
Show hidden comments
|
||||
Show more of this conversation
|
||||
</Button>
|
||||
</Localized>
|
||||
{props.remaining > 1 && <Counter>{props.remaining}</Counter>}
|
||||
|
||||
+6
-6
@@ -44,15 +44,15 @@ exports[`with 2 remaining parent comments renders correctly 1`] = `
|
||||
>
|
||||
<Localized
|
||||
$count={2}
|
||||
id="comments-conversationThread-showHiddenComments"
|
||||
id="comments-conversationThread-showMoreOfThisConversation"
|
||||
>
|
||||
<ForwardRef(forwardRef)
|
||||
className="ConversationThread-showMoreButton"
|
||||
disabled={false}
|
||||
id="comments-conversationThread-showHiddenComments"
|
||||
onClick={[Function]}
|
||||
variant="underlined"
|
||||
>
|
||||
Show hidden comments
|
||||
Show more of this conversation
|
||||
</ForwardRef(forwardRef)>
|
||||
</Localized>
|
||||
<withPropsOnChange(Counter)>
|
||||
@@ -108,15 +108,15 @@ exports[`with 2 remaining parent comments renders with disabled load more 1`] =
|
||||
>
|
||||
<Localized
|
||||
$count={2}
|
||||
id="comments-conversationThread-showHiddenComments"
|
||||
id="comments-conversationThread-showMoreOfThisConversation"
|
||||
>
|
||||
<ForwardRef(forwardRef)
|
||||
className="ConversationThread-showMoreButton"
|
||||
disabled={true}
|
||||
id="comments-conversationThread-showHiddenComments"
|
||||
onClick={[Function]}
|
||||
variant="underlined"
|
||||
>
|
||||
Show hidden comments
|
||||
Show more of this conversation
|
||||
</ForwardRef(forwardRef)>
|
||||
</Localized>
|
||||
<withPropsOnChange(Counter)>
|
||||
|
||||
+3
-4
@@ -76,9 +76,8 @@ exports[`renders conversation thread 1`] = `
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-alignCenter"
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeRegular Button-colorRegular Button-variantUnderlined"
|
||||
className="BaseButton-root Button-root ConversationThread-showMoreButton Button-sizeRegular Button-colorRegular Button-variantUnderlined"
|
||||
disabled={false}
|
||||
id="comments-conversationThread-showHiddenComments"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -87,7 +86,7 @@ exports[`renders conversation thread 1`] = `
|
||||
onTouchEnd={[Function]}
|
||||
type="button"
|
||||
>
|
||||
SHOW HIDDEN COMMENTS
|
||||
Show More of This Conversation
|
||||
</button>
|
||||
<span
|
||||
className="Counter-root Counter-colorInherit"
|
||||
@@ -272,7 +271,7 @@ exports[`renders conversation thread 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`shows hidden comments 1`] = `
|
||||
exports[`shows more of this conversation 1`] = `
|
||||
<div
|
||||
className="ConversationThread-root"
|
||||
data-testid="comments-permalinkView-conversationThread"
|
||||
|
||||
@@ -99,7 +99,7 @@ it("renders conversation thread", async () => {
|
||||
expect(within(conversationThread).toJSON()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("shows hidden comments", async () => {
|
||||
it("shows more of this conversation", async () => {
|
||||
const conversationThread = await waitForElement(() =>
|
||||
within(testRenderer.root).getByTestID(
|
||||
"comments-permalinkView-conversationThread"
|
||||
@@ -108,13 +108,13 @@ it("shows hidden comments", async () => {
|
||||
|
||||
// Show hidden comments.
|
||||
within(conversationThread)
|
||||
.getByText("SHOW HIDDEN COMMENTS")
|
||||
.getByText("Show More of This Conversation")
|
||||
.props.onClick();
|
||||
|
||||
// Wait until button disappears.
|
||||
await wait(() =>
|
||||
expect(
|
||||
within(conversationThread).queryByText("SHOW HIDDEN COMMENTS")
|
||||
within(conversationThread).queryByText("Show More of This Conversation")
|
||||
).toBeNull()
|
||||
);
|
||||
|
||||
|
||||
@@ -74,11 +74,8 @@ comments-editCommentForm-editRemainingTime = Edit: <time></time> remaining
|
||||
comments-editCommentForm-editTimeExpired = Edit time has expired. You can no longer edit this comment. Why not post another one?
|
||||
comments-editedMarker-edited = Edited
|
||||
comments-showConversationLink-readMore = Read More of this Conversation >
|
||||
comments-conversationThread-showHiddenComments =
|
||||
{ $count ->
|
||||
[1] SHOW HIDDEN COMMENT
|
||||
*[other] SHOW HIDDEN COMMENTS
|
||||
}
|
||||
comments-conversationThread-showMoreOfThisConversation =
|
||||
Show More of This Conversation
|
||||
|
||||
comments-permalinkView-currentViewing = You are currently viewing a
|
||||
comments-permalinkView-singleConversation = SINGLE CONVERSATION
|
||||
|
||||
Reference in New Issue
Block a user