I added my first resource but not seeing anything ...
# avo-2
b
I added my first resource but not seeing anything on the index page except the title section. If I put a breakpoint in
views/avo/base/index.html.erb
on the component render statements they are hit (and there is def content to render), but the output never seems to be appended to the page output. Im pretty sure this is caused by the fact I am using ViewComponent 3 (v3.0.0.rc5), and the slots in avo would need renaming to include
with_
when called (https://viewcomponent.org/CHANGELOG.html#300rc1 "BREAKING: Remove deprecated slots setter methods. Use with_SLOT_NAME instead.") ... is it possible that Avo V3 has been updated to support Viewcomponent 3?
l
Can you install a 2.x version and see if that fixes it?
We haven’t migrated to 3 yet
b
I can't as our whole app now uses the
with_slot_name
new convention
l
Well 🙃
They haven’t released a stable version yet
So, it will take some time to upgrade
We’d merge a PR of we had one to upgrade to V3
b
Id be happy to help, but how to handle Avo supporting both V2 and V3 of ViewComponent 😕
l
Not sure. Maybe VC repo has guidance there?
I’m not at my comouter today and can’t look into it
It would be best if they had an API to support both
I’m not sure I would introduce such a breakinng change in Avo 2.x versions
b
Ok sure, no worries. Yeah the deprecation seem to have been quite a tough one to introduce..
I will see what lookbook did with this
l
Thank you!
b
Aha, ok so V2.54.0 introduced the new API
https://github.com/ViewComponent/view_component/releases/tag/v2.54.0 so as long as Avo depends on older versions than that then it should be fine
I will start on a PR now assuming that Avo can be made to be
view_component >= 2.54.0
l
I that’s possible. I see that we currently use 2.82 in our dummy app
Thank you!
b
Ok, have the changes done, but just seeing a couple of failing tests that are seemingly unrelated... I will make changes to make them pass and then we can review on the PR
Btw I notice view_component 2.72.0 dropped support for Ruby 2.6 , but avo is ruby >= 2.6 , I guess you want to continue supporting 2.6, or will avo become Ruby >= 2.7
l
For Avo 2 we’ll support 2.6 indefinitely IMHO
Thanks for this
Definitely push a PR to see the test fails. Sometimes they are flaky. Not a fan of that, but haven’t had the time to check it out
b
PR is up!
l
Hey Steve. Sorry, but I’m not at my laptop today either. I’ll have a look tomorrow in the second part of the day
Thanks for the PR!
b
Sure!