Граф коммитов

98 Коммитов

Автор SHA1 Сообщение Дата
Kristen Halper 1ae8ef3349
Update dependencies (#105)
* Update gradle plugin version

* Update library dependencies

* Clean up sample dependencies

* Update Navigation Rail sample to new TwoPaneLayoutNav format

* Update readme

* Update Compose SDK dependencies

* Fix lint errors
2023-02-09 11:09:01 -08:00
Kristen Halper ff71a7a091
Update readme social links (#104)
* Update readme social links

* Update links to permanent youtube URls

* Fix link error
2022-09-30 08:30:36 -07:00
Kristen Halper 17d9cdc2bd
Improve accessibility of compose samples (#103)
* Update CompanionPane sample

* Update ComposeGallery

* Update DragAndDrop

* Update DualView

* Update ListDetail

* Update NavigationRail

* Update TwoPage

* Update VideoPlusChat
2022-09-06 10:59:18 -07:00
Kristen Halper 51fbe4e5b1
Update dependencies (#102)
* Update gradle version

* Update readme

* Update dependencies

* Update CompanionPane sample

* Update ComposeGallery sample

* Update Diary sample

* Update DragAndDrop sample

* Update DualView sample

* Update DyAdd sample

* Update ExtendedCanvas sample

* Update ListDetail sample

* Update NavRail sample

* Update SourceEditor sample

* Update TwoPage sample

* Update VideoPlusChat sample

* Fix readme table format
2022-08-18 10:25:16 -07:00
Joy Liu a502ff8cc2
Update DragAndDrop sample using DragAndDrop library (#101)
* Add drag and drop library

* Update UI

* Update README

* Update the blog and video links
2022-07-21 16:50:47 -07:00
Alin-Mihai Argeanu 233ac43522
Alargean/compose sample updates (#99)
* save slider state when configuration changes occurs

* update sample apps color to light blue

* update sample apps top bar and status bar color to light blue

* not show top bar on the bottom screen in dual-landscape mode

* update screenshots

* change icons color
2022-07-21 11:56:34 +03:00
Unmesh f222c72de6
Unmesh/compose diary (#98)
* Diary sample baseline added to compose-samples

* Updated main README table

* README for Diary app updated

* all Android Studio warnings cleared

* Fixed all warnings within Android studio

* Ran ktlint script

* Deleted unused component

* Placeholder for Editor and forced light mode on app due to calendarView

* updated suggested changes in PR #98

* required changes for PR #98

* Row removed, weight adjusted

* ktlint updated

* Hardcoded string updated to use stringResource

* string hardcoded again as there's an issue with pulling data from stringResource

* Theme and other fixes for PR #98

* changes to theme and comment removed

* stringResource issue fixed

* screenshots added

* updated style for text

* project settings gradle file updated
2022-07-15 09:40:57 -07:00
Unmesh fb89ef3afe
Adding Source Editor Compose sample (#96)
* Initial commit for Source Editor Compose

* Ktlint format updated using script

* Source editor app added to the readme table

* Copyright content added to Source Editor module

* Gradle dependency cleanup

Hardcoded dependencies are fixed

* Microsoft twoPaneLayout dependency updated

hardcoded twoPaneLayoutVersion value changed to follow defined convention

* Updated ReadMe with SourceEditor instead of DualView

* Unnecessary Gradle dependencies removed

* removed unused Preview Composable

* Refactoring files into proper folder structure

* fileName changed to be used directly

* Icon Button added for topbar

* Made suggested changes comments on PR #96

* ktlint script applied

* README for sourceeditor added

* cleanup

* Screenshots updated

* theme name changed & stringResources updated

* removed buildTypes

* suggested changes implemented

* Theme renamed
2022-07-14 16:10:21 -07:00
Kristen Halper ded5583cad
Update ComposeTesting version (#97)
* Update social links in README

* Update dependency

* Update companion pane tests

* Update ComposeGallery tests

* Update TwoPage tests
2022-07-12 13:26:50 -07:00
Levi Ortega f811fdc36f
VideoPlusChat (#92)
* Added videochatapp to main repo, going to remove forked pr for this project

* Style fixing and refactoring

* Lintin'

* Move StyledPlayerView directly inside AndroidView

* Help pass modifiers to reduce box usage + code cleanup

* Fixed build breaking issue

* infoprovider must be availible globally, else it doesnt get updated properly

* Move Player into VideoPage and reserve currentPostion as a state

* Reserve the fullScreen as a state

* Removed comments

* localization

* Removed infoprovider

Co-authored-by: Kristen Halper <khalper@microsoft.com>
Co-authored-by: Joy Liu <joyliu1@microsoft.com>
2022-06-23 11:37:34 -06:00
Joy Liu a49a3fc471
Introduce DragAndDrop sample (#88)
* Create DragAndDrop sample

* Add DragTarget and DropTarget

* Building UI

* Update DragContainer and DropContainer

* Implement text drag and drop

* Introduce DragData and MimiType

* Update system bar color

* Fix the draggable size

* Build UI in the single-pane mode

* Add floating button to reset the UI

* Add highlight interaction when dragging

* Update dependencies

* Add UI test case

* Address comments

* Re-introduce the project

* Update README

* Code clean-up

* Update screenshot to gif

* Update app icon

* Remove DS_Store and log
2022-06-21 18:02:59 -07:00
Kristen Halper 68d6f9f2b5
Update isSinglePane usage (#94)
* Use isSinglePane instead of isDualPortrait

* Fix isSinglePane logic

* Update UI tests

* ktlint
2022-06-21 09:09:30 -07:00
Levi Ortega fda09cfc5a
Calculator (#91)
* Added calculator

* Formatting

* Update README.md

* Update README.md

* Added top bar styling

* Added README and screenshots

* Scaled imaged down

* Update README.md

* Completed all Kristen comments, added copyright as well to top

* Lintin'

* Added unit tests, major calculations refactor

* moved tests to test file

* Changed calculator name to DyAdd, added its screenshot to readme, fixed modulus crash, added testing for div by 0 for div and mod

* Forgot to display the icon in README

* Added app logo, and changed official name
2022-06-17 08:48:56 -06:00
Kristen Halper 0db9f7e0fb
Update samples to new TwoPaneLayout version (#89)
* Update TwoPaneLayout version

* Update samples to use new TwoPaneScope methods

* Update nav rail sample to use TwoPaneLayoutNav

* Update UI tests with test scope classes

* Fix ItemDetailView tests in nav rail sample

* Remove unused values

* Remove logging and clean up back press logic
2022-06-09 11:31:39 -07:00
Joy Liu e6343383c8
Update Compose samples with the latest libraries (#87)
* Update ComposeGallery

* Update other samples

* Update TwoPaneLayout to beta04

* Update navigation compose to 2.4.2

* Fix ktlint error

* Update test for DualView
2022-05-04 13:53:32 -07:00
Kristen Halper f61b9c0d15
Update social links table (#86) 2022-04-14 08:59:50 -04:00
Cesar Valiente 4568781f86
Added issues and PR templates (#85) 2022-04-05 11:44:47 +02:00
Joy Liu 886be71ec9
Update sample with testing (#84)
* Update imports for the samples

* Update README
2022-03-03 10:59:12 -08:00
Joy Liu 0f5d1b84c2
Update dependencies (#83)
* Update dependencies for the samples

* Code cleanup

* Move to ComposeTesting alpha03

* Update video link
2022-03-01 18:58:19 -08:00
Joy Liu b63ee37154
Update samples with ComposeTesting and remove TestUtils module (#82)
* Update CompanionPane with ComposeTesting

* Update ComposeGallery with ComposeTesting

* Update ListDetail with ComposeTesting

* Update NavigationRail with ComposeTesting

* Update TwoPage with ComposeTesting

* Update DualView with ComposeTesting

* Update ExtendedCanvas with ComposeTesting

* Remove TestUtils module

* Update wildcard import

* Remove the magic number

* Fix the ktlint error

* Move to JC 1.1.0

* Remove JWM testing dependency

* Address comments

* Remove customized ViewSize for DualView

* Update dependency

* Update with ComposeTesting alpha02
2022-02-11 15:38:27 -08:00
Kristen Halper 7aadf7b78f
Update samples to WindowState-alpha02 (#81)
* Update to WindowState alpha02

* Update usages of "foldOccludes" to "foldIsOccluding"

* Update usages of "foldBounds" to "foldBoundsDp"

* Update usages of windowWidth/Height to include dp

* Update "isFoldHorizontal" usage to "foldIsHorizontal"

* Update foldablePaneWidth usage in DualView sample

* Remove unused properties/functions in TwoPage

* Update performGesture to performTouchInput

* Update foldablePaneWidth and foldSize usage in TwoPage

* Make sure isSeparating is true in tests that have folding features

* Fix TwoPage calculation and add comments
2022-02-04 16:56:47 -05:00
Kristen Halper f79c108632
Use correct fold size units and update content drawer logic (#80)
* Update content drawer to use custom separated column implementation

* Update gradle version

* Update content drawer and padding values

* Rename params with units

* Update UI tests

* Add missing content descriptions to CompanionPane

* Update dependencies

* Remove unnecessary dependency

* Remove redundant px/dp conversions

* Update readme

* Change to stable dependencies
2022-02-02 18:00:40 -05:00
Joy Liu 289e116675
Adding UI tests to ExtendedCanvas (#79)
* Update app structure

* Remove the size restriction when comparing the image in TestUtils

* Adding test cases into ExtendedCanvas

* Remove unnecessary dependencies

* Address the comments

* Return false when the image size is different
2022-01-26 14:00:08 -08:00
Kristen Halper 83664840f9
Add UI test to NavigationRail (#78)
* Add test dependencies

* Add stateless version of app composable

* Rename theme

* Add string helper method that accepts formatting arguments

* Fix DualView modifier bug for narrow widths

* Add unfold methods to TestUtils

* Update image content descriptions to include unique id

* Add custom semantics property to content drawer

* Add tests for detail view

* Add tests for gallery view

* Add pane sync tests

* Add nav component tests

* Fix ktlint issues

* Remove unfold method until we can test it

* Address PR comments

* Add more nav component tests

* Add assertion to dual landscape test
2022-01-21 10:04:19 -05:00
Joy Liu 74db471490
Remove window state (#77)
* Update dependencies of samples

* Remove WindowState module

* Update README
2022-01-18 13:49:59 -08:00
Kristen Halper 038ad70dc1
Add UI tests to TwoPage sample (#75)
* Remove unnecessary Row from AlignedCaption

* Remove unused composable

* Add stateless intermediate composable for testing

* Add page number to PageLayout composable

* Shorten string resource names

* Refactor home package to view

* Rename app theme

* Add page swiping test

* Add content description to image

* Add more page swipe tests

* Add page content tests

* Add missing comments to previous sample tests

* Create mock page composable

* Remove WindowMetrics usage

* Remove test with hardcoded inset padding

Will revisit after investigating proper inset padding

* Update dependencies and fix ktlint issues

* Add back vertical swipe test using screen width

This reverts commit 787a68a5e1.
2022-01-18 14:54:03 -05:00
Joy Liu 2da22280d6
Add UI test to ListDetail sample (#76)
* Update ListDetail selection

* Update theme

* Add TopAppBarTest

* Add ListDetailTest

* Add more tests

* Address the comments

* Style update

* Add image content description

* Update the test tag to content description

* Fix ktlint error

* Update text color in Theme
2022-01-14 12:00:55 -08:00
Kristen Halper 0d9fa03557
Add UI tests to Dual View sample (#73)
* Add test dependencies and blank test class

* Use string resources and material theme colors instead of hardcoded values

* Rename home package to view

* Add foldablePaneWidth getter to WindowState

Since both TwoPage and DualView need to calculate "viewWidth"

* Replace viewmodel with state variables

* Add stateless versions of main app to other samples

Will do it for remaining samples after their project structure is updated

* Clean up RestaurantView

Simplify clean up composables

* Clean up MapView and rename theme

* Add basic top bar test

* Add more top bar tests

* Add default values to WindowState constructor

* Update Compose Gallery tests to work on all devices/orientations

* Update Companion Pane tests to work on all devices/orientations

* Update social links in repo README

* Add theme to top bar tests

* Update dark theme to match compose theming

* Add restaurant list tests

* Add map image tests

* Clean up zoom tests

* Add comments and move helper classes to TestUtils

* Update window state usage in ComposeGallery tests

* Remove drag/zoom tests

* Add test to check that icons switch between views

* Remove test used to save screenshots

* Fix ktlint issues

* Pass isDualScreen through to RestaurantView
2022-01-07 12:21:28 -05:00
Kristen Halper 16c6bc36ad
Add UI tests to Companion Pane sample (#72)
* Update package structure

* Update data flow to follow Compose best practices

* Clean up theming

* Split up home page file

* Clean up effects panel code

* Add UI tests to Companion Pane

* Fix rebasing errors

* Simplify ComposeGallery tests

Since we're already simulating fold updates through the activity, there's no need to manually pass in values about large screen / foldable info

* Remove redundant freeze rotation calls

Orientation is freezed automatically in set orientation calls

* Add test case for orientation change

Single screen case left out due to UiDevice limitations (it's recommended to keep one orientation throughout the whole test case)
2021-12-20 15:43:44 -05:00
Kristen Halper d4cb092e21
Create foldable/large screen helper module (#70)
* Create window-info module

* Update build.gradle settings

* Add helper classes

* Update ComposeGallery to use module

* Update to wm beta04 and twopanelayout alpha10

* Update Compose Gallery tests to follow new app structure

* Rename module and classes

* Update NavigationRail sample to use module

* Add window mode (~device posture) to window state

* Update companion pane to use module

* Fix module manifest formatting

* Update dual view to use module

* Update list detail to use module

* Update two page to use module

* Refactor WindowState properties

* Expose additional fold info in WindowState

fold state, isSeparating, and occlusion type

* Rename module to window state

* Rename package to windowstate

* Update large screen logic to only include expanded size class

* Add tests for window state module

* Remove FoldingFeature dependency in WindowState

* Remove redundant JWM dependencies

* Update ComposeGallery tests to use new fold state enum

* Remove unnecessary JWM imports from ComposeGallery tests
2021-12-10 15:11:37 -05:00
Kristen Halper c36a3bcb4c
Create foldable test module (#71)
* Create foldable test module

* Move test helpers to new module

* Fix dependency/config errors

* Clean up build.gradle files

* Rename module to TestUtils

* Remove unnecessary android tag
2021-12-01 14:38:53 -05:00
Kristen Halper 51c633888c
Add UI tests to ComposeGallery sample (#67)
* Update ComposeGallery code structure

* Add basic UI test for top bar icons

* Update top app bar test to test smaller composables

* Update helper functions and add synchronization test

* Update helper methods

* Add new sync test ~wip

* Reformat state handling again

* Remember lazy list state and add icon click test

* Reset app state at the end of full app tests

* Fix rebasing errors

* Add window manager test dependencies

* Use TestWindowLayoutInfo to simulate hinge - wip

still transitioning between swipes & simulating the hinge

- haven't figured out how to "unspan" successfully (force empty display features list)
- spanning swipes aren't enough with the rulechain, now have to swipe & simulate the fold
- can change "USE_SWIPE_GESTURE" in pane sync test to switch between the two approaches

* Move getString to testing helper

* Refactor app structure

Replace viewmodel with, pass in states instead of WindowLayoutInfo to compose app

* Finish switch to TestWindowLayoutInfo

* Make sure selection is remembered between orientation changes

* Update TwoPaneLayout mode

* Add test that simulates horizontal fold
2021-11-24 08:54:05 -05:00
Kristen Halper 064238021e
Update to Compose version 1.0.5 (#69)
* Clean up nav rail dependencies

* Update project dependencies

* Update compose version in readme

* Update to wm beta03

* Update window manager version in readme
2021-11-16 18:32:21 -05:00
Kristen Halper 89e5bfec9f
Move TwoPaneLayout to separate repo (#68)
* Remove TwoPaneLayout project

Moved to new repo: https://github.com/microsoft/surface-duo-compose-sdk

* Move ComposeSamples info to repo readme

* Move samples from ComposeSamples to base directory

* Delete unused ComposeSamples directory

* Update sample links

* Update project structure in CI

* Remove TwoPaneLayout ymls

* Remove app samples repo link
2021-11-11 09:04:20 -05:00
Kristen Halper c54ffaa87b
Add app icon to each sample (#66)
* Add companion pane app icon

* Add compose gallery icon

* Add dual view icon

* Add extended canvas icon

* Add list detail icon

* Add two page icon

* Update readme

Svgs for app icons screenshots have 96x96 background rectangle and content is 48x48
2021-11-09 14:31:29 -05:00
Kristen Halper 9f263b6335
Rename app to include compose (#65) 2021-11-08 13:50:04 -05:00
Kristen Halper 42ccd0ccad
Add attributions for photos (#64) 2021-11-03 19:07:33 -04:00
Kristen Halper df33d08a1c
Update ComposeSamples to Compose 1.0.4 (#63)
* Add navigation rail sample to readme

* Update compose samples to 1.0.4
2021-10-28 17:01:36 -04:00
Kristen Halper e785856868
Update TwoPaneLayout to Compose 1.0.4 (#62)
* Update TwoPaneLayout to Compose 1.0.4

* Undo release version bump
2021-10-28 15:31:15 -04:00
Kristen Halper 6cc85f71c4
NavigationRail sample (#56)
* Create initial project

* Set up basic code structure

* Add custom theme colors

* Add basic gallery implementation

* Add more data and set up basic navigation

things to work on next:
- navigating between pane 1 & 2 in single screen mode
- making gallery & item views hinge aware (and possibly navigation rail? could have two rails for each pane so icons get split between the two)
- add bottom navigation to pane 2 when in single screen mode

* Add copyright

* update nav logic (~wip)

made choice not to show nav for single screen pane 2 (follow example of jetsnack sample and have it be like a temporary pop up away from the gallery)
-

things left to fix:
- nav controller should be at higher level so state is remember between spans/rotations
- rendering under hinge

* Refactor package name

* Update compose version

* Add id field to Image model

* Update item view to item detail view

simplify top bar logic for pane2 + break up itemdetailview composable into smaller parts

* Update navigation routes

based on some of the Jetsnack nav logic (replace Gallery data class with GallerySections enum class, hoist onClick/showItemView methods)

* fix for navigation state saving

a littleee hacky may need to revisit to fix vewmodelstore error eventually

* Remove viewmodel and cleanup code

track image data with a "remembered" field instead, break up navigation.kt into two files (navigation.kt + appcomponents.kt), add header comments!

* Finish refactor of package name

* Add montserrat font family

* Add placeholder images

* Update placeholder image/message with new designs

* Add roboto font family

* Update nav icon text style

* Add theme colors

* Add highlight graphic for selected icons

* Add dark theme colors (wip) and set status bar colors

* Add icons (todo: fix spacing)

* Replace placeholder pngs with vector assets

* Add image selector border

* Add nature images

* Reformat top app bar to match design (todo: fix spacing)

* Update lake icon

* Add app icon

* Change gallery view and top bar spacing

* Decrease placeholder image sizes

* Adjust spacing

* Decrease rock icon size

* Update dark mode color usage

* Add item detail view icons

* Update item detail view to match design

* Code cleanup

* Add drawer pill

* Update back arrow for better contrast

* Move custom top bars to separate component files

* Adjust when navigation state is checked

* Move custom nav controls to separate component files

* Fix bug where placeholder image appears in pane 1

* add padding to top of nav rail

* Move content drawer to separate component file and add hinge awareness

* Code cleanup for ItemDetailView

also fixed scroll issue with contentdrawer

* Make conditions box scrollable

* Update placeholder images with transparent shadows

* Update image model to reflect design

* fixup

* Update support for other foldables/large screens

* Add animations

resource for future: https://kaustubhpatange.medium.com/navigating-with-animations-in-jetpack-compose-5655820dedb8

* Add in unique plant data

* Add in unique bird data

* don't abbreviate measurements

* Add unique animal data

* Add unique lake and rock data

* convert to metric units

* Only show relevant icons and add elevation

* Fix compilation error

* Remove unnecessary box from Pane 2

* Update gradle version

* Move twopanelayout navigation to home page

* Code cleanup

* Fix system back press handling in detail view

* Add draft of readme

* Add more screenshots

* Address PR comments and set up icon parsing for galleries

* Add screenshots to readme

* Update compose version

Didn't update navigation version because twopanelayout still uses the old navigation version as well

* Rename condition to fact

* Code cleanup/documentation

* Add in final fact icons

* Update lakes fact icon
2021-10-28 14:03:03 -04:00
Kristen Halper f3f01ae4bc
Ensure all pages can be viewed in different orientations (#54)
* Support dark mode

* Show single page in dual landscape mode

* Adjust padding so second page doesn't go off screen

first pane (when measured in layout) extends past end of screen to the middle of the hinge, so padding can be halved

* Only check isHingeHorizontal when spanned
2021-09-27 18:19:12 -04:00
Kristen Halper 9707669ec8
Prevent CompanionPane crash on 6.7 fold-in emulator (#55)
* Change when rotation/span state is updated

* Fix tablet orientation check
2021-09-24 16:29:12 -04:00
Kristen Halper 5ab5468b35
Update Compose samples to 1.0.2 (#53)
* Update dependencies

* Update readmes
2021-09-20 18:06:53 -04:00
Kristen Halper 20c593adf0
Update TwoPaneLayout to Compose 1.0.2 (#52) 2021-09-20 13:02:31 -04:00
Kristen Halper 3c87d3d013
Use TwoPaneLayout in Companion Pane sample (#50)
* Use TwoPaneLayout in Companion Pane sample

* Add new screenshots and adjust padding

* Move import tip to getting started section

* Move tip to ComposeSamples readme and update dependencies

* Remove unnecessary Modifier parameters
2021-09-17 12:57:22 -04:00
Kristen Halper 4b3b027b20
Add import tip to readme (#51)
for making it easier to open the projects in android studio
2021-09-15 18:34:41 -04:00
Kristen Halper 1ad5f8e7e4
Use TwoPaneLayout in Compose Gallery sample (#49)
* Update material theme

* Begin migration to TwoPaneLayout

* Move TopAppBar inside TwoPaneLayout

* Add navigation options to app bar

* Address PR comments

Adjust when top bar is visual, rearrange crossfade hierarchy

* Make app bar visible even when rotated

* Navigate to picture on click when unspanned

* Update readme with screenshots and features

* Resize screenshots for readme
2021-09-14 09:07:20 -04:00
Joy Liu e249e53807
Update Compose samples with wm-beta (#48)
* Update ListDetail with WM beta

* Update DualView with WM beta

* Update TwoPage with WM beta

* Update ComposeGalley with WM beta

* Update CompanionPane with WM beta

* Update README

* Update Manifest for ExtendedCanvas
2021-09-07 13:23:10 -07:00
Joy Liu 3590210763
Update TwoPaneLayout with WindowManager beta (#47)
* Move to WM beta

* Update code style

* Update dependencies for Testing

* Update README for TwoPaneLayout

* Update dependencies
2021-09-02 12:21:52 -07:00
Joy Liu 848174407f
Update ListDetail with TwoPaneLayout (#46)
* Update ListDetail with TwoPaneLayout

* Update DecorativeBox

* Update dependencies

* Update with TwoPaneLayout

* Clean up

* Update for dual-landscape

* Update DualView to two-slot API
2021-08-31 10:53:43 -07:00