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

feat: update social links #1295

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Conversation

HussainTaj-arbisoft
Copy link
Contributor

@HussainTaj-arbisoft HussainTaj-arbisoft commented Jan 11, 2024

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/3298
Closes https://github.com/mitodl/hq/issues/3195

Description (What does it do?)

This PR:

  • Adds a LinkedIn link to the homepage's STAY CONNECTED WITH OCW card.
  • Updates icons for LinkedIn and Twitter.

Screenshots (if appropriate):

Screenshot 2024-01-11 at 4 44 00 PM Screenshot 2024-01-11 at 4 44 05 PM

How can this be tested?

  1. Navigate to your local ocw-hugo-themes directory.
  2. Switch to branch hussaintaj/3298-new-social-icons
  3. Run
    yarn start www
    
  4. Open http://localhost:3000.
  5. Observe the card STAY CONNECTED WITH OCW near the bottom.
  6. Expect to see a LinkedIn social link.
  7. Expect all social links to work correctly.
  8. Expect the twitter icon to be updated.
  9. Observe the social links in the footer.
  10. Expect to see new icons for Twitter and LinkedIn.
  11. Expect all social links to work.

@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 11:45 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 11:45 Inactive
Copy link

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 12:12 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 12:12 Inactive
.locator(".footer-main-content")
.getByRole("link", { name, exact: true })
await expect(link).toBeVisible()
await expect(link).toHaveAttribute("href", url)
Copy link
Contributor Author

@HussainTaj-arbisoft HussainTaj-arbisoft Jan 11, 2024

Choose a reason for hiding this comment

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

Originally, I simulated a click and ran assertions on the navigation (i.e. open tab's URL). However, these external links can have uncontrollable behaviors.

For instance, I can open the Instagram link locally without being signed in but, in GitHub Action runner, this URL redirects to the login screen.

For that reason, I have now placed an assertion on the href attribute. Feel free to suggest improvements.

@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 13:25 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 11, 2024 13:25 Inactive
@pt2302 pt2302 self-assigned this Jan 12, 2024
@pt2302 pt2302 self-requested a review January 12, 2024 14:21
@@ -81,7 +81,7 @@
</li>
<li>
<a class="img-link" href="https://twitter.com/MITOCW" target="_blank">
<img class="footer-social-icon" src="{{ partial "get_asset_webpack_url.html" "images/Twitter.png" }}" alt="twitter" />
<img class="footer-social-icon" src="{{ partial "get_asset_webpack_url.html" "images/x-formerly-twitter-black.png" }}" alt="twitter" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if the alt text should be "x" or "x (formerly twitter)"?

🤢

Copy link
Contributor

@pt2302 pt2302 left a comment

Choose a reason for hiding this comment

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

Looks good to me! (Agree with @ChristopherChudzicki's suggestion above).

@HussainTaj-arbisoft
Copy link
Contributor Author

The www build issue blocks this PR. https://www.ocw-openmatters.org is still unreachable.

@github-actions github-actions bot temporarily deployed to pull request January 17, 2024 14:19 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 17, 2024 14:20 Inactive
@HussainTaj-arbisoft HussainTaj-arbisoft merged commit bac80c6 into main Jan 18, 2024
6 checks passed
@odlbot odlbot mentioned this pull request Jan 18, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants