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

[Advice] About the design of "combine include/exclude patterns" #48090

Closed
szyhf opened this issue Apr 18, 2018 · 4 comments
Closed

[Advice] About the design of "combine include/exclude patterns" #48090

szyhf opened this issue Apr 18, 2018 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) search Search widget and operation issues

Comments

@szyhf
Copy link

szyhf commented Apr 18, 2018

  • VSCode Version: 1.22.2
  • OS Version: macOS

In release 1.22.2, a new design is approve :

# Search include/exclude patterns

The boxes for include and exclude patterns in the Search view have been combined into a single box. The functionality is exactly the same, except that an exclude pattern must be prefixed with !. For example, !*.js will skip searching files that have a .js extension.

That case some problem, in most cases, what user want to exclude is more stable, like .vscode, .git, but what user want include is changing frequently.

While combine in the same box, every time user use right click on folder and chose search in ... will clear all patterns inside search box, especially the exclude patterns.

I know the setting of files.exclude but it‘s not visualized, sometimes that will case some lost of search results in special cases.

How about adding a setting to set if combine include/exclude patterns .

Thanks for reviewing.

@vscodebot
Copy link

vscodebot bot commented Apr 18, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the search Search widget and operation issues label Apr 18, 2018
@roblourens
Copy link
Member

While combine in the same box, every time user use right click on folder and chose search in ... will clear all patterns inside search box, especially the exclude patterns.

What if it would only replace the include patterns when you do that, and leave the exclude patterns in the box? Would that help?

I know the setting of files.exclude but it‘s not visualized, sometimes that will case some lost of search results in special cases.

Do you mean lost search results, because people don't realize that the results are excluded by files.exclude and search.exclude?

@szyhf
Copy link
Author

szyhf commented Apr 19, 2018

Tanks for replying !


While combine in the same box, every time user use right click on folder and chose search in ... will clear all patterns inside search box, especially the exclude patterns.

What if it would only replace the include patterns when you do that, and leave the exclude patterns in the box? Would that help?

I'm wondering its difficult to deal with patterns of complex like !*.a,*.A,!*.b,*.B, the UI logic looks little wired.


I know the setting of files.exclude but it‘s not visualized, sometimes that will case some lost of search results in special cases.

Do you mean lost search results, because people don't realize that the results are excluded by files.exclude and search.exclude?

Yes, user might ignore the exclude in setting, especially setting of vscode has multi-level.


I think setting is working for some stable usage. In search, some exclude is stable like ./.git, but some are not deal to the project struct. The former can use the setting, but the latter might not suitable.

While searching for something, I think display the condition deal to the project clearly is important, but patterns might not easy to recognize.


In my opinion, I felt that the combine patterns makes user easier to copy and paster there setting, although I don't know the reason of combine it.

Actually I think to read and modify a little bit long patterns in one-line box is easy to make mistake.

So if it's really need to combine, how about make the input box of patterns can be a multi-line box. And user can type in multi-line to satisfy there require of search, for example:

!./.git,!./.vscode,!./.idea,
./server/model,./server/config,
!./server/rpc_msg,
./server/

Then while using search in ... in right click of folder, just replace the include patterns and leave the exclude patterns, for example:

!./.git,!./.vscode,!./.idea,
!./server/rpc_msg,
./server/new/path/include

Very pleasure to receive your reply, thank you ~

@roblourens
Copy link
Member

Thanks for the feedback. I think a multiline box would help but wouldn't solve all the issues that people have with the new layout. I've moved back to split include/exclude boxes for now, you can try it out in the next Insiders build. More discussion at #46315

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Apr 19, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

2 participants