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 slide action to slider and Update layout on overview page #256

Merged
merged 16 commits into from
Dec 6, 2023

Conversation

JustinBeBoy
Copy link
Collaborator

@JustinBeBoy JustinBeBoy commented Nov 16, 2023

Resolve #161
closes #261

This PR:

  • Add slide action component to handle dragging
  • Add swipe action to slider for next/previous item on slider
  • Add animation when slider change item
  • Add indicator button for change item on slider
  • Fix slider on overview page

screenshot

image

@JustinBeBoy JustinBeBoy changed the title Add slice action to slider and segmented controls Add slice action to slider Nov 16, 2023
@JustinBeBoy JustinBeBoy marked this pull request as ready for review November 16, 2023 15:03
@dreacot
Copy link
Member

dreacot commented Nov 16, 2023

About segmented controls because it not contain display layout inside, so they can be used in conjunction with slide actions to do it for each screen if necessary

what does the sliding require a display layout to work?

@JustinBeBoy JustinBeBoy requested a review from dreacot November 17, 2023 01:26
@JustinBeBoy
Copy link
Collaborator Author

About segmented controls because it not contain display layout inside, so they can be used in conjunction with slide actions to do it for each screen if necessary

what does the sliding require a display layout to work?

As a standalone component, it can be integrated into any layout. Consider integrating into layout with horizontal scrolling actions

@Sirmorrison Sirmorrison changed the title Add slice action to slider Add slide action to slider Nov 22, 2023
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.

First pass

ui/cryptomaterial/segmented_control.go Outdated Show resolved Hide resolved
ui/cryptomaterial/segmented_control.go Outdated Show resolved Hide resolved
ui/cryptomaterial/segmented_control.go Show resolved Hide resolved
ui/cryptomaterial/slider.go Outdated Show resolved Hide resolved
ui/cryptomaterial/util.go Show resolved Hide resolved
@dreacot
Copy link
Member

dreacot commented Nov 22, 2023

slide action, doesn't work for segmented control

Screencast.from.2023-11-22.13.55.04.webm

@JustinBeBoy
Copy link
Collaborator Author

JustinBeBoy commented Nov 23, 2023

slide action, doesn't work for segmented control

Screencast.from.2023-11-22.13.55.04.webm

@dreacot
It only effects on body of segment, not title of segment.

@dreacot
Copy link
Member

dreacot commented Nov 23, 2023

slide action, doesn't work for segmented control
Screencast.from.2023-11-22.13.55.04.webm

@dreacot It only effects on body of segment, not title of segment.

the issue says the title should have the slide effect

@dreacot
Copy link
Member

dreacot commented Nov 24, 2023

trying to start mixing causes a crash

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x57dbcc]

goroutine 187 [running]:
gioui.org/gesture.(*Drag).Events(0xc006a38208, {0x0?, 0x0?}, {0x0?, 0x0?}, 0x0)
        /home/kennedy/Projects/pkg/mod/[email protected]/gesture/gesture.go:378 +0x4c
github.com/crypto-power/cryptopower/ui/cryptomaterial.(*SliceAction).DragLayout(0xc006a38170, {{{0x0, 0x0}, {0x2f0, 0x1ed}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/slide_action.go:55 +0xac
github.com/crypto-power/cryptopower/ui/cryptomaterial.(*SegmentedControl).Layout.func1.2.1({{{0x0, 0x0}, {0x2f0, 0x1ed}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/segmented_control.go:78 +0xa9
gioui.org/layout.Inset.Layout({0x4220?, 0x0?, 0xd8?, 0x0?}, {{{0x0, 0x0}, {0x2f0, 0x1ed}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:169 +0x39d
github.com/crypto-power/cryptopower/ui/cryptomaterial.(*SegmentedControl).Layout.func1.2({{{0x0, 0x0}, {0x2f0, 0x1fd}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/segmented_control.go:76 +0xb2
gioui.org/layout.Flex.Layout({0x0?, 0x0?, 0x0?, 0x0?}, {{{0x0, 0x0}, {0x2f0, 0x21f}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/flex.go:99 +0x2d5
github.com/crypto-power/cryptopower/ui/cryptomaterial.(*SegmentedControl).Layout.func1({{{0x0, 0x0}, {0x2f0, 0x21f}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/segmented_control.go:68 +0x1f7
gioui.org/layout.Inset.Layout({0x2fae6b0?, 0xc0?, 0x2fae810?, 0xc0?}, {{{0x0, 0x0}, {0x2f0, 0x21f}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:169 +0x39d
github.com/crypto-power/cryptopower/ui/cryptomaterial.UniformPadding({{{0x0, 0x0}, {0x320, 0x24f}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...}, ...)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/util.go:157 +0x197
github.com/crypto-power/cryptopower/ui/cryptomaterial.(*SegmentedControl).Layout(0x3f?, {{{0x0, 0x0}, {0x320, 0x24f}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/segmented_control.go:64 +0x7d
github.com/crypto-power/cryptopower/ui/page/root.(*MainPage).layoutDesktop.func1.1.1({{{0x0, 0x0}, {0x320, 0x24f}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/main_page.go:358 +0x9e
gioui.org/layout.Inset.Layout({0x6f02870?, 0xc0?, 0x3f?, 0x0?}, {{{0x0, 0x0}, {0x320, 0x24f}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:169 +0x39d
github.com/crypto-power/cryptopower/ui/page/root.(*MainPage).layoutDesktop.func1.1({{{0x0, 0x0}, {0x320, 0x25f}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/main_page.go:357 +0x89
gioui.org/layout.Flex.Layout({0xb?, 0x0?, 0x0?, 0x0?}, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/flex.go:99 +0x2d5
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2.1.1.1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:88 +0x85
gioui.org/layout.Direction.Layout(0x0, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:196 +0x162
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2.1.1({{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:87 +0xe5
gioui.org/layout.Inset.Layout({0x2faf610?, 0xc0?, 0x6b3f57?, 0x0?}, {{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:169 +0x39d
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2.1({{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:85 +0x109
github.com/crypto-power/cryptopower/ui/cryptomaterial.Border.Layout({{0x0, 0x0, 0x0, 0x0}, {0x0, 0x0, 0x0, 0x0}, 0x0}, {{{0x320, ...}, ...}, ...}, ...)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/border.go:21 +0x98
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2({{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:83 +0x1d6
gioui.org/layout.Stack.Layout({0x0?}, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/stack.go:60 +0x195
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:46 +0x2aa
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:105 +0x238
gioui.org/layout.Inset.Layout({0x154d7a0?, 0x0?, 0x48acd00?, 0xc0?}, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:169 +0x39d
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:44 +0x109
gioui.org/layout.Direction.Layout(0x0, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:196 +0x162
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout({0xfffffffffffffffe, 0xfffffffffffffffe, 0x1, {0x0, 0x0, 0x0, 0x0}, 0x0, {{0x0, 0x0, ...}, ...}, ...}, ...)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:42 +0xe5
github.com/crypto-power/cryptopower/ui/page/root.(*MainPage).layoutDesktop.func1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/main_page.go:352 +0x20b
gioui.org/layout.Stack.Layout({0x20?}, {{{0x0, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/stack.go:78 +0x498
github.com/crypto-power/cryptopower/ui/page/root.(*MainPage).layoutDesktop(0xc006a38000, {{{0x0, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/main_page.go:345 +0x12b
github.com/crypto-power/cryptopower/ui/page/root.(*MainPage).Layout(0x0?, {{{0x0, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/main_page.go:341 +0x58
gioui.org/layout.Flex.Layout({0x5?, 0x0?, 0x0?, 0x0?}, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/flex.go:134 +0x738
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2.1.1.1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:88 +0x85
gioui.org/layout.Direction.Layout(0x0, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:196 +0x162
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2.1.1({{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:87 +0xe5
gioui.org/layout.Inset.Layout({0x2fb1b68?, 0xc0?, 0x6b3f57?, 0x0?}, {{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:169 +0x39d
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2.1({{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:85 +0x109
github.com/crypto-power/cryptopower/ui/cryptomaterial.Border.Layout({{0x0, 0x0, 0x0, 0x0}, {0x0, 0x0, 0x0, 0x0}, 0x0}, {{{0x320, ...}, ...}, ...}, ...)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/border.go:21 +0x98
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1.2({{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:83 +0x1d6
gioui.org/layout.Stack.Layout({0x0?}, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/stack.go:60 +0x195
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1.1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:46 +0x2aa
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1.1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:105 +0x238
gioui.org/layout.Inset.Layout({0x0?, 0x0?, 0x0?, 0x0?}, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:169 +0x39d
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout.func1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:44 +0x109
gioui.org/layout.Direction.Layout(0x0, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/layout.go:196 +0x162
github.com/crypto-power/cryptopower/ui/cryptomaterial.LinearLayout.Layout({0xfffffffffffffffe, 0xfffffffffffffffe, 0x1, {0x0, 0x0, 0x0, 0x0}, 0x0, {{0x0, 0x0, ...}, ...}, ...}, ...)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/cryptomaterial/linearlayout.go:42 +0xe5
github.com/crypto-power/cryptopower/ui/page/root.(*HomePage).layoutDesktop.func1({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/home_page.go:373 +0x24b
gioui.org/layout.Stack.Layout({0x0?}, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/stack.go:78 +0x498
github.com/crypto-power/cryptopower/ui/page/root.(*HomePage).layoutDesktop(0xc002f22000, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/home_page.go:367 +0x12b
github.com/crypto-power/cryptopower/ui/page/root.(*HomePage).Layout(0xc002f22000, {{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/page/root/home_page.go:363 +0x105
github.com/crypto-power/cryptopower/ui.(*Window).prepareToDisplayUI.func2({{{0x0, 0x0}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x0, 0x0}, {0xc150602cdf002126, 0x6e2ec5aea, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/window.go:282 +0x122
gioui.org/layout.Stack.Layout({0x70?}, {{{0x320, 0x28a}, {0x320, 0x28a}}, {0x3f800000, 0x3f800000}, {0x1ef1160, 0xc000532cc8}, {0xc150602cdf002126, ...}, ...}, ...)
        /home/kennedy/Projects/pkg/mod/[email protected]/layout/stack.go:60 +0x195
github.com/crypto-power/cryptopower/ui.(*Window).prepareToDisplayUI(0xc003c92f30, {{0xc150602cdf002126, 0x6e2ec5aea, 0x2e14520}, {0x3f800000, 0x3f800000}, {0x320, 0x28a}, {0x0, 0x0, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/window.go:297 +0x40d
github.com/crypto-power/cryptopower/ui.(*Window).handleFrameEvent(0xc003c92f30, {{0xc150602cdf002126, 0x6e2ec5aea, 0x2e14520}, {0x3f800000, 0x3f800000}, {0x320, 0x28a}, {0x0, 0x0, ...}, ...})
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/window.go:235 +0x225
github.com/crypto-power/cryptopower/ui.(*Window).HandleEvents(0xc003c92f30)
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/ui/window.go:200 +0x2b9
main.main.func3()
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/main.go:109 +0x1d
created by main.main
        /home/kennedy/Projects/src/github.com/cryptopower/cryptopower/main.go:107 +0x51d
exit status 2

@dreacot
Copy link
Member

dreacot commented Nov 24, 2023

when mixer is enabled the asset slider height doesn't take full width on my macbook

Screenshot 2023-11-21 at 9 54 26 AM

@dreacot
Copy link
Member

dreacot commented Nov 24, 2023

sliding anywhere on the page triggers the asset slider

Screencast.from.2023-11-24.13.43.35.webm

@JustinBeBoy JustinBeBoy changed the title Add slide action to slider Add slide action to slider and Update layout on overview page Dec 1, 2023
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.

I'm seeing multiple mixer sliders.

Screen.Recording.2023-12-01.at.6.50.58.PM.mov

ui/cryptomaterial/segmented_control.go Outdated Show resolved Hide resolved
ui/cryptomaterial/slide_action.go Outdated Show resolved Hide resolved
ui/cryptomaterial/slider.go Outdated Show resolved Hide resolved
ui/values/dimensions.go Show resolved Hide resolved
@JustinBeBoy
Copy link
Collaborator Author

I'm seeing multiple mixer sliders.

Screen.Recording.2023-12-01.at.6.50.58.PM.mov

This is the slide's rotation effect, but I'll fix it

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.

Noticed a page navigation mishap after navigating from the mixer page and also a log message that was supposedly fixed in #240.

Navigation issue:

Screen.Recording.2023-12-02.at.11.00.27.AM.mov

Duplicate mixer log error:

2023-12-02 10:59:53.670 [ERR] UI: Error adding account mixer notification listener: listener_already_exist
2023-12-02 11:00:30.595 [ERR] UI: Error adding account mixer notification listener: listener_already_exist
2023-12-02 11:00:52.064 [ERR] UI: Error adding account mixer notification listener: listener_already_exist

ui/cryptomaterial/slider.go Outdated Show resolved Hide resolved
ui/cryptomaterial/slider.go Show resolved Hide resolved
@JustinBeBoy
Copy link
Collaborator Author

Noticed a page navigation mishap after navigating from the mixer page and also a log message that was supposedly fixed in #240.

Navigation issue:

Screen.Recording.2023-12-02.at.11.00.27.AM.mov
Duplicate mixer log error:

2023-12-02 10:59:53.670 [ERR] UI: Error adding account mixer notification listener: listener_already_exist
2023-12-02 11:00:30.595 [ERR] UI: Error adding account mixer notification listener: listener_already_exist
2023-12-02 11:00:52.064 [ERR] UI: Error adding account mixer notification listener: listener_already_exist

That's not within the scope of this PR, please make an issue of it

@ukane-philemon
Copy link
Collaborator

That's not within the scope of this PR, please make an issue of it

Yes, you are correct. I also experienced the issue on master.

@dreacot
Copy link
Member

dreacot commented Dec 4, 2023

swiping left goes to the other page, if there's nothing to swipe to then the sliding shouldn't do anything

Screencast.from.2023-12-04.12.38.06.webm

@JustinBeBoy
Copy link
Collaborator Author

swiping left goes to the other page, if there's nothing to swipe to then the sliding shouldn't do anything

Screencast.from.2023-12-04.12.38.06.webm

done

@ukane-philemon
Copy link
Collaborator

swiping left goes to the other page, if there's nothing to swipe to then the sliding shouldn't do anything
Screencast.from.2023-12-04.12.38.06.webm

done

Yup, but I get this panic:
To reproduce: Select a dcr wallet swipe to the transaction page and click on the staking activities tab.

``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x100e57feb]

goroutine 60 [running]:
github.com/crypto-power/cryptopower/ui/cryptomaterial.(*DropDown).SelectedIndex(...)
/Users/philemon/Desktop/osp/cryptopower/ui/cryptomaterial/dropdown.go:101
github.com/crypto-power/cryptopower/ui/page/transaction.(*TransactionsPage).HandleUserInteractions(0xc003edc0a0)
/Users/philemon/Desktop/osp/cryptopower/ui/page/transaction/transactions_page.go:518 +0x34b
github.com/crypto-power/cryptopower/ui/page/root.(*SingleWalletMasterPage).HandleUserInteractions(0xc002cc2b40)
/Users/philemon/Desktop/osp/cryptopower/ui/page/root/main_page.go:266 +0x56
github.com/crypto-power/cryptopower/ui/page/root.(*HomePage).HandleUserInteractions(0xc0000a3ba0)
/Users/philemon/Desktop/osp/cryptopower/ui/page/root/home_page.go:180 +0x56
github.com/crypto-power/cryptopower/ui.(*Window).handleFrameEvent(0xc002f7d9e0, {{0xc153e0a7c1f9e7b8, 0x60770abab, 0x1026edea0}, {0x40000000, 0x40000000}, {0x640, 0x514}, {0x0, 0x0, ...}, ...})
/Users/philemon/Desktop/osp/cryptopower/ui/window.go:224 +0x194
github.com/crypto-power/cryptopower/ui.(*Window).HandleEvents(0xc002f7d9e0)
/Users/philemon/Desktop/osp/cryptopower/ui/window.go:195 +0x2b6
main.main.func3()
/Users/philemon/Desktop/osp/cryptopower/main.go:109 +0x17
created by main.main in goroutine 1
/Users/philemon/Desktop/osp/cryptopower/main.go:107 +0x425
exit status 2

</details>

@JustinBeBoy
Copy link
Collaborator Author

JustinBeBoy commented Dec 5, 2023

swiping left goes to the other page, if there's nothing to swipe to then the sliding shouldn't do anything
Screencast.from.2023-12-04.12.38.06.webm

done

Yup, but I get this panic: To reproduce: Select a dcr wallet swipe to the transaction page and click on the staking activities tab.

goroutine 60 [running]: github.com/crypto-power/cryptopower/ui/cryptomaterial.(*DropDown).SelectedIndex(...) /Users/philemon/Desktop/osp/cryptopower/ui/cryptomaterial/dropdown.go:101 github.com/crypto-power/cryptopower/ui/page/transaction.(*TransactionsPage).HandleUserInteractions(0xc003edc0a0) /Users/philemon/Desktop/osp/cryptopower/ui/page/transaction/transactions_page.go:518 +0x34b github.com/crypto-power/cryptopower/ui/page/root.(*SingleWalletMasterPage).HandleUserInteractions(0xc002cc2b40) /Users/philemon/Desktop/osp/cryptopower/ui/page/root/main_page.go:266 +0x56 github.com/crypto-power/cryptopower/ui/page/root.(*HomePage).HandleUserInteractions(0xc0000a3ba0) /Users/philemon/Desktop/osp/cryptopower/ui/page/root/home_page.go:180 +0x56 github.com/crypto-power/cryptopower/ui.(*Window).handleFrameEvent(0xc002f7d9e0, {{0xc153e0a7c1f9e7b8, 0x60770abab, 0x1026edea0}, {0x40000000, 0x40000000}, {0x640, 0x514}, {0x0, 0x0, ...}, ...}) /Users/philemon/Desktop/osp/cryptopower/ui/window.go:224 +0x194 github.com/crypto-power/cryptopower/ui.(*Window).HandleEvents(0xc002f7d9e0) /Users/philemon/Desktop/osp/cryptopower/ui/window.go:195 +0x2b6 main.main.func3() /Users/philemon/Desktop/osp/cryptopower/main.go:109 +0x17 created by main.main in goroutine 1 /Users/philemon/Desktop/osp/cryptopower/main.go:107 +0x425 exit status 2

```

I can't reproduce it, but I guessed it not relate to this PR, Did you test it on master?

@ukane-philemon
Copy link
Collaborator

Did you test it on master?

Darn, just did and it's on master.

@dreacot
Copy link
Member

dreacot commented Dec 6, 2023

this was not resolved #261 (comment)

@dreacot dreacot merged commit cdff39d into crypto-power:master Dec 6, 2023
1 check passed
@JustinBeBoy JustinBeBoy deleted the slider branch March 15, 2024 03:17
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.

asset slider shows half height on macos add sliding motion for the sliders
4 participants