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

Add backdrop for dropdown #616

Merged
merged 7 commits into from Sep 14, 2021
Merged

Conversation

JustinBeBoy
Copy link
Contributor

This PR resolve #581 with detail:

  • Add backdrop for dropdown
  • Implement pages which using dropdown

@Sirmorrison Sirmorrison added this to In Progress in godcr board via automation Sep 5, 2021
@Sirmorrison Sirmorrison moved this from In Progress to Review in progress in godcr board Sep 5, 2021
ui/page/tickets/list_page.go Outdated Show resolved Hide resolved
ui/page/transactions_page.go Outdated Show resolved Hide resolved
- add IsOpen() and CloseDropdown() to dropdown widget
Sirmorrison
Sirmorrison previously approved these changes Sep 5, 2021
@dreacot
Copy link
Collaborator

dreacot commented Sep 6, 2021

@JustinBeBoy This hasn't been implemented in the ticket activity page

@Sirmorrison Sirmorrison self-assigned this Sep 6, 2021
- add backdrop to ticket activity page
- fix wallet dropdown icon size and alignment with wallet text
@Sirmorrison
Copy link
Contributor

@JustinBeBoy This hasn't been implemented in the ticket activity page

This is now resolved.

dreacot
dreacot previously approved these changes Sep 6, 2021
ui/page/tickets/activity_page.go Outdated Show resolved Hide resolved
- Remove backdrops in all pages use dropdown
- Refactor code in dropdown, transaction page, activity page and list page
- Align layout dropdown in pages use it
Copy link
Contributor

@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.

image

on the ticket page this is what the dropdowns look like at the far right.

Same for ticket activity page.

image

Same for transactions page.
image

return pg.walletDropDown.Layout(gtx, 0)
}),
layout.Expanded(func(gtx C) D {
post := float32(gtx.Constraints.Max.X - 315)
Copy link
Contributor

Choose a reason for hiding this comment

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

rename all occurrence of post to position or pos

@JustinBeBoy
Copy link
Contributor Author

image

on the ticket page this is what the dropdowns look like at the far right.

Same for ticket activity page.

image

Same for transactions page.
image

I cant reproduce it in computer, can you tell me steps to reproduce it

@beansgum
Copy link
Contributor

@Sirmorrison I can't also reproduce the ui bug.

@Sirmorrison
Copy link
Contributor

Sirmorrison commented Sep 10, 2021

@Sirmorrison I can't also reproduce the ui bug.

Let me try from my mac machine it was noticed on windows

this is what i get on my macbook

transaction page

image

ticket page

image

Comment on lines 104 to 113
layout.Expanded(func(gtx C) D {
return pg.walletDropDown.Layout(gtx, 0)
}),
layout.Expanded(func(gtx C) D {
post := float32(gtx.Constraints.Max.X - 150)
return pg.orderDropDown.Layout(gtx, post)
}),
layout.Expanded(func(gtx C) D {
post := float32(gtx.Constraints.Max.X - 315)
return pg.ticketTypeDropDown.Layout(gtx, post)
Copy link
Contributor

Choose a reason for hiding this comment

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

So doing troubleshooting, this seems to be where the issue is coming from.

Changing the values as suggested below, give me the screenshots below.
image

Suggested change
layout.Expanded(func(gtx C) D {
return pg.walletDropDown.Layout(gtx, 0)
}),
layout.Expanded(func(gtx C) D {
post := float32(gtx.Constraints.Max.X - 150)
return pg.orderDropDown.Layout(gtx, post)
}),
layout.Expanded(func(gtx C) D {
post := float32(gtx.Constraints.Max.X - 315)
return pg.ticketTypeDropDown.Layout(gtx, post)
layout.Expanded(func(gtx C) D {
return pg.walletDropDown.Layout(gtx, 0)
}),
layout.Expanded(func(gtx C) D {
post := float32(gtx.Constraints.Max.X - 450)
return pg.orderDropDown.Layout(gtx, post)
}),
layout.Expanded(func(gtx C) D {
post := float32(gtx.Constraints.Max.X - 300)
return pg.ticketTypeDropDown.Layout(gtx, post)

I think the issue here has to do with the screen size of the machine. you will need to use gtx.Px() for positioning and scaling.

@Sirmorrison
Copy link
Contributor

Sirmorrison commented Sep 13, 2021

image

The space between the dropdown is too much... See the red section on the screenshot.

Copy link
Contributor

@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.

PR looks good.

godcr board automation moved this from Review in progress to Approved Sep 14, 2021
@beansgum beansgum merged commit 71f059a into planetdecred:master Sep 14, 2021
godcr board automation moved this from Approved to Done Sep 14, 2021
song50119 pushed a commit to song50119/godcr that referenced this pull request Apr 24, 2022
* custom dropdown backdrop and implement page use

* add backdrop to tx and ticket page
- add IsOpen() and CloseDropdown() to dropdown widget

* fix wallet dropdown not opening bug ticket activity page
- add backdrop to ticket activity page
- fix wallet dropdown icon size and alignment with wallet text

* - Create backdrop for dropdown
- Remove backdrops in all pages use dropdown
- Refactor code in dropdown, transaction page, activity page and list page
- Align layout dropdown in pages use it

* fix issue of different screen resolutions

* change layout and resolve different resolutions

* caculate and change space between dropdown

Co-authored-by: sirmorrison <edonomorrison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
godcr board
  
Done
Development

Successfully merging this pull request may close these issues.

All pages that have dropdown selectors should have an overlay background
4 participants