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

Not able to traverse more than 1 level of hierarchy #85

Open
nareshbhatia opened this issue Oct 11, 2021 · 7 comments
Open

Not able to traverse more than 1 level of hierarchy #85

nareshbhatia opened this issue Oct 11, 2021 · 7 comments

Comments

@nareshbhatia
Copy link

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:

  1. Clone this repo: https://github.com/PublicisSapient/accelerated-news
  2. Choose the file src/App.tsx
  3. You will see that only the top level children are shown.

CleanShot 2021-10-11 at 19 34 24@2x

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:

CleanShot 2021-10-11 at 19 41 44@2x

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.

@schoinh
Copy link

schoinh commented Oct 13, 2021

I am having the same problem. Would love for it to work!

@horne3754sg
Copy link

I also have this issue.

@antoniel
Copy link

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
image image

MajorLift added a commit to MajorLift/react-component-tree that referenced this issue Nov 24, 2021
- BUG: The unescaped period functions as a wildcard character instead of a plain dot as intended.
- Inside a string or template literal, a period preceded by a single backslash (escape sequence) will be parsed as an unescaped period.
- The string representation of \. is the double-escaped literal "\\."

see also: issue oslabs-beta#85
MajorLift added a commit to MajorLift/react-component-tree that referenced this issue Nov 30, 2021
* test 14: Folders as modules / batch exports / barrel files
- export * from './File'
import { File } from './dir'

* test 15:
- Variable declaration with..
a) object destructuring alias assignment
b) array destructuring
- Import Decaration with...
* glob import and namespace specifier

* See: Issue oslabs-beta#85, oslabs-beta#99
MajorLift added a commit to MajorLift/react-component-tree that referenced this issue Nov 30, 2021
- passes test 14
- glob exports in general not yet supported

Fixes: Issue oslabs-beta#85
See: Issue oslabs-beta#99
MajorLift added a commit to MajorLift/react-component-tree that referenced this issue Nov 30, 2021
- passes test 14
- glob exports in general not yet supported

Fixes: Issue oslabs-beta#85
See: Issue oslabs-beta#99
@jdgreenberger
Copy link

Any update on this?

@damiangreen
Copy link

I would love to use this extension, but until this is fixed it's not of much use.

@khahn-hw
Copy link

khahn-hw commented May 3, 2023

It's been almost a year since anyone has commented on this, but it is still a problem for me today.

@krummja
Copy link

krummja commented Jun 18, 2024

One year later...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants