Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Port/hackathons page#123

Merged
st0nebreaker merged 9 commits intomainfrom
port/hackathons
May 2, 2022
Merged

Port/hackathons page#123
st0nebreaker merged 9 commits intomainfrom
port/hackathons

Conversation

@st0nebreaker
Copy link
Contributor

@st0nebreaker st0nebreaker commented Apr 20, 2022

Closes #92 by porting over the Hackathons page

Removes custom hubspot scss override to eliminate any confusion for hubspot styles. It was only being applied to the hackathons form, anyway.

Test

Navigate to /hackathons

@st0nebreaker st0nebreaker self-assigned this Apr 21, 2022
@st0nebreaker st0nebreaker added the team/content-platform Content Platform Team related tickets. label Apr 21, 2022
@st0nebreaker st0nebreaker added this to the AR - Sprint 2 milestone Apr 21, 2022
@st0nebreaker st0nebreaker marked this pull request as ready for review April 21, 2022 19:37
@st0nebreaker st0nebreaker requested a review from bretthayes April 21, 2022 19:37
@st0nebreaker st0nebreaker added the added-mid-sprint Tickets added mid sprint label Apr 22, 2022
Copy link
Contributor

@bretthayes bretthayes left a comment

Choose a reason for hiding this comment

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

Just one minor change. Thanks for porting this! 🚀

<div className="border-top border-light-9">
<p className="pt-4">
Get started with the{' '}
<a target="blank" href="https://docs.sourcegraph.com/admin/install/docker">
Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing to change here, but noting this for a fun fact.

MDN now states:

"Note: Setting target="_blank" on elements now implicitly provides the same rel behavior as setting rel="noopener" which does not set window.opener. See browser compatibility for support status."

Check this for older context. Typically we'd add either noopener or noreferrer but it looks like we don't have to anymore (considering which browsers we support via browserlist) since the spec has changed. Also, since this links out to a page that we own, we wouldn't use noreferrer here either since we'd want to track analytics.

cc: @katjuell @zlonko

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting! So we can remove noreferrer now too? I removed any noopeners in the re-platform repo to fall in line with this

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I just noticed something! We actually have to change this lol. Our linting wasn't warning us because these should be set to target="_blank". So it looks like we have to set rel="noreferrer" here after all. Sorry for the confusion!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't it weird the lint doesn't work on blank, just _blank ? (blank vs _blank article). Should/can we adjust our lint rules to allow for noreferrer since it's an update? It seems like blank is a bit more handy than _blank to not cause duplicate tabs to open. What do you think?

Copy link
Contributor

@bretthayes bretthayes Apr 28, 2022

Choose a reason for hiding this comment

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

That's a good question! I would say let's go with _blank for UX and for default linting purposes instead of extending/overriding eslint. If a user wants to navigate around in the new tab that was created but also open another tab of the same link, then _blank would be preferred. Since this is linking to documentation, I would say it's easy for a user to get lost in the docs if we just brought them back to the link's href that had blank as the target.

Also, this is thought provoking with some interesting good/bad reasons/scenarios haha. It almost makes me want to omit all _blank/blank targets and let the user decide their linking behaviour with cmd/ctrl+click lol. Our target market is mostly technical folks but I thought this was lolz:

"Branding branding branding! Eyeballs baby. Metrics. ENGAGEMENT." 🤣

What do you think?

Copy link
Contributor Author

@st0nebreaker st0nebreaker May 2, 2022

Choose a reason for hiding this comment

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

Wow, interesting. I didn't know this was such an opinionated topic, hah! Lol @ engagement 😆 . I usually right-click or cmd-click to open a new tab when I want one anyways on <a>'s. 🤔 Maybe we should just remove all our _blank attributes on links then? I could see Marketing not loving that, to keep a user on our site, which albeit is a bad reason from that article 😬

I agree we shouldn't override the default lint too. I'll put up a change to adhere to our _blank attribute for now!

Good point for the docs site being a good reason for multiple duplicate tabs being open.

Copy link
Contributor

@bretthayes bretthayes left a comment

Choose a reason for hiding this comment

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

Just a little bit of cleanup. Thanks for tackling some tech debt here around the site!! Woo! 🙌🏻

@st0nebreaker st0nebreaker requested a review from bretthayes May 2, 2022 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

added-mid-sprint Tickets added mid sprint team/content-platform Content Platform Team related tickets.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Port over hackathons page

2 participants