surface-duo-dual-screen-exp.../.github/workflows
Bianca Miron 74d389e521
Merge into main without navigation library (#29)
* Added the nav component and built the Find Stores functionality (#4)

* Added dependencies for private artifact of NavComponent, added a toolbar and bottom bar on MainActivity, created separate navigation graphs and included the basic values and fonts files

* Added data layer for Stores, changed the db file for pre-population and created tests for the repository class

* Added the domain layer for the Stores (models and usecases) and created unit tests

* Created the MapUtils for storing helper functions and the StoreNavigator & StoreViewModel which are used to connect the fragments

* Created the StoreMapFragment using BingMaps and a MapMarkerFactory which generates the bitmap needed for the selected/unselected marker

* Created the StoreListFragment which uses a RecyclerViewAdapter and some dataBindingAdapters to map the imageIds to the resources and show/hide the empty state

* Created the StoreDetailsFragment which uses a tabLayout and a ViewPagerAdapter for the About/Contact tabs

* Added UI tests for the navigation between the Store Map, List and Details fragments

* Code improvements for StoreMapFragment, BingMaps and observers

- Renamed markerList from MapFragment to selectableMarkerMap to be more specific
- Returned true from BingMapListeners to prevent other listeners from being triggered
- Changed fab listener behaviour to a specific method for recentering the map instead of also changing the zoom to prevent the balloon markers behind the circle marker to appear on top of it
- Changed the selectedCity value only when needed to prevent unecessary observer activation

* Update BingMaps SDK to latest version

- Added necessary null checks and improved the UI testutils marker click

* Updated to the newest SDK version and added the new nav-component artifact to make the CI build work again

* Code review changes - codestyle improvements for readability, refactored FragmentToolbarHandler into Activity and Fragment extension functions, renamed test methods to remove the underscore

* Created the launch screens and a tutorial component (#5)

* Improvements - Moved store button attributes to its style so it can be reused, changed the UI based on new design, renamed the id of the map container from camelCase to underscore for consistency

* Added Tutorial Component data layer in order to store using SharedPreferences whether it should be displayed

* Added LaunchTutorial domain layer to keep the logic of when the component should be displayed in the launch screen, and a cache value to prevent unecessary SharedPrefs edits

* Added Tutorial Component presentation layer using a PopupWindow, drawables for all positions, also the ViewModel which saves the value to false when the app is spanned

* Created the UI part for the LaunchTitleFragment and LaunchDescriptionFragment

* Created the LaunchActivity which uses FragmentsHandler, SurfaceDuoLayout libraries, ViewPager with TabLayout and Qualifiers to make both single screen and dual screen mode look as expected

* Added launch tutorial logic into the activities for showing and hiding and fixed a back button issue when going back from MainActivity to LaunchActivity

* Added UI tests for single and dual screen mode and both orientations

* Tutorial improvement - added a bigger offset when the device is rotated so the tutorial won't be too close to the launch description

* Moved animation drawable from LaunchDescription to an animation-list in an xml file and stopped the animation in onPause

* Fixed the back button from Main to Launch which should take into account the navController

* As discussed with Mehul, raised the duration of each frame so it animation will slow down

* Code review changes - refactored magic number to constant value

* Code review changes - refactored TutorialPreferences into a common package and created a PreferenceManager to handle them, used SingleLiveEvent for opening a new activity, renaming and added @Ignore to test which fails

* Code review changes - refactored findViewById with View Binding and renamed some ids

* Create Product and Customization feature (#6)

* Updated the product data layer with needed fields and methods, updated the pre-populated db and removed sample tests

* Updated the product domain layer with necessary fields, methods, usecases and tests

* Improvements - added a default value for SingleLiveEvent, removed unecessary view parameter, added new dimens and removed the duplicate ones from dual screen qualifier

* Created custom views for the product rating and customize item and some helper functions

* Updated the product presentation layer (List and Details fragments) to match the design, also renamed the classes to be more specific

* Created a rotation view model to help modify the design accordingly

* Created the customize activity and fragments according to design, opened them from the ProductDetailsFragment's Customize button and introduced the lottie library for the Place Order button animation

* Created some navigation tests for the product feature, left some commented lines for future integrations or SDK issues

* Created tests for the Customize products feature using content descriptions

* Fixed a lint issue and updated gradle and koltin versions

* CR changes - Updated tests names to be more descriptive and explained why commented checks exist and linked to Github issue

* CR changes - extracted a class with Float extensions for dpToPx conversion and price formatting, extracted separate methods from onViewCreated

* Create order feature (#8)

* UI improvements - removed nullable type for color and bodyShape, added focusable and clickable for each fragment so listeners from startDestination will not be activated

* Tutorial improvements - moved it as a singleton component so it can be used everywhere and added support to anchor a view

* Added data layer and testing for the Orders feature, used LiveData because we need the db values inserted or changed in real time

* Added domain layer and testing for the Order feature

* Added logic for Place Order button and small improvements

* Renamed cart to orders and added the hinge-aware recycler view component

* Added the presentation layer of the Orders feature - adapter for the dual-list which also handles the empty state and the order details using viewTypes & recommendations logic

* Added tutorial and toast logic which should be displayed after an order is submitted

* Added UI tests for the presentation layer, using an InMemoryDatabase in order to have a clean orders table for each test

* Products improvement - added the Place Order button also for single mode, updated tests

* Refactoring to implement latest design changes, created a StaggeredSurfaceDuoLayoutManager in order to have items of different sizes and made the components reusable

* Created a separate fragment for the Order Receipt, used the same OrderListAdapter but with different data and handlers

* Order - toast bug fix (#9)

Moved the Order success toast message to be displayed from OrderReceiptFragment instead of the OrderFragment in order to prevent a delay in the navigation, changed length to short

* Created DevMode feature and added tutorial (#10)

* Added toolbar for all fragments and the ProductCustomizeActivity, removed Cancel button and fixes for Orders

* Created DevModeActivity which is opened from a toolbar menu item and has two fragments, added tutorial logic, set the positions for the animation and the WebView links inside intent extras

* Updated UI tests and added new ones for the toolbar and DevMode, set animationsDisabled for tests inside the build.gradle file

* Integration with bottom navigation support (#11)

* Integrated with latest Navigation Component artifacts, which add support for bottomNavView and fixed some issues

* Fixed app navigation issues

- Removed fragments handler and used nav-graphs for Launch and DevMode
- Refactored ProductCustomize to a fragment instead of activity and added customize sync with ProductDetailsFragment
- Removed ScreenInfoListener from MainActivity fragmnets and used rotationViewModel instead
- Fixed back behaviour and toolbar titles
- Changed Product Details-Customize dual-screen order to be in sync with nav-component (when Customize is opened, Details moves to start screen and Customize is opened on end screen)

* UI changes for the bottom navigation view - added top border and modified item tint color

* Updated UI tests to work with latest changes and removed ".xml" from auto-generated navigation ids

* Navigation improvements - moved LaunchActivity to use activity navigator, made use of arguments to hide/show the BottomNavBar

- Didn't refactor DevModeActivity to use activity navigator because it needs the activity and the menu item view for the shared element transition from the circular reveal animation. Since activities cannot have actions to other activities by design from the Android Navigation Component, the only option was to navigate to DevMode from each one of MainActivity's fragments.

* Renamed AppNavigator to MainNavigator to prevent confusion because it only handles the navigation for MainActivity and its fragments

* Refactored deprecated import for the assertThat function used in unit tests and updated junit version to 4.13.2

* About & OSS licenses (#12)

* Created Resources&Links section of the About page with specific icons and urls

* Created OSS licenses section of the About page

* Created the AboutActivity, the fragments and the navigator

* Added about menu item in both single and dual screen mode and opened the AboutActivity from the MainActivity

* Added UI tests for opening and checking the About screen from each main feature

* Lint does not have support for Flow so it needs tools:ignore="MissingConstraints" for all references, otherwise it fails

* CR changes - added Gson as library and license, refactored licenses and terms to json files, added data source which reads from json files and used them in the AboutViewModel

* Changed app name & icon, added release part (#13)

* Changed app name to Dual Screen Experience

* Added adaptive and legacy app icons

* Small improvements - removed animations for first time loading of the map to reduce number of tiles needed, prevented app install from external storage and set allowBackup to false

* Added new buildType for release and the proguard rules and keep resources file to make it work properly

* Retrieved the map token differently based on the build type, added Firebase for release

* Added Third Party License items for the Firebase and KotlinX Coroutines libraries

* Sorin/feature catalog (#14)

* Create catalog feature

* CR changes for catalog and integration

- Replaced deprecated kotlin.extensions plugin with kotlin-parcelize
- Refactored tests to remove Thread.sleep
- Renamings for better readability
- Displayed toolbar also in HostProductsFragment
- Dev mode changes for Catalog
- Added Glide license in the About list
- Created new interface which only provides a list of data

* Updated old products tests - renamed the old function to navigateToProductsSection() to prevent confusion and extracted openCatalogTab() and openProductsTab() functions

* Added proguard rule for Catalog models required by Gson, improvement for to remove viewpager animations from the HostProductsFragment only when testing

* Added some comments to CatalogItem.ViewType enum to describe what each layout type means

* CR changes - code improvements

- Removed CatalogItem fragments with same logic and generated the binding based on the viewtype in CatalogItemFragment
- Moved model transformation to domain to prevent domain imports in data layer

Co-authored-by: EUROPE\bimiron <bimiron@microsoft.com>

* Update libraries (#15)

* Updated libraries to latest version, including Surface Duo SDK and fixed navigation/toolbar issues, removed jcenter

* Fixed some issues regarding Dev Mode and opening Store List from Store details and added tests

- Setup programatically the navigation graph for dev mode after the 3 controls are set from activity bundle
- Changed some AppScreen URLs in order to have unique paths
- Added a navigation action from details to list in case the circle pin is tapped after the marker pin
- Added some tests for the above use case

* Fixed some UI issues which appeared after showing the toolbar on Catalog pages and saved selected state of the Catalog/Products tabs (#16)

* Integration with navigation component for fragments displayed on both screens (#17)

* Added Bing Maps Terms of Use and Privacy Statement to the About screen in the Licenses section

* Added new navigation component artifacts with support for launchScreen = both and updated Stores and Orders navigation

* Updated Mehul's store with new lat and lng coordinates and the buildCenterMarker() method to prevent the city marker from being displayed under the hinge

* Split Catalog and Products into two separate bottom nav items, added nav-graph, navigator and icon for Catalog, updated toolbar title, added DevMode changes

* Removed HostProducts and everything related to the Catalog-Products tabs

* Added scrollable list to the CatalogItemFragments for single landscape mode and VerticalViewPager for dual landscape mode

* Fixed a navigation issue when opening the About Screen

* Updated tests with latest changes and removed all ignored ones

* Moved catalog out of the products package

* CR changes - removed "en-us" part from Privacy Statement url to prevent issues, but the one from Terms of Use cannot be removed since the redirect is broken

* Updated package and application name (#18)

* Changed package name from "com.microsoft.device.display.sampleheroapp" to "com.microsoft.device.samples.dualscreenexperience"

* Updated github workflows and application class name

* Fixes for the feedback received (#19)

* Fixed same products being counted as two separate items using equals() and hashCode() and added unit tests

* Removed "en-us" also from other links, created a RestrictedWebViewClient which opens in the WebView only URLs with accepted hosts, otherwise opens side-by-side with app

* Fixed layer-list item order which caused problems for Android API level 22

* Removed fling gesture and animation from the bottom bar

* Fixed some UI issues - made the Submit Order and Add recommendation buttons bigger, added top padding for Store Details and List so they look ok in DLM

* Removed launch tutorial which recommends to span the app from non-SurfaceDuo devices

* Changed catalog texts to new ones Mehul provided from Wikipedia, added some spaces to make it look better in dual-screen

* Added support for unselecting a map marker when clicking on the map in a point without markers and when clicking on an already selected marker

* Handle No internet Connection on Stores Map (#20)

* Added no internet connection layout which is displayed/hidden based on a LiveData, also the ACCESS_NETWORK_STATE permission needed for the network listener

* Restricted animations only to zoom-in/out when the app is in dual screen mode and the user has clicked a marker

- Fixed an issue where map stops loading if it is tapped when animating
- Disabled more unused map features

* Fixed updated package also for the TokenProvider class from the release

* Refactored Stores and Products data tables to json and added fictious data (#21)

* Refactored stores and products to use data from a json file instead of the pre-populated database in order to change the data faster and easier, updated tests

* Changed store data to fictious data, moved pngs to assets and removed StoreImage enums by including the path in the object, removed pre-populated db

* Added proguard rules to keep Store and Product models so they can be seen by Gson when deserializing

* Added trademarks section to README file

* Feedback improvements for DevMode and added open-source repo NOTICE file (#22)

* Used the updated LiveDataTestUtil class from the google repo and added NOTICES.md for the two embedded third party classes we use in our open-source repo

* Added the design pattern to the Dev Mode name in case it exists to make it more visible that the content changes for each screen, improved strings

* Changed About licenses to be more compliant as discussed with OSS CELA - since I was not able to generate the whole NOTICE file, I manually created it, so it might need to be updated later

* Fixed tutorial position for the new DevMode with design pattern

* Create a map city tutorial to show that the circle marker is clickable (#23)

* Added a tutorial to make it visible that the map circle marker for the city is visible - used a Bing Maps Flyout and a touch icon integrated in the bitmap

- Used shared preferences to only show it for the first time and disable it after the user taps on the circle
- Changed the city coordinates so that the Map Flyout text fits also in landscape mode

* Updated mock city coordinates to make the tests work

* Changed product and store assets and the new app name (#24)

* Replaced guitar assets and renamed ProductType enums to prevent trademarks issues

* Changed Store items and Details About assets with vector ones

* Updated product NOTICE file name after reading the docs more carefully

* Updated minSdkVersion to 22 in order to have consistency with the Dual-Screen SDK

* Updated app and project name to approved one

* Replace Catalog text and assets to our own (#25)

* Updated Catalog text to our own and assets to vector generated ones

* Updated Catalog tests

* Removed Wikipedia from licesnse list since now we are using our own text

* Refactor Bing Maps to Google Maps and update NOTICE section (#26)

* Replaced Bing Maps with Google Maps in the StoreMapFragment, layout, MapUtils and tests

* Removed all Bing Maps and Firebase usages

* Removed licenses since there were no items in that list anymore and refactored displaying the NOTICE file to WebView rendering a local HTML, updated NOTICE file

* Added TODO and updated string for the code button in DevMode

* Feedback changes (#27)

* Updated dependencies to prepare for WM-beta and added debug app suffix so it can be installed alongside the release one

* Product feedback changes - replaced Purchase Order button to Add to Order, added support for deliveryDays and guitarType - bass and normal, changed toolbar title

* Catalog feedback changes - added normal guitar images to catalog, changed toolbar title, made ToC items clickable to go to specific page

* Store feedback changes - removed InfoWindow and always displayed Store Tutorial with new text, changed store Description and street names, fixed No Internet bug when List/Details was opened, handled no Google Services case

* Launch feedback changes - removed viewpager and displayed title, image, description, button in single screen as the new design

* About feedback changes - added Google legal and privacy terms in NOTICE.md and other notices, added MS Privacy Statement, added link to Github issue as feedback mechanism

* DevMode feedback changes - reordered toolbar icons, added ripple effect to DevMode buttons, replaced deprecated webview function

* Replaced Github issue page with correct one from Dual Screen Experience Example Github repository

* Refactored the github actions yml file to use Java 11, which is required by the new gradle versions

* Code review changes - made ProductResUtils more readable, added trim to ToC to fit more screen sizes, added DistinctValueLiveData class and guitarType UI tests

* Refactored StoreMapFragment to make it easier to change the map library based on buildType (#28)

* Updated libraries and navigation component to 2.3.5

* Split StoreMapFragment into business logic and map component and used an IMapComponent abstraction with two implementations - one using Google and another using Bing Maps for non-gms emulators

* Refactored licenses back to dynamic ones read from json file and split them and NOTICE.md files based on buildType

* Fixed some tests and found a way to run the UI tests for BingMaps (without having to duplicate the code in debug) using the testBuildType "releaseEmulator" in build.gradle

* Code review improvements - better naming of classes, only left the meta-data in buildType's manifest files because they are merged with the main one

* Removed the private artifacts from the project to merge the current state to main

* Updated .gitignore file

Co-authored-by: Sorin Albu <74547562+soalb-m@users.noreply.github.com>
2021-11-01 16:13:50 +02:00
..
build-app.yml Merge into main without navigation library (#29) 2021-11-01 16:13:50 +02:00