Skip to content

Commit f5c0ceb

Browse files
authored
Camelcase seo things (codesandbox#3847)
* cmalecase things * fix daterTime * fix ts
1 parent f6466e4 commit f5c0ceb

File tree

9 files changed

+23
-30
lines changed

9 files changed

+23
-30
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/Comment.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ export const Comment = React.memo<{
8080
</Link>
8181
<Stack
8282
as="article"
83-
itemprop="comment"
84-
itemscope=""
85-
itemtype="http://schema.org/Comment"
83+
itemProp="comment"
84+
itemScope
85+
itemType="http://schema.org/Comment"
8686
align="flex-start"
8787
justify="space-between"
8888
marginBottom={4}
@@ -137,10 +137,10 @@ export const Comment = React.memo<{
137137
borderColor: 'sideBar.border',
138138
})}
139139
>
140-
<Text itemprop="text" block css={truncateText} marginBottom={2}>
140+
<Text itemProp="text" block css={truncateText} marginBottom={2}>
141141
{comment.content}
142142
</Text>
143-
<Text variant="muted" size={2} itemprop="commentCount">
143+
<Text variant="muted" size={2} itemProp="commentCount">
144144
{getRepliesString(comment.comments.length)}
145145
</Text>
146146
</Element>

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/Dialog/Reply.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export const Reply = ({ reply }: ReplyProps) => {
3131
>
3232
<Element
3333
as="article"
34-
itemprop="comment"
35-
itemscope=""
36-
itemtype="http://schema.org/Comment"
34+
itemProp="comment"
35+
itemScope
36+
itemType="http://schema.org/Comment"
3737
key={id}
3838
marginLeft={4}
3939
marginRight={2}
@@ -74,7 +74,7 @@ export const Reply = ({ reply }: ReplyProps) => {
7474
})}
7575
>
7676
{!editing ? (
77-
<Element itemprop="text">
77+
<Element itemProp="text">
7878
<Markdown source={content} />
7979
</Element>
8080
) : (

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/Dialog/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ const DialogAddComment: React.FC<{
205205
>
206206
<Stack gap={2} align="center">
207207
<Element
208-
itemprop="author"
209-
itemscope=""
210-
itemtype="http://schema.org/Person"
208+
itemProp="author"
209+
itemScope
210+
itemType="http://schema.org/Person"
211211
>
212212
<Avatar user={comment.user} />
213213
</Element>
214-
<Text size={3} weight="bold" variant="body" itemprop="name">
214+
<Text size={3} weight="bold" variant="body" itemProp="name">
215215
{comment.user.username}
216216
</Text>
217217
</Stack>
@@ -382,7 +382,7 @@ const CommentBody = ({ comment, editing, setEditing, hasReplies }) => {
382382
})}
383383
>
384384
{!editing ? (
385-
<Element itemprop="text">
385+
<Element itemProp="text">
386386
<Markdown source={comment.content} />
387387
</Element>
388388
) : (

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/components/AvatarBlock.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ export const AvatarBlock: React.FC<{ comment: CommentFragment }> = ({
88
comment,
99
}) => (
1010
<Stack gap={2} align="center">
11-
<Element itemprop="author" itemscope="" itemtype="http://schema.org/Person">
11+
<Element itemProp="author" itemScope itemType="http://schema.org/Person">
1212
<Avatar user={comment.user} />
1313
</Element>
1414
<Stack direction="vertical" justify="center" gap={1}>
15-
<Text itemprop="name" size={3} weight="bold" variant="body">
15+
<Text itemProp="name" size={3} weight="bold" variant="body">
1616
{comment.user.username}
1717
</Text>
1818
<Text
1919
size={2}
2020
variant="muted"
21-
itemprop="dateCreated"
22-
datetime={comment.insertedAt.toString()}
21+
itemProp="dateCreated"
22+
dateTime={comment.insertedAt.toString()}
2323
>
2424
{formatDistance(
2525
zonedTimeToUtc(comment.insertedAt, 'Etc/UTC'),

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/components/MultiComment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const MultiComment = ({ x, y, ids }: MultiCommentProps) => {
133133
size={2}
134134
weight="bold"
135135
paddingRight={2}
136-
itemprop="name"
136+
itemProp="name"
137137
css={css({
138138
color: 'sideBar.foreground',
139139
})}

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ export const Comments: React.FC = () => {
110110

111111
{currentComments.length ? (
112112
<List
113-
itemprop="mainEntity"
114-
itemscope=""
115-
itemtype="http://schema.org/Conversation"
113+
itemProp="mainEntity"
114+
itemScope
115+
itemType="http://schema.org/Conversation"
116116
ref={scrollRef}
117117
marginTop={4}
118118
css={{

packages/components/src/components/Element/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ export interface IElementProps {
1616
paddingTop?: number;
1717
paddingLeft?: number;
1818
paddingRight?: number;
19-
itemprop?: string;
20-
itemscope?: string;
21-
itemtype?: string;
2219
css?: Object;
2320
}
2421

packages/components/src/components/List/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import { Stack } from '../Stack';
55

66
type ListActionProps = {
77
disabled?: boolean;
8-
itemprop?: string;
9-
itemscope?: string;
10-
itemtype?: string;
118
};
129

1310
export const List = styled(Element).attrs({ as: 'ul' })(

packages/components/src/components/Text/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export interface ITextProps extends React.HTMLAttributes<HTMLSpanElement> {
2121
block?: boolean;
2222
maxWidth?: number | string;
2323
variant?: 'body' | 'muted' | 'danger';
24-
itemprop?: string;
25-
datetime?: string;
24+
dateTime?: string;
2625
}
2726

2827
export const Text = styled(Element).attrs({ as: 'span' })<ITextProps>(

0 commit comments

Comments
 (0)