IDE files sub-tabs static 20 limit

Issue #1995 resolved
Alex Savchuk created an issue

Not possible to open js file if lwc folder contains more than 20 files. Current limit show only 20 in bottom sub-tabs panel. When I try to open some after 20 (it is sorted by alphanumeric) it shows wrong one.

Comments (8)

  1. Scott Wells repo owner

    Alex, can you elaborate on the contents of the LWC component(s) running into this limitation? I don't need the contents of files, but if you could perhaps say how many .html, .js. and .css files are in the component bundle respectively, and of those, how many are under the component root directory vs. under subdirectories. I mentioned previously that the limit was 20, but it looks like it's actually 20 of each of those file types.

    I'm still planning to provide a solution for you, but I want to make sure I'm properly modeling the issue so I deliver a working fix for you the first time if possible. Thanks!

  2. Alex Savchuk reporter

    Hi. In my case, it is just a util js folder in the root LWC project folder. Wich contains only 26 js files. No CSS, no HTML.

  3. Scott Wells repo owner

    To clarify, I just created an LWC component with 30 additional .html/.js/.css files for a total of 90 additional files beyond the component's standard file of each type and -meta.xml file. The editor shows the standard files plus the first 20 (alphabetically by name) of each of the other three file types, e.g.:

    Issue_1995.png

    So I'm pretty sure that the component that is encountering this limitation has >20 of a single file type, likely .js based on the "Not possible to open js file..." part of your issue description. I just wanted to clarify that to be the case, though.

  4. Scott Wells repo owner

    Okay, I've just committed what I hope to be a good fix for this. Basically instead of having pre-allocated banks for 20x .html, 20x .js, and 20x .css, I have a single pre-allocated bank for 60x any of those three. That will support your use case (which I think is likely the more common one) where there's a disproportional number of files of one type--almost certainly JavaScript--vs. the same number of files of each type. And it supports that without having to increase the number of pre-allocated tabs.

    Moreover, this allows the tabs to be ordered in a more natural manner with tabs for files with the same base name (i.e., without file extension) being grouped together. Here's what it looks like:

    Issue_1995_Fix.png

    This change will be included in the next build, likely released on Thursday of this week.

  5. Log in to comment