Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Update show details to Compose #583

Merged
merged 40 commits into from
Apr 20, 2020
Merged

Update show details to Compose #583

merged 40 commits into from
Apr 20, 2020

Conversation

chrisbanes
Copy link
Owner

No description provided.

@chrisbanes chrisbanes force-pushed the cb/show-details-compose branch from f559766 to fd1dc63 Compare April 15, 2020 10:01
@chrisbanes chrisbanes force-pushed the cb/show-details-compose branch from fd1dc63 to 27b0862 Compare April 15, 2020 16:57
Also moved back to using setContent now that it is lifecycle aware
Until I work out how to host fragments inside Compose
We now use a intermediary Channel to break the direct
dependency on the ViewModel, allowing us to remove a
potential leak.
@chrisbanes
Copy link
Owner Author

Ready for review. Demo video: https://youtu.be/t-F4Q052QoY

@chrisbanes chrisbanes marked this pull request as ready for review April 17, 2020 10:21
- Tidied up a lot of the TypedArray fetching and conversion to
  Compose types to new ext funs.
- Read shape appearances from MDC theme.
- Now properly read dimension units from TypedArray, for TextUnit
  and CornerSize.
- Add new `useTextColors` option, since using hardcoded colors in
  TextStyles breaks emphasis.
- Extracted reading logic to new `generateMaterialThemeFromContext`
  effect.
Copy link

@objcode objcode left a comment

Choose a reason for hiding this comment

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

Minor comments, otherwise LGTM!

var canExpand by stateFor(text) { true }

Box(modifier = Modifier.ripple(bounded = true, enabled = canExpand)) {
var expanded by state { false }
Copy link

Choose a reason for hiding this comment

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

Suggest hoisting this as it seems reasonable callers may want to control the state.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good call, done 👍

@chrisbanes chrisbanes merged commit f1a52a9 into master Apr 20, 2020
@chrisbanes chrisbanes deleted the cb/show-details-compose branch April 20, 2020 21:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants