Skip to content

[Jetsnack] Add Previews #549

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

Merged
merged 3 commits into from
Jun 4, 2021
Merged

[Jetsnack] Add Previews #549

merged 3 commits into from
Jun 4, 2021

Conversation

JolandaVerhoef
Copy link
Contributor

No description provided.


@Preview("default", "round")
@Preview("dark theme", "round", uiMode = UI_MODE_NIGHT_YES)
@Preview("api 21", "round", apiLevel = 21)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does behavior vary by API level? Seems strange to only set one API level?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't have an actual need in this sample as we don't rely on changing APIs within our previews. Better to drop it

@nickbutcher nickbutcher changed the title [Jetnews] Add Previews [Jetsnack] Add Previews May 27, 2021
Copy link
Contributor

@nickbutcher nickbutcher left a comment

Choose a reason for hiding this comment

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

One question about API level preview, otherwise LGTM.

@JolandaVerhoef
Copy link
Contributor Author

For me, it made sense to include the minSdkVersion vs the targetSdkVersion. They shouldn't differ, but if you forget to use Compat classes, they might. I don't have a strong feeling about this though. Would like to get @yrezgui 2 cents on this!

Copy link
Contributor

@yrezgui yrezgui left a comment

Choose a reason for hiding this comment

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

I would remove @Preview("api 21", "round", apiLevel = 21) as we don't have an actual need in this sample as we don't rely on changing APIs within our previews. Better to drop them


@Preview("default", "round")
@Preview("dark theme", "round", uiMode = UI_MODE_NIGHT_YES)
@Preview("api 21", "round", apiLevel = 21)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't have an actual need in this sample as we don't rely on changing APIs within our previews. Better to drop it

@JolandaVerhoef
Copy link
Contributor Author

@yrezgui I removed the API level previews. Let me know if this is better!

@JolandaVerhoef JolandaVerhoef merged commit a03e7b3 into main Jun 4, 2021
@JolandaVerhoef JolandaVerhoef deleted the jv/js_previews branch June 4, 2021 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants