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

Add link to logo #962

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 32 additions & 25 deletions Client/src/Components/Sidebar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,32 +173,39 @@ function Sidebar() {
}}
>
<Stack pt={theme.spacing(6)} pb={theme.spacing(12)} pl={theme.spacing(8)}>
<Stack direction="row" alignItems="center" gap={theme.spacing(4)}>
<Stack
justifyContent="center"
alignItems="center"
minWidth={theme.spacing(16)}
minHeight={theme.spacing(16)}
pl="1px"
fontSize={18}
color="white"
sx={{
position: "relative",
backgroundColor: theme.palette.primary.main,
borderRadius: theme.shape.borderRadius,
userSelect: "none",
}}
>
BU
<a
href="https://github.com/bluewave-labs/bluewave-uptime"
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: "none", color: "inherit" }}
>
khd33j marked this conversation as resolved.
Show resolved Hide resolved
<Stack direction="row" alignItems="center" gap={theme.spacing(4)}>
<Stack
justifyContent="center"
alignItems="center"
minWidth={theme.spacing(16)}
minHeight={theme.spacing(16)}
pl="1px"
fontSize={18}
color="white"
sx={{
position: "relative",
backgroundColor: theme.palette.primary.main,
borderRadius: theme.shape.borderRadius,
userSelect: "none",
}}
>
BU
</Stack>
<Typography
component="span"
mt={theme.spacing(2)}
sx={{ opacity: 0.8, fontWeight: 500 }}
>
BlueWave Uptime
</Typography>
</Stack>
<Typography
component="span"
mt={theme.spacing(2)}
sx={{ opacity: 0.8, fontWeight: 500 }}
>
BlueWave Uptime
</Typography>
</Stack>
</a>
Comment on lines +176 to +208
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Yo, this link's lookin' fresh, but we gotta make sure it's tight, ya feel me?

Aight, so we got this new link to the GitHub repo, and it's pretty dope. But check it, I got a few things we might wanna tweak:

  1. That style prop is straight fire, but we might wanna consider movin' that styling to a separate CSS class. Keep it clean, you know what I'm sayin'?

  2. We're using target="_blank", which is cool for openin' in a new tab, but security's important, fam. We should add rel="noopener noreferrer" to prevent potential security issues. It's like puttin' a lock on your door, you feel me?

  3. The link text "BlueWave Uptime" is chillin' inside a Typography component. That's cool, but we might wanna think about makin' it more obvious it's a link. Maybe add an underline on hover or somethin' to make it pop?

  4. For accessibility, we could throw in an aria-label to describe what the link does. It's like givin' directions to someone who can't see the street signs, you know?

Here's a little remix of the code to show what I mean:

 <a 
   href="https://github.com/bluewave-labs/bluewave-uptime" 
   target="_blank" 
-  rel="noopener noreferrer" 
+  rel="noopener noreferrer"
+  aria-label="Visit BlueWave Uptime GitHub repository"
-  style={{ textDecoration: "none", color: "inherit" }}
+  className="sidebar-brand-link"
 >
   {/* ... existing content ... */}
 </a>

And then in your CSS:

.sidebar-brand-link {
  text-decoration: none;
  color: inherit;
}

.sidebar-brand-link:hover .brand-text {
  text-decoration: underline;
}

What you think? These tweaks could make this link even more fire while keepin' it secure and accessible. It's like addin' some extra sauce to mom's spaghetti, you know what I'm sayin'?

<IconButton
sx={{
position: "absolute",
Expand Down