Raathigesh / majestic

⚡ Zero config GUI for Jest
MIT License
7.49k stars 173 forks source link

collapse all tree control (#203) #204

Closed gregveres closed 4 years ago

gregveres commented 4 years ago

Add collapse all and expand all to the tree control

I have added two icons to the tree control icon area. The first collapses all the directories in the tree except the root directory and the other expands all the directories in the tree.

This makes it much easier to find a test file to work on. I also put the icons on the right side because that is where the "show failing tests only" icon appears and it seemed that they were similar types of operations. Then I realized that the collapse / expand don't make sense when the show failing test only icon is toggled so in that case I hide the icons.

And then because the icons vanish and appear, I rearranged their position to what I thought made more sense. Refresh: is always present and always in a fixed location on the right The most important button is show only failed so it shows up on the left as the first in the list when there are failed tests. Then the collapse/expand Then the coverage (which I think is the least likely to be used) and therefore in the "hardest spot to hit"

Raathigesh#203

gregveres commented 4 years ago

@Raathigesh I think I am done for a while. I think I am out of ideas on how to make Majestic better. With all of these changes, I am very happy with the workflow. I was using the orta.vscode-jest extension inside vscode to run the tests, but I was finding the workflow too clunky and it kept leaving outdated statuses in my editor and I couldn't tell when it was running to regenerate snapshots etc. So I came back to Majestic and with these workflow improvements, it is quite brilliant. I have been maintaining my own version because I want the collapsable tests, but I have worked out a branching scheme that allows me to easily produce a PR for your fork for all the new changes. (as you can tell by all the new PRs over the last couple of days).

Anyway, thank you for creating the tool and contributing to the community!

BTW, now that I have started to learn React more through working on this project, I find Vue way easier to use and understand. If you create a new project, you might want to give it a try. Vue 3 (with some much needed improvements for typescript) is in Beta now and it is the version you would want to learn. If you do, don't bother trying to user Vuex with typescript, it is a nightmare, well, it's not that much of a nightmare if you don't care about unit tests.

Raathigesh commented 4 years ago

@gregveres I'm glad you are finding the tool useful. I'm also really glad for all your contributions. People like you make project like these going. Thank you for all your effort.

I heard good things about Vue 3 and the composition API. I'll check it out soon :)