Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Conversation

@feltech
Copy link
Contributor

@feltech feltech commented Jul 24, 2018

Add "Explorer: Locate Current Buffer" command palette item.

Split from #2429 at the last point that CI tests were passing, plus a merge of master.

This means there is a missing fix for symlinked files that are detected as outside the workspace when they're actually within it, as well as a few missing additional tests.

feltech and others added 15 commits July 15, 2018 19:47
Add command palette option "Explorer: Locate Current Buffer" that will
expand directories down to the current buffer, then select the
corresponding file/directory.
Prevent sending pointless `SELECT_FILE_SUCCESS` actions if we're not
actually in the process of selecting a file (or haven't selected the
file we expect yet).
* Keep `registerCommand` calls together in the `index.tsx` and unify
their style.
* Use the `SidebarManager` to first ensure the Explorer is shown, before
then locating the file in the `ExplorerSplit`.
* Strangely, `SidebarManager.setActiveEntry` will close the sidebar if
the Explorer is already open and you try to open it again.
* So only trigger opening the Explorer if it's not already visible.
* `epicMiddleware.replaceEpic` internally dispatches a
`@@redux-observable/EPIC_END` action, which gets saved to the
`mockStore`'s
actions list. Every test case's `afterEach` thus adds an additional
action to this actions list. This pollutes all subsequent stores created
via the `mockStore` factory, which is odd.
* This was accounted for in the YANK_AND_PASTE_EPICS test by assuming
"an init action is sent first", which is not the case.
* So move the setup that is only for the SET_ROOT_DIRECTORY test inside
it's own `describe` block, remove the unnecessary `replaceEpic` call,
and fix the test for expected number of actions.
locate_buffer_in_explorer

# Conflicts:
#	browser/test/Services/Explorer/ExplorerStoreTests.ts
# Conflicts:
#	browser/src/Services/Explorer/index.tsx
@feltech
Copy link
Contributor Author

feltech commented Jul 24, 2018

I hope that by merging in master I haven't ended up in the same back and forth with flaky integration tests.

@codecov
Copy link

codecov bot commented Jul 25, 2018

Codecov Report

Merging #2456 into master will increase coverage by 0.42%.
The diff coverage is 97.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2456      +/-   ##
==========================================
+ Coverage   43.27%   43.69%   +0.42%     
==========================================
  Files         341      341              
  Lines       13425    13461      +36     
  Branches     1765     1771       +6     
==========================================
+ Hits         5809     5882      +73     
+ Misses       7340     7321      -19     
+ Partials      276      258      -18
Impacted Files Coverage Δ
browser/src/Services/Explorer/ExplorerView.tsx 60% <100%> (+8.14%) ⬆️
browser/src/Services/Explorer/ExplorerStore.ts 80.14% <100%> (+11.76%) ⬆️
browser/src/UI/components/VimNavigator.tsx 72.91% <85.71%> (+10.69%) ⬆️
...rowser/src/Services/Explorer/ExplorerFileSystem.ts 90.56% <0%> (+5.66%) ⬆️
browser/src/Services/Notifications/Notification.ts 16.66% <0%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ecbd4af...20b6d5c. Read the comment docs.

@feltech
Copy link
Contributor Author

feltech commented Jul 26, 2018

Closing this as the more advanced PR #2429 is now passing.

@feltech feltech closed this Jul 26, 2018
@feltech feltech deleted the feature/locate_current_buffer_in_explorer branch July 26, 2018 12:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant