litho icon indicating copy to clipboard operation
litho copied to clipboard

litho-core contains widget resources

Open passy opened this issue 8 years ago • 4 comments
trafficstars

The widget_attrs.xml is currently part of litho-core but should obviously live in litho-widget.

It's not as easy as moving it to the other package and updating the references to com.facebook.litho.widget.R as we create another cycle since litho-testing depends on some of the styleable attributes defined in there.

We need to find a way to untangle this. Another stand-alone resource package sounds like something we would want to avoid. Get creative!

passy avatar Apr 13 '17 09:04 passy

@passy so what about keeping only the styleable attribtes at are needed for litho-testing, inside litho-core and moving the rest over to litho-widget? I think i can prepare a PR if that's what's needed.

pavlospt avatar May 03 '17 04:05 pavlospt

@passy why does litho-testing rely on widget_attrs.xml? What are the dependencies?

IanChilds avatar May 03 '17 10:05 IanChilds

@IanChilds The only dependency is the ComponentsRule that includes the hack currently needed to make Buck work with the styleable attributes.

@pavlospt I think (but might be wrong here) that this actually includes all attributes currently listed in there.

The best way to solve this would clearly be to fix the buck hack but this has proved to be rather difficult. I'll try and find out what the process of importing the fix for this is (https://github.com/facebook/buck/pull/879).

passy avatar May 03 '17 10:05 passy

The only dependency is the ComponentsRule that includes the hack currently needed to make Buck work with the styleable attributes.

This is no longer true, so perhaps we can remove this dependency now?

IanChilds avatar Sep 20 '21 08:09 IanChilds