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

Explorer: Can't create folder on newly created folder #78153

Closed
joaomoreno opened this issue Jul 30, 2019 · 9 comments · Fixed by #79383
Closed

Explorer: Can't create folder on newly created folder #78153

joaomoreno opened this issue Jul 30, 2019 · 9 comments · Fixed by #79383
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues verified Verification succeeded
Milestone

Comments

@joaomoreno
Copy link
Member

  1. Empty explorer
  2. Click New Folder top action, name the folder and create it
  3. Click New Folder again

Input box comes and goes.

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues labels Jul 30, 2019
@isidorn isidorn added this to the July 2019 milestone Jul 30, 2019
@isidorn
Copy link
Contributor

isidorn commented Jul 31, 2019

Can not repro.
Do you click somewhere in the meantime?

What I can repro thought is that sometimes canceling the empty input box creates a folder with the previous name :hmm

@isidorn isidorn modified the milestones: July 2019, August 2019 Jul 31, 2019
@jeanp413
Copy link
Contributor

The first error is because the newly created element has stale set to true (in asyncDatatree) which triggers a refresh of the node which happens in the next event loop and the workaround in the explorerViewer with the settimeout doesn't work in that case

Second error is because the explorerService.setEditable() and explorerService.select() launch async operations and there is a "race condition" in IndexTreeModel because the splice method(which will be called by setEditable removing the new item) is being called after the _setCollapsed method(which is called by select)

@jthistle
Copy link

I have a fix for this! It's very simple. I will post my PR soon.

@isidorn
Copy link
Contributor

isidorn commented Aug 16, 2019

Thanks for the feedback and for providing a PR.
However triying out your PR the issue is not always fixed for me.

Due to that and issues appearing from time to time I have decided to go back to our original approach and @joaomoreno and me devised.
It has some issues (I think this one), but covers this case and many most other painful ones.

So please try it out in vscode insiders tomorrow and let us know how it behaves.

The whole blur event handling is rather tedius. An alternative would be to not react on blur events, which might be incosistent with how native explroer behave.

@jthistle
Copy link

Ah, ok. I thought it seemed too simple a fix. Is it down to a race condition then? From what I could tell in the Chrome debugger it certainly looked a lot like that.

@isidorn
Copy link
Contributor

isidorn commented Aug 16, 2019

It is timing between blur events, creating new templates by the tree, adn dipososing of old templates. Not fun.

@jthistle
Copy link

No, race conditions are never fun...

@jeanp413
Copy link
Contributor

jeanp413 commented Aug 17, 2019

With b8974b0 applied I can repro #72626 again and this one:

explorerbug_

Edit: also found this

bugtreeexpandsinglefolder

@jeanp413
Copy link
Contributor

Created a PR that seems to fix all of the reported issues in case it's needed.

renesansz added a commit to renesansz/vscode that referenced this issue Aug 19, 2019
* Use bat on Windows

* debt: use action bar from the panel view

* Fix microsoft/vscode-remote-release/issues/1066

* fix label

* fix: event's jsdoc typo

* Move cleanRemoteAuthority function to common location

* microsoft#78168 strict init

* microsoft#78168 strict init

* microsoft#78168 strict init

* fixes microsoft#77797

* Split formatted text renderer into own file

* Split MarkdownRenderOptions from FormattedTextRenderOptions

* Rename htmlContentRenderer -> markdownRenderer

* web - do not loose state on unload

* open exter - move into opener service

* add extension kind web

* add action only in remote

* Improve microsoft#79047 fix after feedback

* use `vscode-remote`-endpoint when importing scripts

* Added preserveCase in search side bar

* test build schedule

* Revert "test build schedule"

This reverts commit 9d4ba37.

* better check for worker/web extension

* debt - IExtensionDescription#main should be relative like all other file references

* move windowsIPC => common

* very basic support to load multiple files

* microsoft#69108
Move IWorkspaceStatsService to common
Introduce a simple service for web

* Fix microsoft#69108

* tests -remove unused services

* Move getHashedRemotesFromUri to IWorkspaceStatsService

* add and use `getWorkerBootstrapUrl`, don't use default worker factory anymore

* - use strings for view zone ids
- make it unlikely that a new view instance would accept a view zone id from a previous view instance
- remove that the find widget removes a view zone id from another view
(fixes microsoft#71745)

* add `extensionHostWorker` entry point, fixes https://github.com/microsoft/vscode-internalbacklog/issues/738

* Update uglify-es (microsoft#79044)

* Revert "Work around minifier bug (microsoft#79044)"

This reverts commit 6371cad.

* expose product configuration in product service

* use product service

* Simplify terminal commands

* Improve typings, use async

* uses getSelections and simplifed the return

* Update distro

* migrate keys from legacy layout microsoft#79020

* fix tests

* Register driver

* Teardown on sigint

* Update markdown grammar

* Still show fix all actions for fix-all actions that can fix multiple errors with multple different diagnostics

* Base web user data dir off normal one

* Update distro

* Use new browser none arg

* Make sure we compare fully normalized error codes when checking for fix all actions

* Don't include closing ] in folded range

Fixes microsoft#79142

* Register Remote Explorer when there are contributions.

* Use undefined instead of null in IEditorOpeningEvent and IOpenEditorOverride

* Change openEditor to return undefined instead of null

For microsoft#70020

* Improve jsdoc section of walkthrough

Fixes microsoft#71023

As discussed in microsoft#75033

* Add installer assets for OSS (microsoft#79045)

* Revert "Update uglify-es (microsoft#79044)"

This reverts commit e677c03.

* Work around minifier bug (microsoft#79044)

* debt - avoid some StrictNullOverride

* debt - move issue service out of common since it will not be supported in the web for now

* debt - make diagnostics service only accessible from node

* update distro

* tests - add more debug for randomly failing getUntitledWorkspacesSync

* fix mispell

* 💄

* update distro

* Simplify tasks command

* docs: fix type (microsoft#79129)

* web - add todo for potentially cyclic dependency

* Multi-select in custom tree view (microsoft#78625)

Part of microsoft#76941

The first argument is now the element that the command is executed on. The second argurment is an array of the other selected items

* update distro

* web - enable feedback contribution

* debt - more tests diag

* do not look for executables in web

* Move extension tips service to web and enable extension recommendations

* use process.setImmediate

* minor polish

* fixes microsoft#79168

* fix exports trap

* debug: prevent expression.value being undefined

fixes microsoft#79169

* update distro

* web - implement credentials provider and add API

* web - workaround clipboard issue with selection type

* better exports trapping

* fix process layer-breaker

* debt - avoid process dependency in common

* rawDebugSession: do not use process

microsoft#79210

* remove proposed API `vscode.commands.onDidExecuteCommand`

* Fix microsoft#79206

* callStack view:  do not show thread when there is only one to be compact

fixes microsoft#79121

* fix compile error

* inline product configuration in produt service

* update distro

* Fix strict error

* fix tests

* Do not expand session tree node when selecting it

fixes microsoft#79184

* Fix issue with CustomExecutions not working through tasks.executeTask (microsoft#79132)

* Do not clear out the map, and track the provided execution during execute task

* Clear provided custom executions map on execution complete

* Save last custom execution

* use safeprocess env

* Remove click code from puppeteer driver, move interfaces to common

* Reduce diff

* fix typos

* web - reuse require interceptor logic

* remove FakeCommonJSSelf

* Fix dispatch keybinding when called multiple times

* Fix layer breakage

Part of microsoft#79210

* Fixes microsoft#78975: Look for autoclosing pairs in edits coming in from suggestions

* Remove smoke tests from CI for now

* Reduce diff

* Add setting to toggle new octicon style

* Update distro

* Move puppeteer to dev deps

* Run smoke tests for darwin/linux in CI

* Make display name consistent

* Fix indent

* Improve token regex

* Add connectionToken

* update distro

* Update search stop icon

* Update checkmark so they look more like a ✓

* introduce RemoteAuthorities

* remote explorer and contribution under proposed api

* Disable smoke tests on Linux

Puppeteer needs special user setup in order to launch

* Strict init

microsoft#78168

* Strict init and mark events readonly

microsoft#78168

* Remove extra null checks in coalesce

The type system should catch these now

* Add telemetry+warning for webviews that don't have a content security policy

Fixes microsoft#79248

* Fixing comment

* Update distro

* Update distro

* Don't dispose of added object in already disposed of case

Fixes microsoft#77192

See microsoft#77192 for discussion

* Mark readonly

* Use const enums

* Marking fields readonly

* Remove webview svg whitelist

This is no longer required

* Removing test for disposable store

We have disabled this behavior

* build - disable smoketest

* Enable new Octicons style by default

* fix web platform check

* better worker error logging

* make sure to prepend vs/nls

* 💄

* fix: keep the two "Copy Path" behavior consistent

When using remote, this "Copy Path" function of SearchAction will keep the remote prefix while the FileCommand will not.

Change-Id: Ide00d2da5a695d0adbe87622643c7a600dd46432

* Load Octicons through ts instead of css import

* update distro

* Fixes microsoft#79166

* web - synchronise global state changes

* explorer input black magic

fixes microsoft#78153

* fix microsoft#72417

* Fix smoke tests

* Revert "build - disable smoketest"

This reverts commit c23cacd.

* Scope new variable to a string

* Fallback to default when cwd var cannot be resolved

Fixes microsoft#79281

* fix error when dismissing snippets picker

* add fetch file system provider

* add IStaticExtensionsService, add `staticExtensions` to embedder API

* make staticExtensions optional

* Indicate web in smoke test step

* Update octicon css logic

* Fix Octicon icons on Linux

* debug: introduce data breakpoints

* Introduce and adopt asCSSUrl

* Fixes microsoft/vscode-remote-release#687:
- remove ipc message that passes over the resolved authority
- don't go through the protocol handler when hitting 127.0.0.1

* Introduce machine overridable setting

* Seti uses TS-icon for jsonc-language. Fixes microsoft#78261

* Pick up TS rc

* [email protected]

- Better align search with how monaco does it

Fixes microsoft#78281

* Format file

* Update distro

* Remove not null suppression

* Use dispoablestore

* Use closure instead of parameters

* Use type for IExtensionPointHandler and mark array readonly

* Marking arrays readonly in ExtensionPointUserDelta

* web - storage/lifecycle 💄

* Fix microsoft#79326, cleanup rendering Octicons bugs on Windows/Linux

* fix Markdown Preview scroll remains same after clicking on some other link

* Fix trivial zsh completion typo

* Improvements

* Drop Configure Trusted Domains command for now

* 💄

* Drop details & on -> from

* Address feedbacks

* Fix services

* Storage instead of setting. Add command for configuring

* Don't add star to quickpick

* Update UX

* Build errors and test failures

* 💄

* debt - fix some layer breakers

* Added buildReplaceStringWithCasePreserved generic function to be  used in both search side and the find side

* 💄 imports

* refactor: GlobalStorageDatabaseChannel should dependents in IStorageMainService (microsoft#79387)

* 💄

* build - have different worker extension host entrypoint, copy worker bootstrap file

* fix microsoft#76573

* fix path

* update distro

* Localization test fails on remote smoketest. Fixes microsoft#78412

* Fix microsoft/vscode-remote-release/issues/1027

* fix scope when falling back to original load function

* Wording update

* Fix: Markdown Preview scroll remains same after clicking on some other link microsoft#78465

Improves the behavior on how markdown preview behaves when clicking a link

* microsoft#79429

* TSLint: show a warning when accessing node.js globals in common|browser (microsoft#79222)

* trivial first cut

* document where globals are from

* improve rule detection

* fix "gulp tslint" task

* share rules

* enable more rules

* also add a rule for DOM

* Update trustedDomain default config

* tslint - disable some rules with comments (microsoft#79454)

* Drop unneeded action registration

* update distro

* Support using csharp in markdown preview to identify c# code blocks

* sync diagnostics, fixes microsoft#47292

* fixes microsoft#79280

* tests - more diagnostics for getUntitledWorkspaceSync() random failures

* debt - reduce dependencies diff to E6 branch

* update distro

* debt - menubar service should not live in common (microsoft#79181)

* distro

* Unify trusted domain language and use quick pick item id

* Update browser telemetry common properties

* microsoft#79454 Fix warnings

* Fix microsoft#79429

* Fix hygiene check
@mjbvz mjbvz added the verified Verification succeeded label Aug 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues verified Verification succeeded
Projects
None yet
5 participants