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: Leetcode Company Tagged 🗂️ #530

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

Conversation

cjohnson74
Copy link
Contributor

Description ✏️

Closes #516

  • Added the Leetcode logo to the following images folder.
  • Added Leetcode tagged link to companies page.
  • Implemented w/ Tooltip component.
  • Added 'leetcode' to query function argument.
    Screenshot 2024-09-27 at 4 40 09 AM

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

Copy link
Collaborator

@tomas-salgado tomas-salgado left a comment

Choose a reason for hiding this comment

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

Great work @cjohnson74! Just left some comments regarding changing some naming, but otherwise the code and the functionality looks great to me!

@@ -154,6 +155,10 @@ export default function CompanyPage() {
{company.levelsFyiSlug && (
<LevelsFyiLink slug={company.levelsFyiSlug} />
)}

{company.leetcodeTagged && (
<LeetcodeTaggedLink leetcode_tagged={company.leetcodeTagged} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's change the naming from leetcode_tagged to slug, so we can have consistency with the pattern used for the Levels.fyi link as well

export async function up(db: Kysely<any>) {
await db.schema
.alterTable('companies')
.addColumn('leetcode_tagged', 'varchar')
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's change leetcode_tagged to leetcode_tagged_slug to follow the pattern that's used with levels_fyi_slug

Copy link
Collaborator

@tomas-salgado tomas-salgado left a comment

Choose a reason for hiding this comment

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

We just need to complete the refactoring of the name (from leetcodeTagged to leetcodeTaggedSlug) in a couple more places and then this will be good to go!

@@ -46,6 +46,7 @@ export async function loader({ params, request }: LoaderFunctionArgs) {
'companies.imageUrl',
'companies.name',
'companies.levelsFyiSlug',
'companies.leetcodeTagged',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we're changing the name to leetcodeTaggedSlug in the database, we need to have that changed reflected here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 159 to 160
{company.leetcodeTagged && (
<LeetcodeTaggedLink slug={company.leetcodeTagged} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

we also need to change the name in these two lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And done!

Copy link
Collaborator

@tomas-salgado tomas-salgado left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@tomas-salgado tomas-salgado added the Ready for Rami ✅ This PR is ready for a final review label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Rami ✅ This PR is ready for a final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leetcode Tagged 👨‍💻
2 participants