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(Teckie): add Teckie support #9280

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

bakzkndd
Copy link
Contributor

@bakzkndd bakzkndd commented Feb 13, 2025

Description

Add support for Teckie. A dutch computer sales, repair and support company. Has support for all pages. Checkout page just shows the status for the base url to protect privacy.
Sidenote: didn't run yarn format but instead npm run lint:fix. yarn format didn't work for me and was told in the Discord server to use npm run lint:fix instead. Not sure if the PR template needs updating.

Acknowledgements

Screenshots

Proof showing the creation/modification is working as expected Example 1: ![image](https://github.com/user-attachments/assets/82b7052e-db4d-43ec-8763-6570b1568120) ![image](https://github.com/user-attachments/assets/4d944f8c-f558-43cf-a2e1-2561a6de8157)

Example 2:
image
{65482BDE-C5B9-49D8-AAB4-572921A8C4AB}
{EDBFE21A-70CD-4A95-8F1E-BCD94CE958EF}

websites/T/Teckie/metadata.json Outdated Show resolved Hide resolved
"url": "teckie.nl",
"version": "1.0.0",
"logo": "https://i.imgur.com/Gagky0u.png",
"thumbnail": "https://i.imgur.com/fmINPqW.png",
Copy link
Contributor

Choose a reason for hiding this comment

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

Change to a wide screenshot or promotional image.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how wide should it be then? like what aspect ratio?

Copy link
Contributor

Choose a reason for hiding this comment

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

Try something 16:9 or 1280x720

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah im clueless at this point, check is also failing because ✖ pmd CDN_TOKEN environment variable is required. So not sure if it's to do with my thumbnail

Copy link
Member

Choose a reason for hiding this comment

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

You can ignore that check for now, devs are working to resolve it

@bakzkndd bakzkndd requested a review from Kuriel23 February 13, 2025 18:30
Copy link
Contributor

@darkvillager2 darkvillager2 left a comment

Choose a reason for hiding this comment

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

For English see below.
---------
Hallo Maatje,

Bedankt voor je PR. Ik heb wat opmerkingen/vragen hierover. Graag de verzochte wijzigingen maken.

Mocht je vragen hebben, stel ze in dit PR of op discord (@dark_ville)

Groet,
Mede Kaaskop
Dark
-----------
Hello Mate,

Thanks for your PR, i have some questions/notes about it. Please make the changes as requested.

If you have any questions feel free to ask in this pr or on discord (@dark_ville)

~Dark

const presenceData: PresenceData = {
largeImageKey: ActivityAssets.Logo,
details: 'Bezoekt Teckie',
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
},
{ pathname } = document.location;

Comment on lines +17 to +20
let page = document.location.pathname.substring(7).replaceAll('-', ' ')
page = page.charAt(0).toUpperCase() + page.slice(1)
presenceData.details = 'Bekijkt een pagina'
presenceData.state = `Pagina: ${page}`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let page = document.location.pathname.substring(7).replaceAll('-', ' ')
page = page.charAt(0).toUpperCase() + page.slice(1)
presenceData.details = 'Bekijkt een pagina'
presenceData.state = `Pagina: ${page}`
presenceData.details = 'Bekijkt een pagina'
presenceData.state = `Pagina: ${document.title.split('– Teckie')?.[0]}`

Comment on lines +25 to +31
let productTitle = document.getElementsByClassName('product__title')[0]
if (productTitle) {
productTitle = productTitle.getElementsByTagName('h1')[0]
if (productTitle) {
presenceData.state = `Product: ${productTitle.textContent}`
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let productTitle = document.getElementsByClassName('product__title')[0]
if (productTitle) {
productTitle = productTitle.getElementsByTagName('h1')[0]
if (productTitle) {
presenceData.state = `Product: ${productTitle.textContent}`
}
}
presenceData.state = document.querySelector('.product__title')?.textContent?.trim()?.replace("\n ", "") ?? ""

Comment on lines +36 to +42
let policyTitle = document.getElementsByClassName('shopify-policy__title')[0]
if (policyTitle) {
policyTitle = policyTitle.getElementsByTagName('h1')[0]
if (policyTitle) {
presenceData.state = `Policy: ${policyTitle.textContent}`
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let policyTitle = document.getElementsByClassName('shopify-policy__title')[0]
if (policyTitle) {
policyTitle = policyTitle.getElementsByTagName('h1')[0]
if (policyTitle) {
presenceData.state = `Policy: ${policyTitle.textContent}`
}
}
presenceData.state = document.querySelector('.shopify-policy__title')?.textContent ?? ""

Comment on lines +47 to +50
const blogTitle = document.getElementsByClassName('article-template__title')[0]
if (blogTitle) {
presenceData.state = `Blog: ${blogTitle.textContent}`
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const blogTitle = document.getElementsByClassName('article-template__title')[0]
if (blogTitle) {
presenceData.state = `Blog: ${blogTitle.textContent}`
}
presenceData.state = document.querySelector('[itemprop="headline"]')?.textContent.replace(/\n /gm, "") ?? ""

@bakzkndd
Copy link
Contributor Author

Hello from mobile, I've been and still am sick with the flu. Will make changes once I'm better.

},
"url": "teckie.nl",
"version": "1.0.0",
"logo": "https://i.postimg.cc/FHdK56R2/my-ONfuy-waifu2x-art-noise1-scale-waifu2x-art-noise1-scale-waifu2x-art-noise1-scale.png",

Check failure

Code scanning / PMD

Makes sure all images (logo and URLs) are exactly 512x512 pixels Error

})

enum ActivityAssets { // Other default assets can be found at index.d.ts
Logo = 'https://i.postimg.cc/FHdK56R2/my-ONfuy-waifu2x-art-noise1-scale-waifu2x-art-noise1-scale-waifu2x-art-noise1-scale.png',

Check failure

Code scanning / PMD

Makes sure all images (logo and URLs) are exactly 512x512 pixels Error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants