Skip to content
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

Add support for generating android matchers #425

Merged
merged 2 commits into from
Dec 4, 2017

Conversation

DanielMSchmidt
Copy link
Contributor

This restructures the generation to allow for multiple adapters, leaving this open for further extension. It only adds one generated action to the live code, so that the diff doesn't get any bigger.

Although it might look intimidating as a diff, most of it is just moving files around and extracting the core generation from the platform specifics.

@DanielMSchmidt DanielMSchmidt force-pushed the generation/java-support branch 3 times, most recently from b5e1218 to 69ccd0f Compare November 28, 2017 07:20
@DanielMSchmidt
Copy link
Contributor Author

Awesome, the build is green again, thanks to rebasing <3
@rotemmiz Once you find time to review this I will do multiple small PRs to add support for different methods, so they are easier to review than in one blob

Copy link
Member

@rotemmiz rotemmiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@@ -0,0 1,142 @@
/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated, probably needs to be removed in the generation code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a seperate PR. The generation is currently "dump" and nothing keeps track if these functions are needed or not. It might be a little more complex and unrelated to this set of changes to remove these in the generation. But it's one of my next ups on the list

}
}

function sanitize_uiAccessibilityTraits(value) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same applies here

const ast = t.program([createClass(json), createExport(json)]);
const output = generate(ast);

const commentBefore = "/**\n\n\tThis code is generated.\n\tFor more information see generation/README.md.\n*/\n\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a more visible comment, and warning, to make sure people won't try adding things manually.
something like

// This file is automatically generated.
// Do not modify this file -- YOUR CHANGES WILL BE ERASED!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sounds nice, will do this in a seperate small PR, to keep this change contained 👍 It's on my list now

@@ -1,5 1,6 @@
const invoke = require('../invoke');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to add the other actions as well ?
Did you run the Android E2E suite with the new implementation ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the e2e suite with the old implementation, will re-run it the next days with the newer one. As I said, I would like to add the actions step by step to have smaller, easier to merge PRs.

@DanielMSchmidt
Copy link
Contributor Author

Thank your for the feedback @rotemmiz - I added cards for the smaller separated tasks in our project board, see here and here.

If I understand you correctly there are no blockers for merging here, so I would run a last test with the current test setup beginning this weekend and merge the stuff in if everything goes green. Separate PRs for the issues above are incoming hopefully this weekend, too.

This restructures the generation to allow for multiple adapters,
leaving this open for further extension. It only adds one generated
action to the live code, so that the diff doesn't get any bigger
@DanielMSchmidt DanielMSchmidt force-pushed the generation/java-support branch from 69ccd0f to a5c338d Compare December 2, 2017 15:38
@DanielMSchmidt
Copy link
Contributor Author

@rotemmiz Works on my machine, if I hear no veto, I will merge it tomorrow 👍

@DanielMSchmidt DanielMSchmidt merged commit 7f6d55e into master Dec 4, 2017
@DanielMSchmidt DanielMSchmidt deleted the generation/java-support branch December 4, 2017 07:00
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants