-
Notifications
You must be signed in to change notification settings - Fork 163
Support views located in components directory, as well as sub-directories like packs/app/views #591
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
Conversation
…ries like packs/app/views Fixes danmayer#590
eeb3e4c to
5788647
Compare
|
@danmayer Thanks for merging so quick! Any chance of getting a version bump so I don't need to point at master on my project? |
|
I just ran into this issue and am glad to see it's already fixed thanks to @dkniffin 🙏 Would also love a new release that includes this fix! |
|
@dkniffin I tried pulling the gem from GitHub to test this feature. Unfortunately, it doesn't seem to work: while Coverband now detects the views, it seems unable to detect when they are being used. I did some limited testing, and it looks like ViewComponent doesn't emit any Were you able to get this to work correctly on your end? I wonder if maybe it works with ViewComponent 3.x or earlier, but not with the recently released 4.0 version. |
|
I'm currently using view_component 3.23.2. I did get this deployed into our prod environment, and I think I'm seeing the same behavior you described. I'm pretty sure I'm seeing all my components and partials and views now (before, anything in I also just noticed the ruby files for the components mostly don't show up in the main Coverage tab. A small handful do, but many do not. I'm not sure what that's about. It might just be my own config. |
|
Alright, thanks for confirming! Since this seems to be a limitation of ViewComponent, I've opened a feature request here: ViewComponent/view_component#2451
AFAICT the Ruby files for our ViewComponents are properly detected by Coverband, so this is probably an issue with your setup. |
|
yeah for now we are very tied to the ActiveSupport Notifications emitted by default for rails views if they match those events it should work, or if they publish a different event with all the required data we could add a listener for that. I will hold publishing the gem until we have a confirmation of some way to make this work or I revert the merge. Thanks for all the posts and let me know when you all think we can move forward |
No description provided.