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

New layout for trade page #139

Closed
wants to merge 12 commits into from

Conversation

Vanvians
Copy link
Collaborator

@Vanvians Vanvians commented Oct 1, 2023

Closes #80
Implements new trade page layout
Screenshot 2023-10-01 223400

ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/values/localizable/en.go Outdated Show resolved Hide resolved
ui/values/localizable/en.go Outdated Show resolved Hide resolved
ui/values/localizable/en.go Outdated Show resolved Hide resolved
ui/values/localizable/en.go Outdated Show resolved Hide resolved
ui/values/strings.go Outdated Show resolved Hide resolved
@ukane-philemon
Copy link
Collaborator

ukane-philemon commented Oct 2, 2023

It seems part of the icons are hidden, no margin-top effect for the title, and the grey box looks smaller than what's in the design. Testing on MacOS.

Screenshot 2023-10-02 at 8 02 33 AM

Copy link
Collaborator

@Sirmorrison Sirmorrison left a comment

Choose a reason for hiding this comment

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

From the screenshot you added, it shows that your icons are larger than the design. Kindly drop them to Layout48dp or Layout36dp.

Also, i will like to recommend that you split the codes inside here pageContentLayout() into multiple sub functions. That way you have a function/method for all the components of the page, and you call these functions in the mother function.

Lastly, I will recommend you wrap pageContentLayout() in the components.UniformPadding(). These will help properly position the page contents especially when i full screen display.

ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
Comment on lines 133 to 138
layout.Rigid(func(gtx C) D {
return layout.Inset{Bottom: values.MarginPadding0}.Layout(gtx, pg.Theme.Label(values.TextSize20, values.String(values.StrExchangeIntro)).Layout)
}),
layout.Rigid(func(gtx C) D {
return layout.Inset{Bottom: values.MarginPadding16}.Layout(gtx, pg.Theme.Label(values.TextSize20, values.String(values.StrExchangeIntroPt2)).Layout)
}),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we have exchange intro 1 and 2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when it is one string I am unable get the second line to be exactly like the design.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right.. use this to break the string into 2, then centralize.
text := values.StringF(values.StrSourceModalInfo,
). In your string variable, add %v where you want the string to break.

ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@ukane-philemon ukane-philemon left a comment

Choose a reason for hiding this comment

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

Uhmm, I missed these in my first review. Your changes look straightforward.

ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
ui/page/root/trade_page.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@Sirmorrison Sirmorrison left a comment

Choose a reason for hiding this comment

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

From figma..
image

your UI..
image

  • The Dex icon is still too big. it should be reduce by half the current size.
  • There should be space between the DCR DEX not DCRDEX.
  • The items in the boxes are not centralised.

ui/page/root/trade_page.go Outdated Show resolved Hide resolved
"exchangeIntro" = "Exchange currency using our predefined/custom servers or through a centralized exchange,"
"exchangeIntroPt2" = "it is simple, quick, and secure."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"exchangeIntro" = "Exchange currency using our predefined/custom servers or through a centralized exchange,"
"exchangeIntroPt2" = "it is simple, quick, and secure."
"exchangeIntro" = "Exchange currency using our predefined/custom servers or through a centralized exchange,%v it is simple, quick, and secure."

Comment on lines 138 to 139
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntro))),
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntroPt2))),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntro))),
layout.Rigid(pg.titleContent(values.String(values.StrExchangeIntroPt2))),
layout.Rigid(pg.titleContent(values.StringF(values.StrExchangeIntro, "<br/>"))),

Use this to break the string into 2, then centralize.
text := values.StringF(values.StrSourceModalInfo, "<br/>"). In your string variable, add %v where you want the string to break.
you don't need two strings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This doesn't work, It breaks the sentence but doesn't allow the second line to move independently

ui/page/root/trade_page.go Show resolved Hide resolved
@ukane-philemon
Copy link
Collaborator

  • There should be space between the DCR DEX not DCRDEX.

@Sirmorrison, I requested @Vanvians to not separate the word DCRDEX in a previous review. For example, see how it’s used here: https://dex.decred.org/.

@Vanvians
Copy link
Collaborator Author

Vanvians commented Oct 9, 2023

How it looks with requested changes. Any other comments?

Screenshot 2023-10-10 131324

@dreacot
Copy link
Member

dreacot commented Oct 11, 2023

@Sirmorrison @ukane-philemon @Vanvians

sorry for this setback but the layout of the trade tab has been updated as seen in the screenshot below

Overview page (7)

i have a PR for the segmented control here #175

@Sirmorrison
Copy link
Collaborator

IS this PR deprecated @dreacot ?

@dreacot
Copy link
Member

dreacot commented Oct 11, 2023

It is, a new PR should be opened, and linked here before closing this

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.

implement the new design for the landing page of the trade tab
4 participants