Skip to content
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

HIPM-909: Replace Realm with SQLite/EF Core #207

Merged
merged 81 commits into from
Mar 17, 2018

Conversation

SvenEV
Copy link
Contributor

@SvenEV SvenEV commented Mar 13, 2018

This PR replaces our current database solution (Realm) with an SQLite database using Entity Framework Core as an ORM. See Database Schema on Confluence for an overview of the new, reworked database schema.

Design goals

To simplify reasoning about the code, we want to make it very clear whether a method or code block only reads from the database or also modifies it. DbManager now provides the "entry point" for any database access: Use DbManager.DataAccess for reading and DbManager.StartTransaction(...) for inserting/updating/deleting data. Avoid the usage of IoCManager.Resolve<IDataAccess>().

EF Core details: Change tracking is generally disabled and queried entities are returned in the "detached" (aka "disconnected") state. However, change tracking is enabled in the scope of a transaction so that entities can be added/deleted/modified arbitrarily and those changes are detected and persisted when the transaction is committed. There may be scenarios where you have already queried entities outside of a transaction, but then want to modify and save them inside of a transaction. To do so, those entities have to be "attached" to the change tracker when the transaction starts by passing them as arguments to the DbManager.StartTransaction(...) method. You can read more about Tracking vs. No-Tracking Queries and Disconnected Entities in the EF Core docs.

Open issues (we may want to solve them in separate tasks)

  • Unit tests are compiling, but some are failing
  • Images on the exhibit pages are blurry. The cause is unknown. This issue can be worked around by removing DownsampleToViewSize="True" everywhere. However, this might increase memory usage.
  • Previously, ExhibitSet.Timestamp was updated on ExhibitsBaseDataFetcher.ProcessExhibits(…) - this is no longer possible because type ExhibitSet was eliminated. Do we still need to store such a timestamp somewhere? Where is it used?

Applied workarounds

During development I encountered some issues and found workarounds for them that might not be needed anymore in the future:

  • Problem: TFS builds failing with The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly netstandard and similar messages
    Workaround: Explicitly add <PackageReference Include="NETStandard.Library" version="2.0.0" /> to .NET Standard projects, see https://stackoverflow.com/a/47515178/5981964
  • Problem: Explicitly loading the navigation property ImagePage.Image doesn't work (EF Core bug).
    Workaround: Declare a real property ImagePage.ImageId that replaces the shadow property that is automatically declared otherwise. Probably related: Tracking query on base type when derived type has shadow properties throws dotnet/efcore#11104
  • Problem: In addition to the normal assembly (DLL), the NuGet package "System.Runtime.CompilerServices.Unsafe" contains a so-called "reference assembly" that contains only definitions, but no implementations. Xamarin/Mono incorrectly picks the reference assembly on compilation, resulting in the app crashing on startup.
    Workaround: Create a modified version of the NuGet package that does not contain a reference assembly, see ResolveAssemblies task wrongly uses reference assemblies dotnet/android#1162 (comment). This modified package is hosted in our MyGet feed.

sayantik and others added 30 commits February 1, 2018 12:51
* Added a UI button to test changes

* Added more icon to UI

* Changed command for UI

* Added functionality to  vert button. Removed old button.

* Changes in toolbar naming
…ings.resx file (#184)

* Replaced all strings with strings from the Strings.resx.

* Removed old changes made to the LoadingPageViewModel.

* Replaced redundant strings "Ok", "Abbrechen", "Ja" and "Nein" and translated strings "Account" and "Achievement" to german.
* Changed some code lines according to ReSharper recommandations

* Restructured the SetRatingStar method.

* Added white background to the user rating page.

* Added a method to get a http response with the user token as authorization.

* Added method to MochUserRatingApiAccess to match the interface.

* Added some doc for the SetRatingStars method.

* Changed the SetRatingStar method according to the comments of christian.

* Added a check for the network connection before fetching the user rating data.

* Changed network check to a try-catch block.

* Trigger CI build (since someone cancelled it)
* reformat info bubble on map for ios device

* Trigger CI build (since someone cancelled it)
… fit the new design (#186)

* Changed the layout of the ExhibitRouteDownloadPage.

* Shortened the download text to: "Lade zusätzliche Daten herunter".

* Centered the labels on the ExhibitRouteDownloadPage
…leaned up some entity classes, added more CREATE TABLE statements, removed unused usings, removed ExhibitSet, RouteSet, MapMarker, LongElement & StringElement
* Master merged to branch

* Added the requisite packages

* Added requisite packages to handle error

* Split screen to two halves diagonally

* Added changes to split into two different coloured regions diagonally

* changes to naming

* Changed variable names

* Testing changes

* Added images, changed triangular orientation

* Changes to add both modes

* Changes to layout to work for different screen sizes

* Changed colour as per colour scheme

* Added details page

* Changes for professor details

* Changes to navigate to details

* Added alternative creation of navigation stack; implemented basic functionalities for character selection

* Switch images on choosing different characters

* Change background colours depending on mode selected

* Changes to change text dynamically

* Changes for button text to be driven from resources instead of hardcode

* set large heap to true to avoid OOM error

* Redone changes for string resources

* Changes to layout to avoid overlapping button
…llow a valid relational schema - this included creating join tables for many-to-many relationships (Route <-> RouteTag, Route <-> Exhibit, Exhibit <-> Page, Page <-> Page) and setting up inheritance (Pages, Achievements, Media) using the "table-per-hierarchy" method (see EF Core docs)
* changed Labels to Buttons on
Login Page, Register Page, and ForgotPassword Page

* fix tfs error
dll could not be find

* changes buttons' text color into default color
…ges; rating page after additional information pages hidden (#188)
* *changed all icons and logos into new ones which should follow our guideline manual

* re-adjust launch screen

* Update HipMobileUI.Droid.csproj
…ction scope entities that have just been added can also be queried before the transaction is committed
@SvenEV SvenEV changed the title (WIP) HIPM-909: Replace Realm with SQLite/EF Core HIPM-909: Replace Realm with SQLite/EF Core Mar 14, 2018
@SvenEV
Copy link
Contributor Author

SvenEV commented Mar 14, 2018

PR is now ready to review. Note that iOS builds are only working on one of our Mac build agents currently.

@SvenEV SvenEV requested a review from cbruegg March 14, 2018 22:01
@SvenEV SvenEV changed the title HIPM-909: Replace Realm with SQLite/EF Core HIPM-909: Replace Realm with SQLite/EF Core Mar 16, 2018
@SvenEV SvenEV changed the title HIPM-909: Replace Realm with SQLite/EF Core HIPM-909: Replace Realm with SQLite/EF Core Mar 16, 2018
Copy link
Member

@cbruegg cbruegg left a comment

Choose a reason for hiding this comment

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

Thanks for this big pull request! The functional test was successful and the code changes look good too. You've also nicely refactored code in a few places which should make our code easier to maintain in the future.

I've left you some feedback inline.

Regarding the open issues:

  • Unit tests need to be fixed before merging to master, but that can be done once a PR for iss-hipm-890 is opened
  • Regarding blurry images: We need to create a JIRA issue for this once iss-hipm-890 is merged.
  • I've left an inline comment regarding ExhibitSet.Timestamp

Regarding the reference assembly workaround: Could you please add a note about why a custom package is needed to the description of the Unsafe package on MyGet, if you haven't done that yet? This way the explanation would be visible right away when someone tries to change the version of the package in the NuGet Package Manager.

I will now review the changes from iss-hipm-890. After I've done that and the inline comments have been addressed, we can merge this into iss-hipm-890 and then merge that into master.


if (fetchedChangedExhibits.Any())
{
var exhibitSet = ExhibitManager.GetExhibitSets().SingleOrDefault();
exhibitSet.Timestamp = fetchedChangedExhibits.Max(x => x.Timestamp);
// TODO: How to set timestamp of ExhibitSet?
Copy link
Member

Choose a reason for hiding this comment

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

In the original version of ExhibitsBaseDataFetcher, the exhibitSet.Timestamp is used to only fetch exhibits that are more recent than the timestamp of this ExhibitSet. Since only a single ExhibitSet exists in the database and its timestamp should always be max { exhibit.Timestamp }, we probably don't need to store this anymore. It seems like you had the same idea and changed the AnyExhibitChanged method in ExhibitsBaseDataFetcher accordingly, so this TODO can be removed.

{
if (page.Images.Count > 0)
Copy link
Member

Choose a reason for hiding this comment

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

This checks seems to be unnecessary

}
else
{
appetizerPagesToRemove.Add(page);
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why this is no longer done? I've tried a few minutes to find out why this is no longer needed, but I couldn't come to a result so far.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason is that appetizer pages have been eliminated completely. At some point we decided to remove this page type from DataStore. I guess the removed lines here were some kind of workaround for the "transition phase".

var fetchedImages = fetchedMedia.Images;

if (fetchedImages.Count > 0)
{
foreach (var fImg in fetchedImages)
for (var i = 0; i < timeSliderPage.SliderImages.Count; i++)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add an assertion here that timeSliderPage.SlidesImages.Count == pageDto.Images.Count. Not sure if it's really needed, just a suggestion to make this code more robust.

/// <param name="updateCurrent">If true, first removes any object of the same type with the id.</param>
/// <returns></returns>
public TModelObject Convert(TDtoObject dto, [NotNull] string id, bool updateCurrent = false)
public TModelObject ConvertReplacingExisting(TDtoObject dto, [NotNull]string id, ITransactionDataAccess dataAccess)
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: Needs space between [NotNull] and string

public Rectangle(){
}
}
public Rectangle(int left, int top, int right, int bottom) : this()
Copy link
Member

Choose a reason for hiding this comment

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

Why is : this() needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, it isn't in this case

/// Provides properties that allow the developer to drill into the current
/// database data and change tracking information during a debug session.
/// </summary>
[DebuggerDisplay("🔧 Inspect data and tracked entities")]
Copy link
Member

Choose a reason for hiding this comment

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

Great usage of Unicode support in C#, highly improves the quality of our codebase. Thanks! 😆

{
// Note: Query() won't attach to change tracker

// TODO: This doesn't seem to work correctly
Copy link
Member

Choose a reason for hiding this comment

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

Should this be merged then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this is not impacting app functionality in any way and I couldn't find a robust solution yet, I think we don't need to fix this now. Remember, it's only for debugging purposes - let's just write bug-free code, then we don't even need this 😄

var i = 0;
var target = navigationTarget;
foreach (var item in collection)
array[arrayIndex + i++] = item[target];
Copy link
Member

Choose a reason for hiding this comment

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

Using i++ inside the indexing operator can be confusing (especially for people who don't code every day), please move it into a seperate line to also make order of operations clear.

using System.Collections.Generic;
using System.Linq;

namespace PaderbornUniversity.SILab.Hip.Mobile.Shared.DataAccessLayer
Copy link
Member

Choose a reason for hiding this comment

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

I find this whole file difficult to understand. Any chance you could document its usage with a few examples on Confluence or in a GitHub wiki page and link it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added some more documentation and linked to the blog article I have taken most of the code from. I think the article explains the problem and the idea very well.

@SvenEV
Copy link
Contributor Author

SvenEV commented Mar 17, 2018

I improved the description of the Unsafe package on MyGet and added a link to the Xamarin.Android issue. I guess we can merge now.

@SvenEV
Copy link
Contributor Author

SvenEV commented Mar 17, 2018

Ah I see now, GitHub was hiding them

@cbruegg
Copy link
Member

cbruegg commented Mar 17, 2018

Looks good to me now, feel free to merge!

@SvenEV
Copy link
Contributor Author

SvenEV commented Mar 17, 2018

Great, thanks for the detailed review and elaborate feedback!

@SvenEV SvenEV merged commit 18cfb3d into iss-hipm-890 Mar 17, 2018
@SvenEV SvenEV deleted the iss-hipm-909-dapper-based-on-890 branch March 17, 2018 17:59
SvenEV pushed a commit that referenced this pull request Mar 19, 2018
* Migrated class libraries to .NET Standard 2.0

* Migrated Android and iOS projects to new project format (WIP: iOS does not yet compile)

* Updated NuGet packages

* UWP project cleanup

* More NuGet updating and consolidation

* iOS workaround: Fixed build by explicitly referencing package "System.Reflection.Emit", but then excluding all its contents (e.g. dll-file). See answer by "gmwilhelm" on xamarin/Xamarin.Forms#1380.

* Migrated "HipMobile.Tests" to .NET Core 2.0 and NUnit 3

* Migrated "HipMobileUI.Tests" and "HipMobile.UITests" to .NET Core 2.0 and NUnit 3, cleanup

* Added NuGet.Config so that packages from our MyGet feed can be restored

* Fix build error

* Remove unsafe dependency

* Fix namespaces

* HIPM-909: Replace Realm with SQLite/EF Core  (#207)

* Iss hipm 792 (#170)

* Added a UI button to test changes

* Added more icon to UI

* Changed command for UI

* Added functionality to  vert button. Removed old button.

* Changes in toolbar naming

* Remove Realm references

* Fix namespaces

* Reformat Token

* WIP

* iss-hipm-904-Strings.resx Strings should always be located in the Strings.resx file (#184)

* Replaced all strings with strings from the Strings.resx.

* Removed old changes made to the LoadingPageViewModel.

* Replaced redundant strings "Ok", "Abbrechen", "Ja" and "Nein" and translated strings "Account" and "Achievement" to german.

* Fixed toolbar color and unnecessary adjust-statusbar calls (#180)

* Iss hipm 859 As a user, I want to see my own rating of an exhibit (#177)

* Changed some code lines according to ReSharper recommandations

* Restructured the SetRatingStar method.

* Added white background to the user rating page.

* Added a method to get a http response with the user token as authorization.

* Added method to MochUserRatingApiAccess to match the interface.

* Added some doc for the SetRatingStars method.

* Changed the SetRatingStar method according to the comments of christian.

* Added a check for the network connection before fetching the user rating data.

* Changed network check to a try-catch block.

* Trigger CI build (since someone cancelled it)

* iss-hipm-802 reformat info bubble on map for ios device (#187)

* reformat info bubble on map for ios device

* Trigger CI build (since someone cancelled it)

* iss-hipm-908 Update layout of the download page of routes/exhibits to fit the new design (#186)

* Changed the layout of the ExhibitRouteDownloadPage.

* Shortened the download text to: "Lade zusätzliche Daten herunter".

* Centered the labels on the ExhibitRouteDownloadPage

* Restored download functionality + some code cleanup (#193)

* GeoLocation and Rectangle are now structs (instead of DB entities), cleaned up some entity classes, added more CREATE TABLE statements, removed unused usings, removed ExhibitSet, RouteSet, MapMarker, LongElement & StringElement

* Iss hipm 844 (#192)

* Master merged to branch

* Added the requisite packages

* Added requisite packages to handle error

* Split screen to two halves diagonally

* Added changes to split into two different coloured regions diagonally

* changes to naming

* Changed variable names

* Testing changes

* Added images, changed triangular orientation

* Changes to add both modes

* Changes to layout to work for different screen sizes

* Changed colour as per colour scheme

* Added details page

* Changes for professor details

* Changes to navigate to details

* Added alternative creation of navigation stack; implemented basic functionalities for character selection

* Switch images on choosing different characters

* Change background colours depending on mode selected

* Changes to change text dynamically

* Changes for button text to be driven from resources instead of hardcode

* set large heap to true to avoid OOM error

* Redone changes for string resources

* Changes to layout to avoid overlapping button

* WIP Replaced Dapper with Entity Framework Core

* Unified MediaFileManager

* WIP

* WIP projects compiling again! Refactored model classes so they now follow a valid relational schema - this included creating join tables for many-to-many relationships (Route <-> RouteTag, Route <-> Exhibit, Exhibit <-> Page, Page <-> Page) and setting up inheritance (Pages, Achievements, Media) using the "table-per-hierarchy" method (see EF Core docs)

* Fixed issues preventing EF Core from creating a correct model

* Added support for eager loading of navigation properties, started using this in manager classes

* Re-enabled map control, bugfixes

* iss-hipm-913 Labels to Buttons (#194)

* changed Labels to Buttons on
Login Page, Register Page, and ForgotPassword Page

* fix tfs error
dll could not be find

* changes buttons' text color into default color

* Implemented a debug view for DbContexts to inspect data & change tracker while debugging, some bugfixes

* Fixed status bar color bug; solved related indexing problem hiding pages; rating page after additional information pages hidden (#188)

* Bug fixes in debug view and EF Core model creation

* Bugfix

* iss-hipm-907-bug icon doesn't fit new design manual (#190)

* *changed all icons and logos into new ones which should follow our guideline manual

* re-adjust launch screen

* Update HipMobileUI.Droid.csproj

* Bug fix in DtoToModelConverter

* Updated DbContextDebugView (copied over changes from a personal project)

* EFCoreDataAccess now also queries the local cache so that in a transaction scope entities that have just been added can also be queried before the transaction is committed

* Removed debug output of EFCoreTransaction, fixed GeoLocationConverter (decimal point no longer depends on system language)

* Fixed OsmMap exhibit binding

* Fixed route download, BackupImage & BackupImageTag now tracked by default when starting a transaction, improved documentation, cleanup

* Minor cleanup

* Iss hipm 910 As a user, I want to use the application in English (#195)

* Added scripts for the string translation

* Added the first translated texts

* Added some translations for german texts

* Added a translations for the last german strings

* Reformated the Strings.resx

* Fixed some typos

* Changed "Downloading..." to "Downloading additional data"

* Made some changes according to the comments of markus

* Replaced capital letters in title strings with lowercase letters

* WIP deep-loading exhibit pages and associated media, fixed JoinCollectionFacade.CopyTo()-methods

* Iss hipm 911 - Rework of the main menu (#189)

* Changed order of menu items; user name displayed in menu when logged in

* Added configuration class to allow more dynamic and simpler modification of main menu

* Renamed and relocated some files to fit into the page/view-schema

* Condnl. visibility on score (#197)

* Condnl. visibility on score

* Removed redundant code

* Iss hipm 902 infobubble (#196)

* Change to packages

* Added a new image (svg converted to xml) to test

* WIP-Changed info button to a different layout

* changes to layout

* Added a new design for bubble

* Resolved error for other devices and changed layout

* Changes as per review comments

* Added padding on top

* Formatting fixes (#198)

* Formatting fixes

* Fix spaces vs. tabs

* Iss-hipm-905 changed all the fonts and colors (#185)

* follow design guidline
*add fonts files
*change color setting in ResourceDictionary (App.xaml)
*specify fonts setting in ResourceDictionary (App.xaml)

* add files

* did some minor changes as PR review required

* just try to build ios successfully

* no message

* switch to new color shades

* *changed all the colors (according to last PR iss-hipm-866)
*changed all the fonts according to our design mannual

   *titles and headlines I used SourceSansPro-Regular, some big title is SourceSansPro-Bond
   * Description should be SourceSansPro-Light( SourceSansPro-Italic ,in some cases)
    *Alert or wanring : SourceSansPro-Bond
    *Besides all these, others should be SourceSansPro-Regular as well.

* Change of style with focus on better readability and mode specificity

* no message

* more fonts and colors changes

* no message

* no message

* move <styles> tags back
cause it was not working in App.Xmal
minor changes on colors

* mis-added a file
deleted it

* minor changes according to Po's changes and requirments

* Minor changes to style of some pages

* Bugfixes related to LicensePage

* no message

* minor changes *
bg colors and some fonts changing

* 1. White bg in every page.
2. Enter exhibit the during the downloading process , loading bar should be PrimaryDarkColor ,title should be PrimaryDarkColor(semi-bold), under the title should be Black(regular)
3. Left-navi bar change back to Regular,
4. TXT on Achievements page: black
5. ExhibitPreviewPage: (button的txt 直接改成YES NO)PrimaryDarkColor Regular
6. TXT on Exhibit details page = black
7. Audio script = black
8. Routes.  Read aloud(semiar Black color) button txt black(semi-bold),description is regular black
9. Profile page (txt in first button = black)

* Fixed minor issues related to PR

* Another set of small changes

* Reverted changes to Android release properties

* Small changes for a more consistent UI experience (#199)

* Iss hipm 929 ratingtoappetizer (#200)

* Changes for back button on user page

* Changed navigation stack to change the back button functionality

* Redone changes

* Changes as per review comments

* Added await

* Don't automatically target latest Android version (dangerous)

* Fixed iOS project

* Make it build

* Fix warnings

* Fixed first page missing in exhibit details, some cleanup

* Iss hipm 918 iosexhibitdetails (#203)

* Reverted changes from HIPM-847 to get the exhibit details page back

* Removed try-catch block

* Undone changes and added additional condn.

* test changes

* re-changes

* Revert submodule ref change

* Changed and-statement to or-statement

* Fixes

* Merge master again

* Fix iOS by recharging Sqlite PCL battery

* TFS builds fixed! (Problem was OsmSharp: my PC selected the patched version from MyGet while the build agent selected the official, .NET Standard incompatible version from NuGet. Solution: Using a different version number for the patched package on MyGet)

* Cleanup

* Increased Java heap size during compilation to hopefully fix TFS builds

* Fixed test compilation

* Fixed private field naming according to ReSharper config

* ReSharper fixes

* Removed TODOs, edited comments

* Made write access to the database even more explicit: DbManager.DataAccess now only provides read access so every modification to the database has to happen in a transaction

* Improved documentation

* Fixed tests

* Moved patched dependency "System.Runtime.CompilerServices.Unsafe" from Android to shared project so that it is also used in the iOS project

* Build works in VSMac via VNC, but not when executed through TFS. Trying to fix it by adding explicit references to "NETStandard.Library" as suggested in https://stackoverflow.com/questions/47451268/net-standard-2-0-xamarin-ios-project-vsts-build-issue

* Removed unused type "SliderImage"

* Removed unused type "AppetizerPage"

* Remove references to Fody

* Addressed feedback

* Removed redundant " : this()"

* Improved documentation

* Added TODO to unclear properties

* Clarified null behavior

* Now using 'nameof' everywhere when eager loading related entities

* Added NoWarn="NU1701" to .NET Framework package references to eliminate warnings

* Merge in the last changes

* Merge in the last changes

* Fixed merge accidents

* Fix merge error

* Replaced SkiaSharp DLL reference with a NuGet package reference

* Fixed route download (requires route's exhibits to be eager-loaded)
SvenEV added a commit that referenced this pull request Mar 26, 2018
* Migrated class libraries to .NET Standard 2.0

* Migrated Android and iOS projects to new project format (WIP: iOS does not yet compile)

* Updated NuGet packages

* UWP project cleanup

* More NuGet updating and consolidation

* iOS workaround: Fixed build by explicitly referencing package "System.Reflection.Emit", but then excluding all its contents (e.g. dll-file). See answer by "gmwilhelm" on xamarin/Xamarin.Forms#1380.

* Migrated "HipMobile.Tests" to .NET Core 2.0 and NUnit 3

* Migrated "HipMobileUI.Tests" and "HipMobile.UITests" to .NET Core 2.0 and NUnit 3, cleanup

* Added NuGet.Config so that packages from our MyGet feed can be restored

* Fix build error

* Remove unsafe dependency

* Fix namespaces

* HIPM-909: Replace Realm with SQLite/EF Core  (#207)

* Iss hipm 792 (#170)

* Added a UI button to test changes

* Added more icon to UI

* Changed command for UI

* Added functionality to  vert button. Removed old button.

* Changes in toolbar naming

* Remove Realm references

* Fix namespaces

* Reformat Token

* WIP

* iss-hipm-904-Strings.resx Strings should always be located in the Strings.resx file (#184)

* Replaced all strings with strings from the Strings.resx.

* Removed old changes made to the LoadingPageViewModel.

* Replaced redundant strings "Ok", "Abbrechen", "Ja" and "Nein" and translated strings "Account" and "Achievement" to german.

* Fixed toolbar color and unnecessary adjust-statusbar calls (#180)

* Iss hipm 859 As a user, I want to see my own rating of an exhibit (#177)

* Changed some code lines according to ReSharper recommandations

* Restructured the SetRatingStar method.

* Added white background to the user rating page.

* Added a method to get a http response with the user token as authorization.

* Added method to MochUserRatingApiAccess to match the interface.

* Added some doc for the SetRatingStars method.

* Changed the SetRatingStar method according to the comments of christian.

* Added a check for the network connection before fetching the user rating data.

* Changed network check to a try-catch block.

* Trigger CI build (since someone cancelled it)

* iss-hipm-802 reformat info bubble on map for ios device (#187)

* reformat info bubble on map for ios device

* Trigger CI build (since someone cancelled it)

* iss-hipm-908 Update layout of the download page of routes/exhibits to fit the new design (#186)

* Changed the layout of the ExhibitRouteDownloadPage.

* Shortened the download text to: "Lade zusätzliche Daten herunter".

* Centered the labels on the ExhibitRouteDownloadPage

* Restored download functionality + some code cleanup (#193)

* GeoLocation and Rectangle are now structs (instead of DB entities), cleaned up some entity classes, added more CREATE TABLE statements, removed unused usings, removed ExhibitSet, RouteSet, MapMarker, LongElement & StringElement

* Iss hipm 844 (#192)

* Master merged to branch

* Added the requisite packages

* Added requisite packages to handle error

* Split screen to two halves diagonally

* Added changes to split into two different coloured regions diagonally

* changes to naming

* Changed variable names

* Testing changes

* Added images, changed triangular orientation

* Changes to add both modes

* Changes to layout to work for different screen sizes

* Changed colour as per colour scheme

* Added details page

* Changes for professor details

* Changes to navigate to details

* Added alternative creation of navigation stack; implemented basic functionalities for character selection

* Switch images on choosing different characters

* Change background colours depending on mode selected

* Changes to change text dynamically

* Changes for button text to be driven from resources instead of hardcode

* set large heap to true to avoid OOM error

* Redone changes for string resources

* Changes to layout to avoid overlapping button

* WIP Replaced Dapper with Entity Framework Core

* Unified MediaFileManager

* WIP

* WIP projects compiling again! Refactored model classes so they now follow a valid relational schema - this included creating join tables for many-to-many relationships (Route <-> RouteTag, Route <-> Exhibit, Exhibit <-> Page, Page <-> Page) and setting up inheritance (Pages, Achievements, Media) using the "table-per-hierarchy" method (see EF Core docs)

* Fixed issues preventing EF Core from creating a correct model

* Added support for eager loading of navigation properties, started using this in manager classes

* Re-enabled map control, bugfixes

* iss-hipm-913 Labels to Buttons (#194)

* changed Labels to Buttons on
Login Page, Register Page, and ForgotPassword Page

* fix tfs error
dll could not be find

* changes buttons' text color into default color

* Implemented a debug view for DbContexts to inspect data & change tracker while debugging, some bugfixes

* Fixed status bar color bug; solved related indexing problem hiding pages; rating page after additional information pages hidden (#188)

* Bug fixes in debug view and EF Core model creation

* Bugfix

* iss-hipm-907-bug icon doesn't fit new design manual (#190)

* *changed all icons and logos into new ones which should follow our guideline manual

* re-adjust launch screen

* Update HipMobileUI.Droid.csproj

* Bug fix in DtoToModelConverter

* Updated DbContextDebugView (copied over changes from a personal project)

* EFCoreDataAccess now also queries the local cache so that in a transaction scope entities that have just been added can also be queried before the transaction is committed

* Removed debug output of EFCoreTransaction, fixed GeoLocationConverter (decimal point no longer depends on system language)

* Fixed OsmMap exhibit binding

* Fixed route download, BackupImage & BackupImageTag now tracked by default when starting a transaction, improved documentation, cleanup

* Minor cleanup

* Iss hipm 910 As a user, I want to use the application in English (#195)

* Added scripts for the string translation

* Added the first translated texts

* Added some translations for german texts

* Added a translations for the last german strings

* Reformated the Strings.resx

* Fixed some typos

* Changed "Downloading..." to "Downloading additional data"

* Made some changes according to the comments of markus

* Replaced capital letters in title strings with lowercase letters

* WIP deep-loading exhibit pages and associated media, fixed JoinCollectionFacade.CopyTo()-methods

* Iss hipm 911 - Rework of the main menu (#189)

* Changed order of menu items; user name displayed in menu when logged in

* Added configuration class to allow more dynamic and simpler modification of main menu

* Renamed and relocated some files to fit into the page/view-schema

* Condnl. visibility on score (#197)

* Condnl. visibility on score

* Removed redundant code

* Iss hipm 902 infobubble (#196)

* Change to packages

* Added a new image (svg converted to xml) to test

* WIP-Changed info button to a different layout

* changes to layout

* Added a new design for bubble

* Resolved error for other devices and changed layout

* Changes as per review comments

* Added padding on top

* Formatting fixes (#198)

* Formatting fixes

* Fix spaces vs. tabs

* Iss-hipm-905 changed all the fonts and colors (#185)

* follow design guidline
*add fonts files
*change color setting in ResourceDictionary (App.xaml)
*specify fonts setting in ResourceDictionary (App.xaml)

* add files

* did some minor changes as PR review required

* just try to build ios successfully

* no message

* switch to new color shades

* *changed all the colors (according to last PR iss-hipm-866)
*changed all the fonts according to our design mannual

   *titles and headlines I used SourceSansPro-Regular, some big title is SourceSansPro-Bond
   * Description should be SourceSansPro-Light( SourceSansPro-Italic ,in some cases)
    *Alert or wanring : SourceSansPro-Bond
    *Besides all these, others should be SourceSansPro-Regular as well.

* Change of style with focus on better readability and mode specificity

* no message

* more fonts and colors changes

* no message

* no message

* move <styles> tags back
cause it was not working in App.Xmal
minor changes on colors

* mis-added a file
deleted it

* minor changes according to Po's changes and requirments

* Minor changes to style of some pages

* Bugfixes related to LicensePage

* no message

* minor changes *
bg colors and some fonts changing

* 1. White bg in every page.
2. Enter exhibit the during the downloading process , loading bar should be PrimaryDarkColor ,title should be PrimaryDarkColor(semi-bold), under the title should be Black(regular)
3. Left-navi bar change back to Regular,
4. TXT on Achievements page: black
5. ExhibitPreviewPage: (button的txt 直接改成YES NO)PrimaryDarkColor Regular
6. TXT on Exhibit details page = black
7. Audio script = black
8. Routes.  Read aloud(semiar Black color) button txt black(semi-bold),description is regular black
9. Profile page (txt in first button = black)

* Fixed minor issues related to PR

* Another set of small changes

* Reverted changes to Android release properties

* Small changes for a more consistent UI experience (#199)

* Iss hipm 929 ratingtoappetizer (#200)

* Changes for back button on user page

* Changed navigation stack to change the back button functionality

* Redone changes

* Changes as per review comments

* Added await

* Don't automatically target latest Android version (dangerous)

* Fixed iOS project

* Make it build

* Fix warnings

* Fixed first page missing in exhibit details, some cleanup

* Iss hipm 918 iosexhibitdetails (#203)

* Reverted changes from HIPM-847 to get the exhibit details page back

* Removed try-catch block

* Undone changes and added additional condn.

* test changes

* re-changes

* Revert submodule ref change

* Changed and-statement to or-statement

* Fixes

* Merge master again

* Fix iOS by recharging Sqlite PCL battery

* TFS builds fixed! (Problem was OsmSharp: my PC selected the patched version from MyGet while the build agent selected the official, .NET Standard incompatible version from NuGet. Solution: Using a different version number for the patched package on MyGet)

* Cleanup

* Increased Java heap size during compilation to hopefully fix TFS builds

* Fixed test compilation

* Fixed private field naming according to ReSharper config

* ReSharper fixes

* Removed TODOs, edited comments

* Made write access to the database even more explicit: DbManager.DataAccess now only provides read access so every modification to the database has to happen in a transaction

* Improved documentation

* Fixed tests

* Moved patched dependency "System.Runtime.CompilerServices.Unsafe" from Android to shared project so that it is also used in the iOS project

* Build works in VSMac via VNC, but not when executed through TFS. Trying to fix it by adding explicit references to "NETStandard.Library" as suggested in https://stackoverflow.com/questions/47451268/net-standard-2-0-xamarin-ios-project-vsts-build-issue

* Removed unused type "SliderImage"

* Removed unused type "AppetizerPage"

* Remove references to Fody

* Addressed feedback

* Removed redundant " : this()"

* Improved documentation

* Added TODO to unclear properties

* Clarified null behavior

* Now using 'nameof' everywhere when eager loading related entities

* Added NoWarn="NU1701" to .NET Framework package references to eliminate warnings

* Merge in the last changes

* Merge in the last changes

* Fixed merge accidents

* Fix merge error

* Replaced SkiaSharp DLL reference with a NuGet package reference

* Fixed route download (requires route's exhibits to be eager-loaded)

* HIPM-868: Support for Xamarin.Forms XAML Previewer (#191)

* Added DesignTime classes, fixed deprecation warnings

* Added DesignMode.Initialize(this)-calls to page constructors

* Cleanup

* ViewModel cleanup

* Improved XAML previewer support

* Page background is now set to white in design mode

* Fixed naming of a class

* Cleanup

* NuGet.Config now includes nuget.org-source (needed for TFS build)

* DesignMode.Initialize now does nothing if design mode disabled

* Explicitly added a reference to latest Newtonsoft.Json, hoping that this will fix TFS builds

* Cleanup

* Post-merge fixes and cleanup

* Removed unused solution file

* Fixed variable naming

* Updated Resource.designer.cs, removed HipMobileUI.sln
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants