Skip to content

Make the Problem List Ordered & Leverage GraphQL API #626

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

Open
AerysNan opened this issue Sep 10, 2020 · 4 comments
Open

Make the Problem List Ordered & Leverage GraphQL API #626

AerysNan opened this issue Sep 10, 2020 · 4 comments

Comments

@AerysNan
Copy link

I don't know whether it's a bug or a feature. So I post it as a feature proposal anyway.

🚀 Feature Proposal

Make the problems on the left sidebar ordered by their problem ID.

Motivation

It may make people feel much better if they are ordered.

Contribution

There are two ways to solve this problem:

  1. We can sort the problem list after retrieving it from LeetCodeExecutor.listProblems by each problem's fid.
  2. Or we can make the result coming from leetcode-cli ordered. I investigate the source code of leetcode-tools/leetcode-cli a little bit and suppose the function plugin.getProblems is the one that should be updated. After gathering all the problems from different categories. We can sort them by their fid attributed.

Another issue

Besides, I notice that the graphql method in leetcode-cli is defined but not leveraged. Can we use graphql to get problems a specific company or tag? So that we can abandon the company.js file to avoid hardcoding tag and company information (enven now this information is not updated frequently though).


The issue section of leetcode-tools/leetcode-cli is closed but I find that that repository and this one are maintained by the same group of people. So I post this here. I would appreciate it if you could kindly consider my proposal.

@yihong0618
Copy link
Contributor

yihong0618 commented Sep 10, 2020

@AerysNan
Yes, LeetCode is changing to graphql step by step see #617. I think it would be wonderful if we change to graphql too.

@AerysNan
Copy link
Author

@AerysNan
Yes, LeetCode is changing to graphql step by step see #617. I think it would be wonderful if we change to graphql too.

@yihong0618 I see. So you're currently working on it? Or else I can write a PR for this (tag and company in GraphQL for a start).

@yihong0618
Copy link
Contributor

@AerysNan
Yes, LeetCode is changing to graphql step by step see #617. I think it would be wonderful if we change to graphql too.

@yihong0618 I see. So you're currently working on it? Or else I can write a PR for this (tag and company in GraphQL for a start).

I am not. I think you can write a PR for that, I change star problem to graphql recently

@AerysNan
Copy link
Author

@yihong0618 Okay, I think I'll deal with it in a week or so. Then I'll create a PR for leetcode-cli.

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

No branches or pull requests

2 participants