-
Notifications
You must be signed in to change notification settings - Fork 668
Develop new function to show the content of problem #127
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
Conversation
…em" is changed to "show to solve problem"
… Webview to show the description in HTML format
@qyazhang Thank you for contribution, would you mind to fix the CI failure first? |
Thanks, I will fix it later (I'm sorry that I'm not so familiar with Typescript and this testing tool) |
Actually, I prefer creating an issue before sending out the PR. In the issue, we can discuss the implementation first. Also this could be a chance to get feedback from the community. |
I'm sorry I may need further time to solve the problem of "vsce package", I will close it and issue/PR again. Sorry for troubling |
@qyazhang Don't worry, it's fine. What kind of problem are you meeting with. I'm willing to help if I can. |
Thanks for your kind. |
@qyazhang What error message were you get? |
It show the error message like this
And the details in log is shown like this
(I'm sorry I'm busy at other things and didn't get further developement) |
This PR is started from the consideration that when I use this extension to solve leetcode problem, I always want to first check the description of the problem and then consider whether I will start to solve it or not. But right now "show problem" function only assume I want to solve it and create a source code file, and I could only see the problem description in that.
So I start to create a new "show problem" function to replace the original one, which could get the context of problem description and show it in a new window instead of creating a source code file.
What have done:
create new "showProblem" function
rename original "showProblem" function to "showToSolveProblem"
send post request to leetcode's graphql and open a WebView to show the description content referring to leetcode-cli
add "show problem" to right-click menu, and rename original "show problem" to "solve problem"
What haven't done:
Haven't add the "showProblem" support for "leetcode-cn.com"
Haven't add the left-click event to problem items to directly open the description content when we left-click (I've tried to implement it, and inherit LeetCodeNode from TreeItem and give command to each LeetCodeNode, but it didn't work. It may need further discussion)