sapling
sapling copied to clipboard
Not able to traverse more than 1 level of hierarchy
Describe the bug Sapling is not able to traverse more than one level of my component tree. I have tried it on several of my projects.
To Reproduce Steps to reproduce the behavior:
- Clone this repo: https://github.com/PublicisSapient/accelerated-news
- Choose the file
src/App.tsx
- You will see that only the top level children are shown.

I thought maybe this is because the pages are embedded in routes. So I tried the same thing with a single page: src/Pages/SignUpPage/SignUpPage.tsx
. This is what I got:

Note that traversal stopped at TextField, even though there are components under that.
Expected behavior Full traversal of the component tree.
Screenshots See above.
Desktop (please complete the following information):
- OS: [e.g. iOS] MacOS
- Browser [e.g. chrome, safari] Chrome
- Version [e.g. 22] 94
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
I am having the same problem. Would love for it to work!
I also have this issue.
After some investigation, I've find the issue on the getFileName
method, the wrong behavior occurs when try to get a import from an index file like: import {...} from './pages';
it tries to search in a folder by the fileName, but in this case we're using a import direct from index, so the fileName will not match with the correct file.
e.g looking for SignUpPage
it will try to find in the fileArray the /pages.(j|t)sx?$/
regex, that will returns undefined
variables | Method |
---|---|
![]() |
![]() |
Any update on this?
I would love to use this extension, but until this is fixed it's not of much use.
It's been almost a year since anyone has commented on this, but it is still a problem for me today.
One year later...