-
Notifications
You must be signed in to change notification settings - Fork 37
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
Frontend.XF: added the settings icon and side menu #203
Frontend.XF: added the settings icon and side menu #203
Conversation
kubaflo
commented
Jan 30, 2023
•
edited
Loading
edited
iOS | Android |
---|---|
9bd5499
to
c6179db
Compare
@kubaflo why do you include the two PNG logo files? there are already logo files in the iOS project |
|
@@ -141,5 +144,6 @@ | |||
<PackageReference Include="Fsdk" Version="0.6.0--date20230118-0634.git-b829db2"> | |||
<GeneratePathProperty></GeneratePathProperty> | |||
</PackageReference> | |||
<EmbeddedResource Include="Resources\Fonts\FontAwesomeSolid.otf" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo let's remove this, we can improve the design in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay
this.IsPresented <- true | ||
|
||
member this.OpenSettings_Tapped(_: obj, _: EventArgs) = | ||
Application.Current.MainPage.DisplayAlert("Settings", "Succesfully opened the settings page", "Ok") |> ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo let's hook up the real feature, same as what Frontend.Console is doing, please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But isn't it a request beyond the scope of this task? I thought I was supposed to add an icon and a side menu, not implement the things in the settings inside the app. I can do it but I don't think that it should be done in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are things that can be split to other PRs and there are things that cannot. If I merge this PR as is, then the frontend
branch would be in an unreleasable state, you understand? We cannot show to end-users certain UI that does nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knocte okay, I will implement it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knocte can I use popups to implement this functionality or you'd prefer separate pages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it depends; if popups mean a lot of platform-specific code, I'd prefer pages
Fixed |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:GWallet.Frontend.XF" | ||
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this iOS thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without we wouldn't be able to apply a safe area to the ios version of the app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is a safe area?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened here? (I generally recommend rebasing PRs via |
@knocte This is how it looks now :) |
68a96c8
to
3901e73
Compare
@knocte I did the rebase, squashed commits, removed unnecessary things and removed colours |
f575e81
to
87ff387
Compare
And you also squashed commits! Nice. But CI is red because of this warning:
We have warnings as errors in Release mode :) |
73e25ec
to
8327249
Compare
@knocte I fixed this error. However, if CI after this is still red, I will need your help :) |
8327249
to
440e0bb
Compare
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="GWallet.Frontend.XF.SettingsPage"> | ||
|
||
<AbsoluteLayout> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo question, is there any specific reason of why you used AbsoluteLayout here instead of an non-absolute alternative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is necessary as I want the 'mainLayout' to occupy 70% of the page's width
<StackLayout x:Name="mainLayout"
AbsoluteLayout.LayoutFlags="XProportional,SizeProportional"
AbsoluteLayout.LayoutBounds="0.5,50,0.7,1"
VerticalOptions="FillAndExpand">
440e0bb
to
dadd3d3
Compare
<Image HeightRequest="80" | ||
WidthRequest="80" | ||
Margin="0,0,0,10" | ||
x:Name="logoInSidemenu"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo cosmetic: let's rename this to sideMenuImg
(this way, in case we decide to stop using a logo in the future, we don't need to rename it again)
<Label VerticalOptions="Center" Text="#"/> | ||
<Label Text="Check you still remember your payment password"/> | ||
<StackLayout.GestureRecognizers> | ||
<TapGestureRecognizer CommandParameter="Check you still remember your payment password" Tapped="OpenSettings_Tapped"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo 2 cosmetic things here:
- Let's not use underscores in method names
- We don't need to put the full sentence here in the CommandParameter attribute right? I mean, in case we need to change the text of the UI in the future, we should be able to just change it in one place, not three
<Label VerticalOptions="Center" Text="#"/> | ||
<Label Text="Check you still remember your secret recovery phrase"/> | ||
<StackLayout.GestureRecognizers> | ||
<TapGestureRecognizer CommandParameter="Check you still remember your secret recovery phrase" Tapped="OpenSettings_Tapped"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo same 2 cosmetic things here ^
<Label VerticalOptions="Center" Text="#"/> | ||
<Label Text="Wipe your current wallet, in order to start from scratch"/> | ||
<StackLayout.GestureRecognizers> | ||
<TapGestureRecognizer CommandParameter="Wipe your current wallet, in order to start from scratch" Tapped="OpenSettings_Tapped"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo same 2 cosmetic things here ^
<controls:CircleChartView x:Name="normalChartView" | ||
HorizontalOptions="FillAndExpand" | ||
VerticalOptions="FillAndExpand"/> | ||
<controls:CircleChartView x:Name="normalChartView" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo cosmetic: do you mind moving all the XML fragment that you didn't modify, to the left one level of indentation? I know that your change in the XAML should cause this XML fragment to move to the right, but I'd prefer if do proper formatting of the XML in a 2nd commit (I'm planning to use an automatic XML formatter for that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo (this way, this part will not show up in the diff)
@@ -46,6 +46,8 @@ type BalancesPage(state: FrontendHelpers.IGlobalAppState, | |||
let contentLayout = base.FindByName<StackLayout> "contentLayout" | |||
let normalChartView = base.FindByName<CircleChartView> "normalChartView" | |||
let readonlyChartView = base.FindByName<CircleChartView> "readonlyChartView" | |||
let logoInSideMenu = base.FindByName<Image> "logoInSidemenu" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo as we decided to rename the image name to sideMenuImg
, let's also change the variable name here ^
//loading & result | ||
let resultMessage = base.FindByName<Label> "resultMessage" | ||
let loadingIndicator = base.FindByName<ActivityIndicator> "loadingIndicator" | ||
let option = option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo this line above is not needed
VerticalOptions="FillAndExpand"/> | ||
IsVisible="False" | ||
HorizontalOptions="FillAndExpand" | ||
VerticalOptions="FillAndExpand"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubaflo see above ^ this space additions are not needed
07f32ce
to
e8cfa47
Compare
We have fixed the check-password performance problem, if you rebase this PR then we can test the improvement with the settings page. |
e8cfa47
to
9f5e79c
Compare
It works!!! |
4096cd4
to
99cd00e
Compare
Added the settings page. Added the settings icon and side menu.
99cd00e
to
8d64c2b
Compare
a02943f
to
7a94774
Compare
The closing of this PR was unintended (it happened because the 'frontend' branch has now disappeared). @aarani can you please re-create this PR as it was, but targetting the master branch now? Thanks |
Superseded by #233 |