Skip to content

0.14.0 problem description #287

Closed
Closed
@donifer

Description

@donifer

🐛 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

Activity

Vigilans

Vigilans commented on Apr 22, 2019

@Vigilans
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

donifer commented on Apr 22, 2019

@donifer
Author

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!

added this to the 0.14.1 milestone on Apr 22, 2019
Vigilans

Vigilans commented on Apr 22, 2019

@Vigilans
Contributor

I see. Will be back in next version.

jdneo

jdneo commented on Apr 23, 2019

@jdneo
Member

@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

Vigilans commented on Apr 23, 2019

@Vigilans
Contributor

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

jdneo

jdneo commented on Apr 23, 2019

@jdneo
Member

@Vigilans Great! Thanks.

juyse

juyse commented on Apr 24, 2019

@juyse

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

jdneo

jdneo commented on Apr 24, 2019

@jdneo
Member

@juyse This is tracked by #286

self-assigned this
on Apr 26, 2019
rockyzhang24

rockyzhang24 commented on Apr 27, 2019

@rockyzhang24

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.

7 remaining items

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @jdneo@miafan23@juyse@rockyzhang24@Vigilans

      Issue actions

        0.14.0 problem description · Issue #287 · LeetCode-OpenSource/vscode-leetcode