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

0.14.0 problem description #287

Closed
donifer opened this issue Apr 22, 2019 · 14 comments
Closed

0.14.0 problem description #287

donifer opened this issue Apr 22, 2019 · 14 comments
Assignees
Milestone

Comments

@donifer
Copy link

donifer commented Apr 22, 2019

🐛 Bug Report

Before 0.14.0 when I started a new problem the instructions would be in the new problem file commented out. But now I don't get the description in the problem's comments. I just get something like this without the description

/*
 * @lc app=leetcode id=35 lang=javascript
 *
 * [35] Search Insert Position
 */
/**
 * @param {number[]} nums
 * @param {number} target
 * @return {number}
 */
var searchInsert = function(nums, target) {
    
};

To Reproduce

Start any problem from the sidenav.

Expected behavior

The problems should include the description.

Extension Output

/*
 * @lc app=leetcode id=35 lang=javascript
 *
 * [35] Search Insert Position
 */
/**
 * @param {number[]} nums
 * @param {number} target
 * @return {number}
 */
var searchInsert = function(nums, target) {
    
};

[35] Search Insert Position  

https://leetcode.com/problems/search-insert-position/description/

Tags:   algorithms   array   binary-search 

Langs:  c   cpp   csharp   golang   java   javascript   kotlin   php   python   python3   ruby   rust   scala   swift 

* algorithms
* Easy (40.67%)
* Likes:    1225
* Dislikes: 170
* Total Accepted:    386.1K
* Total Submissions: 948.8K
* Testcase Example:  '[1,3,5,6]\n5'

<p>Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.</p>

<p>You may assume no duplicates in the array.</p>

<p><strong>Example 1:</strong></p>

<pre>
<strong>Input:</strong> [1,3,5,6], 5
<strong>Output:</strong> 2
</pre>

<p><strong>Example 2:</strong></p>

<pre>
<strong>Input:</strong> [1,3,5,6], 2
<strong>Output:</strong> 1
</pre>

<p><strong>Example 3:</strong></p>

<pre>
<strong>Input:</strong> [1,3,5,6], 7
<strong>Output:</strong> 4
</pre>

<p><strong>Example 4:</strong></p>

<pre>
<strong>Input:</strong> [1,3,5,6], 0
<strong>Output:</strong> 0
</pre>

Your Environment

  • os: macOS
  • extension settings:
{
  "leetcode.defaultLanguage": "javascript",
  "leetcode.showLocked": true,
  "leetcode.enableStatusBar": false,
  "leetcode.enableShortcuts": false
}
  • nodejs version: 10.15.1
  • vscode version: 1.33.1
  • extension version: 0.14.0
@Vigilans
Copy link
Contributor

We now rely on the preview panel to show problem description with better user experience:
demo1
demo2

Is there some reason for you to rely on the comment to provide description?

@donifer
Copy link
Author

donifer commented Apr 22, 2019

I normally have my problems in a repo and in my use case its nice to have the description in the file itself for future reference.

I can see myself going back to the problems a few years from now, maybe outside of vscode, and it would be nice to still have the description easily available.

Having an opt-in option to add the description to the file would be awesome!

@Vigilans Vigilans added this to the 0.14.1 milestone Apr 22, 2019
@Vigilans
Copy link
Contributor

I see. Will be back in next version.

@jdneo
Copy link
Member

jdneo commented Apr 23, 2019

@Vigilans

Since this is a breaking change we have introduced, how about we implement this and quickly release the 0.14.1 as a hotfix?

@Vigilans
Copy link
Contributor

Yes, I'm currently working on it (to provide an opt-in option)

@jdneo
Copy link
Member

jdneo commented Apr 23, 2019

@Vigilans Great! Thanks.

@juyse
Copy link

juyse commented Apr 24, 2019

Also there should be easier way to access preview panel when re-open the code file, something similar to the "submit" button ?

@jdneo
Copy link
Member

jdneo commented Apr 24, 2019

@juyse This is tracked by #286

@rockyzhang24
Copy link

When will you release 0.14.1 approximately? Is it possible to first release a version that at least supports this opt-in option to add descriptions in the problem's comment? Very desperate. Thanks a lot.

@jdneo
Copy link
Member

jdneo commented Apr 27, 2019

Hi @ALL

TL;DR

We have released 0.14.1 to address this issue. If you want to see the problem description in the code comments. Just open the VS Code Preferences search leetcode.showCommentDescription and turn it on.

Flow up

@Vigilans has also proposed a PR to provide more information during using the extension, and I believe it should be included in the next release.

Sorry for introducing a breaking change this time. And thank you for your patience.

@jdneo jdneo closed this as completed Apr 27, 2019
@miafan23

This comment has been minimized.

@Vigilans

This comment has been minimized.

@Vigilans

This comment has been minimized.

@jdneo

This comment has been minimized.

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

No branches or pull requests

6 participants