-
Notifications
You must be signed in to change notification settings - Fork 6
popup media element and media image thumbnail support #449
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
Conversation
internal class PopupMediaState( | ||
val title: String, | ||
val caption: String, | ||
@Suppress("unused") val refreshInterval: Long, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Suppress("unused") val refreshInterval: Long, | |
@Suppress("unused") val imageRefreshInterval: Long, |
...popup/src/main/java/com/arcgismaps/toolkit/popup/internal/element/media/MediaPopupElement.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorenoid Just a comment. Looks good overall.
}) | ||
|
||
// | ||
//internal class ChartImageLoader( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this unused code ?
* `Popup`: component and app (#406) * add Popup component and microapp * add bottom sheet and api file. * add READMEs * address review feedback * change name in android manifest that were changed in previous commit * Update microapps/PopupApp/README.md Co-authored-by: Erick Lopez Solis <[email protected]> * Update toolkit/popup/README.md Co-authored-by: Erick Lopez Solis <[email protected]> * add initialization support to the Popup composable. --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * `Popup`: Adds TextPopupElement Composable (#413) * `Popup`: state collection (#420) * pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose) * Address warnings from version upgrades. pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose). * preliminary setup of state collection. * add initialization support to the Popup composable. * workaround for known issue in gradle task graph progress. opt in for experimental coroutine API * view model added to the Popup App. * move files around. make state objects Parcelable. * ensure states are not created until expressions are evaluated. * Update toolkit/popup/src/main/java/com/arcgismaps/toolkit/popup/Popup.kt Co-authored-by: Erick Lopez Solis <[email protected]> * remove Parcelable super class from base state class * remove comment --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * update expandable card (#426) * pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose) * Address warnings from version upgrades. pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose). * preliminary setup of state collection. * add initialization support to the Popup composable. * workaround for known issue in gradle task graph progress. opt in for experimental coroutine API * view model added to the Popup App. * move files around. make state objects Parcelable. * ensure states are not created until expressions are evaluated. * Update toolkit/popup/src/main/java/com/arcgismaps/toolkit/popup/Popup.kt Co-authored-by: Erick Lopez Solis <[email protected]> * remove Parcelable super class from base state class * make expandable card more like field maps. * add defaults * address PR feedback * fix formatting * default to expandable card expanded --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * `Popup` attachment element (#430) * pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose) * Address warnings from version upgrades. pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose). * preliminary setup of state collection. * add initialization support to the Popup composable. * workaround for known issue in gradle task graph progress. opt in for experimental coroutine API * view model added to the Popup App. * move files around. make state objects Parcelable. * ensure states are not created until expressions are evaluated. * attachment initial support * Revert "attachment initial support" This reverts commit c888b6b. * attachment initial support * Atachments hooked up to state collection and rendering in the Popup. * remove file from other branch * Update toolkit/popup/src/main/java/com/arcgismaps/toolkit/popup/Popup.kt Co-authored-by: Erick Lopez Solis <[email protected]> * remove Parcelable super class from base state class * make expandable card more like field maps. * add defaults * address PR feedback * fix formatting * default to expandable card expanded * merge in expandable card refactors * support document and other content types. * add all shapes sizes and color to theme defaults object * remove newlines * remove element count, add toggleable parameter to expandable card --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * `Popup:` Adds FieldsPopupElement composable (#428) * Adds ViewableFile implementation (#445) * popup media element and media image thumbnail support (#449) * Media element images wip * Media element with support for images * use colors from defaults * fix capitalization --------- Co-authored-by: Soren Roth <[email protected]> * `Popup`: chart images (#452) * Media element images wip * Media element with support for images * chart image support, dark mode support for media. * update SDK dependency for Popups * tweak padding of charts vs images --------- Co-authored-by: Soren Roth <[email protected]> * `Popup:` Fixes TextPopupElement composable shifting in size when coming back into visibility (#461) * `Popup:` Adds a file viewer for image attachments (#455) * `Popup:` Adds support for viewing videos and audio in FileViewer (#464) * Adds support for opening files in the system file viewer (#472) * chart support for AsyncImage from saved files (#475) * chart support for AsyncImage from saved files * remove unused lambda. update comment --------- Co-authored-by: Soren Roth <[email protected]> * attachment instance id workaround (#483) * chart support for AsyncImage from saved files * remove unused lambda. update comment * d * copy attachments on first fetch and pass down into the composition --------- Co-authored-by: Soren Roth <[email protected]> * `Popup:` Adds support for viewing media in file viewer (#481) * popup dynamic entity (#492) * wip * Basic support for DynamicEntity in Popups * minor formatting * merge in media FileViewer * only animate the fields element when the dynamic entity pulses -- for now. * remove unused named lambda parameter. remove newline --------- Co-authored-by: Soren Roth <[email protected]> * dont recreate the media image if it has already been saved to disk (#497) Co-authored-by: Soren Roth <[email protected]> * remove space. add gradle stuff for tests * add Popup to t9manifest * update api file * some small fixes (#508) Co-authored-by: Soren Roth <[email protected]> * set default map to fourteeners. --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]>
* `Popup`: component and app (#406) * add Popup component and microapp * add bottom sheet and api file. * add READMEs * address review feedback * change name in android manifest that were changed in previous commit * Update microapps/PopupApp/README.md Co-authored-by: Erick Lopez Solis <[email protected]> * Update toolkit/popup/README.md Co-authored-by: Erick Lopez Solis <[email protected]> * add initialization support to the Popup composable. --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * `Popup`: Adds TextPopupElement Composable (#413) * `Popup`: state collection (#420) * pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose) * Address warnings from version upgrades. pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose). * preliminary setup of state collection. * add initialization support to the Popup composable. * workaround for known issue in gradle task graph progress. opt in for experimental coroutine API * view model added to the Popup App. * move files around. make state objects Parcelable. * ensure states are not created until expressions are evaluated. * Update toolkit/popup/src/main/java/com/arcgismaps/toolkit/popup/Popup.kt Co-authored-by: Erick Lopez Solis <[email protected]> * remove Parcelable super class from base state class * remove comment --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * update expandable card (#426) * pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose) * Address warnings from version upgrades. pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose). * preliminary setup of state collection. * add initialization support to the Popup composable. * workaround for known issue in gradle task graph progress. opt in for experimental coroutine API * view model added to the Popup App. * move files around. make state objects Parcelable. * ensure states are not created until expressions are evaluated. * Update toolkit/popup/src/main/java/com/arcgismaps/toolkit/popup/Popup.kt Co-authored-by: Erick Lopez Solis <[email protected]> * remove Parcelable super class from base state class * make expandable card more like field maps. * add defaults * address PR feedback * fix formatting * default to expandable card expanded --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * `Popup` attachment element (#430) * pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose) * Address warnings from version upgrades. pull compose bom into androidTest and test Implementations when needed. Add missing version for artifact not covered by compose bom (androidx-activity:activity-compose). * preliminary setup of state collection. * add initialization support to the Popup composable. * workaround for known issue in gradle task graph progress. opt in for experimental coroutine API * view model added to the Popup App. * move files around. make state objects Parcelable. * ensure states are not created until expressions are evaluated. * attachment initial support * Revert "attachment initial support" This reverts commit c888b6b. * attachment initial support * Atachments hooked up to state collection and rendering in the Popup. * remove file from other branch * Update toolkit/popup/src/main/java/com/arcgismaps/toolkit/popup/Popup.kt Co-authored-by: Erick Lopez Solis <[email protected]> * remove Parcelable super class from base state class * make expandable card more like field maps. * add defaults * address PR feedback * fix formatting * default to expandable card expanded * merge in expandable card refactors * support document and other content types. * add all shapes sizes and color to theme defaults object * remove newlines * remove element count, add toggleable parameter to expandable card --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]> * `Popup:` Adds FieldsPopupElement composable (#428) * Adds ViewableFile implementation (#445) * popup media element and media image thumbnail support (#449) * Media element images wip * Media element with support for images * use colors from defaults * fix capitalization --------- Co-authored-by: Soren Roth <[email protected]> * `Popup`: chart images (#452) * Media element images wip * Media element with support for images * chart image support, dark mode support for media. * update SDK dependency for Popups * tweak padding of charts vs images --------- Co-authored-by: Soren Roth <[email protected]> * `Popup:` Fixes TextPopupElement composable shifting in size when coming back into visibility (#461) * `Popup:` Adds a file viewer for image attachments (#455) * `Popup:` Adds support for viewing videos and audio in FileViewer (#464) * Adds support for opening files in the system file viewer (#472) * chart support for AsyncImage from saved files (#475) * chart support for AsyncImage from saved files * remove unused lambda. update comment --------- Co-authored-by: Soren Roth <[email protected]> * attachment instance id workaround (#483) * chart support for AsyncImage from saved files * remove unused lambda. update comment * d * copy attachments on first fetch and pass down into the composition --------- Co-authored-by: Soren Roth <[email protected]> * `Popup:` Adds support for viewing media in file viewer (#481) * popup dynamic entity (#492) * wip * Basic support for DynamicEntity in Popups * minor formatting * merge in media FileViewer * only animate the fields element when the dynamic entity pulses -- for now. * remove unused named lambda parameter. remove newline --------- Co-authored-by: Soren Roth <[email protected]> * dont recreate the media image if it has already been saved to disk (#497) Co-authored-by: Soren Roth <[email protected]> * remove space. add gradle stuff for tests * add Popup to t9manifest * update api file * some small fixes (#508) Co-authored-by: Soren Roth <[email protected]> * set default map to fourteeners. * popup style completeness (#509) * provide expandable card text color * Set the color of the Popup title text --------- Co-authored-by: Soren Roth <[email protected]> * update dynamic charts and images (#515) * consistent animation. todo: push animation down to components * push animation down to components. refactor PopupMediaState creation to use factories. * add refreshInterval support. * reset map to fourteeners * feedback. property name, cleanup --------- Co-authored-by: Soren Roth <[email protected]> --------- Co-authored-by: Soren Roth <[email protected]> Co-authored-by: Erick Lopez Solis <[email protected]>
This PR provides a MediaPopupElement composable and support for PopupMedia of type Image (Charts will be supported next).
Coil is used for image loading though it is abstracted to support asynchronous loading of charts through core, so the use of coil is a bit indirect relative to what might be expected.
Images are displayed at 276x225 with title and caption overlaid.