amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.93k stars 558 forks source link

feat: add accessControl field to Android Compose template #1385

Closed xaviPastHubs closed 3 days ago

xaviPastHubs commented 2 weeks ago

added accessControl to android compose template

It seems that the accessControl field is not controlled in the Compose/Object template (Android), unlike in ios-swift/any.swift for example. It could be added to change the visibility of the created objects, thereby improving the simplicity of development in apps that use it.

Issue link here

aws-amplify-us-west-1[bot] commented 2 weeks ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1385.d16eby4ekpss5y.amplifyapp.com

jorenbroekema commented 2 weeks ago

Awesome, can you add a changeset (patch I guess since this is a bugfix imo) by running npx changeset locally and committing the results of that?

I would also expect a test to now fail, or if there is no test for this format yet, could you add a test? npm run test locally, or npm run test:watch to go into debugging mode. If the only failures are snapshot tests, then you can run npm run test:update-snapshots and check the diff with git diff or something and verify that the snapshot updates make sense and are what you expect as a consequence of your code change

xaviPastHubs commented 1 week ago

@jorenbroekema I’ve followed the steps you provided and fixed the failing tests. I had to update the compose android snapshot as I also made a couple of formatting adjustments (semicolon after the package, a double space in the constructor, and a new line at the end of the file). Let me know if there’s anything else you need or if you have any further feedback!

jorenbroekema commented 1 week ago

I added 2 more tests and some docs, let me know if this looks okay

xaviPastHubs commented 1 week ago

@jorenbroekema Yes, the tests you've added look great! Appreciate the hard work you put in