bito-code-review[bot] commented on code in PR #37536:
URL: https://github.com/apache/superset/pull/37536#discussion_r2739145464
##########
docs/src/pages/community.tsx:
##########
@@ -188,39 +244,42 @@ const Community = () => {
subtitle="Get involved in our welcoming, fast growing community!"
/>
</BlurredSection>
- <StyledJoinCommunity>
- <List
- className="list"
- itemLayout="horizontal"
- dataSource={communityLinks}
- renderItem={({ url, title, description, image, ariaLabel }) => (
- <List.Item className="item">
- <List.Item.Meta
- avatar={
- <a
- className="title"
- href={url}
- target="_blank"
- rel="noreferrer"
- aria-label={ariaLabel}
- >
- <img className="icon" src={`/img/community/${image}`} />
- </a>
- }
- title={
- <a href={url} target="_blank" rel="noreferrer">
- <p className="title" style={{ marginBottom: 0 }}>
- {title}
- </p>
- </a>
- }
- description={<p className="description">{description}</p>}
- aria-label="Community link"
- />
- </List.Item>
- )}
- />
- </StyledJoinCommunity>
+ <section>
+ <StyledCardGrid>
+ {communityLinks.map(({ url, title, description, image }) => (
+ <a
+ key={title}
+ className="card"
+ href={url}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <img className="icon" src={`/img/community/${image}`} alt="" />
+ <div className="card-body">
+ <div className="title">{title}</div>
+ <div className="description">{description}</div>
+ </div>
+ </a>
+ ))}
+ </StyledCardGrid>
+ </section>
+ <BlurredSection>
+ <SectionHeader level="h2" title="Follow Us" />
+ <StyledSocialGrid>
+ {socialLinks.map(({ url, title, image }) => (
+ <a
+ key={title}
+ className="card"
+ href={url}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <img className="icon" src={`/img/community/${image}`} alt="" />
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Accessibility: Empty alt text</b></div>
<div id="fix">
The img element here has an empty alt attribute, which reduces accessibility
for screen readers. Consider providing a meaningful description, such as the
link title.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
<img className="icon" src={`/img/community/${image}`}
alt={title} />
````
</div>
</details>
</div>
<small><i>Code Review Run #4a28e7</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
docs/src/pages/community.tsx:
##########
@@ -188,39 +244,42 @@ const Community = () => {
subtitle="Get involved in our welcoming, fast growing community!"
/>
</BlurredSection>
- <StyledJoinCommunity>
- <List
- className="list"
- itemLayout="horizontal"
- dataSource={communityLinks}
- renderItem={({ url, title, description, image, ariaLabel }) => (
- <List.Item className="item">
- <List.Item.Meta
- avatar={
- <a
- className="title"
- href={url}
- target="_blank"
- rel="noreferrer"
- aria-label={ariaLabel}
- >
- <img className="icon" src={`/img/community/${image}`} />
- </a>
- }
- title={
- <a href={url} target="_blank" rel="noreferrer">
- <p className="title" style={{ marginBottom: 0 }}>
- {title}
- </p>
- </a>
- }
- description={<p className="description">{description}</p>}
- aria-label="Community link"
- />
- </List.Item>
- )}
- />
- </StyledJoinCommunity>
+ <section>
+ <StyledCardGrid>
+ {communityLinks.map(({ url, title, description, image }) => (
+ <a
+ key={title}
+ className="card"
+ href={url}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <img className="icon" src={`/img/community/${image}`} alt="" />
+ <div className="card-body">
+ <div className="title">{title}</div>
+ <div className="description">{description}</div>
+ </div>
+ </a>
+ ))}
+ </StyledCardGrid>
+ </section>
+ <BlurredSection>
+ <SectionHeader level="h2" title="Follow Us" />
+ <StyledSocialGrid>
+ {socialLinks.map(({ url, title, image }) => (
+ <a
+ key={title}
+ className="card"
+ href={url}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <img className="icon" src={`/img/community/${image}`} alt="" />
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Accessibility: Empty alt text</b></div>
<div id="fix">
Similar to the community links, this img element has an empty alt attribute,
impacting accessibility. Using the title provides a clear description.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
<img className="icon" src={`/img/community/${image}`}
alt={title} />
````
</div>
</details>
</div>
<small><i>Code Review Run #4a28e7</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]