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

26 Коммитов

Автор 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 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
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
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
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
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 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 74db471490
Remove window state (#77)
* Update dependencies of samples

* Remove WindowState module

* Update README
2022-01-18 13:49:59 -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 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
Joy Liu bb3b59d050
Update the project structure and latest WindowManager APIs (#17)
* Change project structure

* Update using latest WM API

* Remove unnecessary files

* Update pipeline

* Add missing files

* Fix ktlint issue

* Code clean-up
2021-04-19 14:04:12 -07:00
Joy Liu fefec54083
Update CompanionPane to fit other foldables (#15)
* Update CompanionPane to fit other foldables

* Update dependencies

* Update

* Update to fix lint error

* Update to fix ktlint error
2021-03-25 14:33:24 -07:00
Joy Liu 83c723d975
Update readme and dependencies (#13)
* Update README

* Update dependencies

* Update WM version

* Remove area in the links
2021-03-18 12:32:44 -07:00
Joy Liu cef6cd5340
Merge all the project into one and clean up the repo(#11)
* Set up samples project

* Add CompanionPane

* Update the pipeline to include ComposeSamples

* Add DualView

* Add ExtendedCanvas

* Add ComposeGallery

* Remove the duplicate projects

* Update pipeline

* Fix the pipeline issue

* Add missing files

* Add copyright
2021-03-02 12:13:35 -08:00
Joy Liu e9afeae473
Introduce DualView sample (#8)
* Introduce DualView project

* Update UI

* Update WindowManager

* Add topAppBar

* Implement MapView

* Implement span mode

* Implement map image zooming

* Update image assets

* Fix the code style

* UI tweek

* Update UI for dual-screen rotation

* Update README

* Address the comments

* Update the Kotlin version for the rest of samples

* Add DualView into the pipeline

* Add missing files
2021-02-16 16:08:47 -08:00
Joy Liu e526fe7b1d
Update README to combine the samples into one in MS code sample site (#7)
* Update README to combine the samples into one in MS code sample site

* Update
2021-01-27 12:56:43 -08:00
Joy Liu 246d5d3bd4
List Detail sample (#6)
* Create new project for ListDetail

* Project config

* Add image assets

* Create image list

* Create image detail

* Add click event

* Navigation for single screen

* UI tweak

* Update README and pipeline

* Add missing files

* UI update

* Minor update to push the code sample change
2021-01-26 09:43:50 -08:00
Joy Liu fa5dd18fb6
Bring in Compose Gallery (#4)
* Bring in Compose Sample

* Update the pipeline for ComposeSample

* Update README

* Rename the project to ComposeGallery

* Rename the project folder

* Add missing files

* Remove commented code
2021-01-20 13:59:00 -08:00