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

refactor: replace PRSocialCard with githubs Opengraph image #889

Merged
merged 6 commits into from Feb 21, 2023

Conversation

OgDev-01
Copy link
Contributor

@OgDev-01 OgDev-01 commented Feb 20, 2023

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR:

Related Tickets & Documents

Fixes #883

Mobile & Desktop Screenshots/Recordings

image

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Feb 20, 2023

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit 840d904
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/63f4e5762ce47e000824788e
😎 Deploy Preview https://deploy-preview-889--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 20, 2023

βœ… Deploy Preview for oss-insights ready!

Name Link
πŸ”¨ Latest commit 840d904
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/63f4e57636a1780008b0546b
😎 Deploy Preview https://deploy-preview-889--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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.

PR Compliance Checks Passed!

@bdougie
Copy link
Member

bdougie commented Feb 20, 2023

mobile width/height needs to be address. image

Browser metadata
Path:      /user/bdougie
Browser:   Chrome 109.0.0.0 on Mac OS 10.15.7
Viewport:  559 x 830 @2x
Language:  en-US
Cookies:   Enabled

Open in BrowserStack

Open Deploy Preview Β· Mark as Resolved

@@ -20,7 +20,7 @@ const generateApiPrUrl = (
const trimmedUrl = url.trim();
const githubUrl = new URL(trimmedUrl.includes("https://") ? trimmedUrl : `https://${trimmedUrl}`);
const { pathname } = githubUrl;

console.log(pathname);
Copy link
Contributor

Choose a reason for hiding this comment

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

stray

next.config.js Outdated
@@ -7,7 +7,8 @@ module.exports = {
"images.unsplash.com",
"www.github.com",
"github.com",
"res.cloudinary.com"
"res.cloudinary.com",
"opengraph.githubassets.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

@OgDev-01
Copy link
Contributor Author

mobile width/height needs to be address. image

Browser metadata
Open Deploy Preview Β· Mark as Resolved

Fixed

const { isValid, url } = generateGhOgImage(githubLink);

return (
// eslint-disable-next-line @next/next/no-img-element
Copy link
Contributor

Choose a reason for hiding this comment

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

please stop disabling eslint rules and state your problems

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a nextjs warning to not use the native img tag in next https://nextjs.org/docs/messages/no-img-element

Copy link
Member

Choose a reason for hiding this comment

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

That seems aggressive for linter, but disabling it seems like a band-aid. Are there other alternatives @OgDev-01?

Copy link
Contributor Author

@OgDev-01 OgDev-01 Feb 21, 2023

Choose a reason for hiding this comment

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

Another alternative is to disable globally in the .eslintrc rules
image

Or try this solution from the official next docs
image

Copy link
Contributor

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

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

LGTM. Need to resolve solution on lint rule

@brandonroberts brandonroberts merged commit 3bfc5a4 into beta Feb 21, 2023
@brandonroberts brandonroberts deleted the opengraph-image branch February 21, 2023 15:44
github-actions bot pushed a commit that referenced this pull request Feb 21, 2023
## [1.30.0-beta.8](v1.30.0-beta.7...v1.30.0-beta.8) (2023-02-21)

### πŸ› Bug Fixes

* replace `PRSocialCard` component with GitHub OpenGraph image ([#889](#889)) ([3bfc5a4](3bfc5a4)), closes [#883](#883)
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.30.0-beta.8 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Feb 21, 2023
## [1.30.0](v1.29.0...v1.30.0) (2023-02-21)

### πŸ• Features

* add  highlights to user profile page ([#859](#859)) ([4b01376](4b01376)), closes [#830](#830)
* add dropdown for topics in Explore ([#877](#877)) ([9579902](9579902)), closes [#533](#533)
* disable create insight page button if the page name is missing ([#857](#857)) ([95da564](95da564)), closes [#852](#852)

### πŸ› Bug Fixes

* disable create page button only if insight page name is empty ([#893](#893)) ([ed52399](ed52399)), closes [#892](#892)
* hide non-functional elements in highlights card ([#881](#881)) ([ba1bd5e](ba1bd5e))
* rename 404 image file ([4e5171f](4e5171f))
* replace `PRSocialCard` component with GitHub OpenGraph image ([#889](#889)) ([3bfc5a4](3bfc5a4)), closes [#883](#883)
* reset text input fields when clear button is clicked ([#869](#869)) ([783098d](783098d)), closes [#858](#858)
* user profile interest pill UI fix ([#890](#890)) ([4cbff36](4cbff36))
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.30.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.30.0-beta.8](open-sauced/app@v1.30.0-beta.7...v1.30.0-beta.8) (2023-02-21)

### πŸ› Bug Fixes

* replace `PRSocialCard` component with GitHub OpenGraph image ([#889](open-sauced/app#889)) ([3bfc5a4](open-sauced/app@3bfc5a4)), closes [#883](open-sauced/app#883)
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.30.0](open-sauced/app@v1.29.0...v1.30.0) (2023-02-21)

### πŸ• Features

* add  highlights to user profile page ([#859](open-sauced/app#859)) ([4b01376](open-sauced/app@4b01376)), closes [#830](open-sauced/app#830)
* add dropdown for topics in Explore ([#877](open-sauced/app#877)) ([9579902](open-sauced/app@9579902)), closes [#533](open-sauced/app#533)
* disable create insight page button if the page name is missing ([#857](open-sauced/app#857)) ([95da564](open-sauced/app@95da564)), closes [#852](open-sauced/app#852)

### πŸ› Bug Fixes

* disable create page button only if insight page name is empty ([#893](open-sauced/app#893)) ([ed52399](open-sauced/app@ed52399)), closes [#892](open-sauced/app#892)
* hide non-functional elements in highlights card ([#881](open-sauced/app#881)) ([ba1bd5e](open-sauced/app@ba1bd5e))
* rename 404 image file ([4e5171f](open-sauced/app@4e5171f))
* replace `PRSocialCard` component with GitHub OpenGraph image ([#889](open-sauced/app#889)) ([3bfc5a4](open-sauced/app@3bfc5a4)), closes [#883](open-sauced/app#883)
* reset text input fields when clear button is clicked ([#869](open-sauced/app#869)) ([783098d](open-sauced/app@783098d)), closes [#858](open-sauced/app#858)
* user profile interest pill UI fix ([#890](open-sauced/app#890)) ([4cbff36](open-sauced/app@4cbff36))
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.

feat: use opengraph images for highlights
4 participants