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

fix(SendModal): Bridge modal Simple mode's scroll is very clunky #15969

Merged

Conversation

caybro
Copy link
Member

@caybro caybro commented Aug 2, 2024

What does the PR do

  • use a plain StatusListView instead of a nested ScrollView -> Repeater -> Column
  • cleanups and fixes in mocked models and stores to unbreak showing the networks/routing in storybook

Fixes #15902

Affected areas

SendModal, NetworksSimpleRoutingView

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it
Zaznam.obrazovky.z.2024-08-02.11-03-33.webm

@caybro caybro linked an issue Aug 2, 2024 that may be closed by this pull request
@status-im-auto
Copy link
Member

status-im-auto commented Aug 2, 2024

Jenkins Builds

Click to see older builds (7)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c01a9b8 #1 2024-08-02 09:11:39 ~6 min macos/aarch64 🍎dmg
✔️ c01a9b8 #1 2024-08-02 09:12:10 ~6 min tests/nim 📄log
✔️ c01a9b8 #1 2024-08-02 09:16:24 ~11 min macos/x86_64 🍎dmg
✔️ c01a9b8 #1 2024-08-02 09:18:38 ~13 min tests/ui 📄log
✔️ c01a9b8 #1 2024-08-02 09:20:50 ~15 min linux-nix/x86_64 📦tgz
✔️ c01a9b8 #1 2024-08-02 09:22:27 ~17 min linux/x86_64 📦tgz
✔️ c01a9b8 #1 2024-08-02 09:37:52 ~32 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ ebf2e7e #3 2024-08-02 11:53:54 ~6 min macos/aarch64 🍎dmg
✔️ ebf2e7e #3 2024-08-02 11:54:20 ~6 min tests/nim 📄log
✔️ ebf2e7e #3 2024-08-02 12:01:37 ~14 min tests/ui 📄log
✔️ ebf2e7e #3 2024-08-02 12:03:18 ~15 min linux-nix/x86_64 📦tgz
✔️ ebf2e7e #3 2024-08-02 12:03:30 ~16 min macos/x86_64 🍎dmg
✔️ ebf2e7e #3 2024-08-02 12:05:03 ~17 min linux/x86_64 📦tgz
✔️ ebf2e7e #3 2024-08-02 12:20:38 ~33 min windows/x86_64 💿exe
✔️ 346b33b #4 2024-08-02 14:42:18 ~4 min macos/aarch64 🍎dmg
✔️ 346b33b #4 2024-08-02 14:44:26 ~6 min tests/nim 📄log
✔️ 346b33b #4 2024-08-02 14:46:05 ~8 min macos/x86_64 🍎dmg
✔️ 346b33b #4 2024-08-02 14:50:06 ~12 min tests/ui 📄log
✔️ 346b33b #4 2024-08-02 14:50:32 ~12 min linux-nix/x86_64 📦tgz
✔️ 346b33b #4 2024-08-02 14:53:24 ~15 min linux/x86_64 📦tgz
✔️ 346b33b #4 2024-08-02 15:08:20 ~30 min windows/x86_64 💿exe

Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

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

NetworksSimpleRoutingView is green, and the ListView inside is green:

Screenshot from 2024-08-02 13-17-11

And the scrolling here is totally external. The list is intended to be unrolled, with own vertical scrolling not used. So it seems that it can be simplified more, and instead of non-interactive list view it can be just repeater.

Quick check shows that then it works as before:

image

Maybe only spacing needs to be adjusted.

And horizontal scrolling should be never needed here. If texts are wider, should be just elided.

Please take a look, maybe I'm missing sth but it seems it can be simplified.

It would be nice to have storybook NetworksSimpleRoutingView but I don't insist, can be done in a next step along with removing dependency on store.

Comment on lines 192 to 195
function setRouteDisabledChains(chainId, disabled) {

}

Copy link
Member

Choose a reason for hiding this comment

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

There is this big disclaimer on the top of that file:

image

There is also relevant point and rationale in the guide (I know, not published yet...).

The good thing is that stub is used only in SendModalPage. So my proposition is to do small step towards the expected structure and move that content to the SendModalPage and leave only empty stub here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah the problem is though that without this stub store, the SendModal would be completely broken in StoryBook; there's a lot of code snippets that rely on the store methods to be there; without them, the JS code flow just breaks

Copy link
Member Author

Choose a reason for hiding this comment

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

And as for the proposed change: this is just a bugfix PR (for 2.30 eventually) and I'd definitely postpone any refactorings for the start of the next milestone

Copy link
Member

@micieslak micieslak Aug 2, 2024

Choose a reason for hiding this comment

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

This is no risk at all, just cut from the stub and paste in SendModalPage:

image

0 impact on the app, 0 risk. All on SB side. But instead of adding piece of code violating agreements, it will be left in a bit better shape, and will prevent from further violations of that kind there :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Not that simple, I tried; it needs dozens of all those methods like setRouteDisabledChains() I just added above

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah got it now, will do; I thought you wanted me to remove the whole stub TransactionStore right now :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

Ah got it now, will do; I thought you wanted me to remove the whole stub TransactionStore right now :)

Omg, it would be something 🤣

Copy link
Member

Choose a reason for hiding this comment

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

I actually meant to move the function you added along with the rest of stuff and removing disclaimer and leaving only plaing QtObject {} there. Moving a lot but just cut/paste basically.

Copy link
Member

Choose a reason for hiding this comment

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

I'm approving as it's kind of "optional" work here anyways...

@caybro
Copy link
Member Author

caybro commented Aug 2, 2024

NetworksSimpleRoutingView is green, and the ListView inside is green:

Screenshot from 2024-08-02 13-17-11

And the scrolling here is totally external. The list is intended to be unrolled, with own vertical scrolling not used. So it seems that it can be simplified more, and instead of non-interactive list view it can be just repeater.

Quick check shows that then it works as before:

image

Maybe only spacing needs to be adjusted.

And horizontal scrolling should be never needed here. If texts are wider, should be just elided.

Yeah you are right; there's definitely more scroll/list views than needed in the whole SendModal. I'll try to revert back to just using a Repeater here

@caybro caybro force-pushed the 15902-bridge-modal-simple-modes-scroll-is-very-clunky branch 2 times, most recently from 466d8b0 to ebf2e7e Compare August 2, 2024 11:47
@caybro
Copy link
Member Author

caybro commented Aug 2, 2024

@micieslak reverted the ListView to Column+Repeater; pls have another look

@caybro caybro requested a review from micieslak August 2, 2024 11:50
Copy link
Contributor

@alexjba alexjba left a comment

Choose a reason for hiding this comment

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

LGTM! Tested!

- remove the nested unneeded ScrollView
- cleanups and fixes in mocked models and stores to unbreak showing the
networks/routing in storybook

Fixes #15902
@caybro caybro force-pushed the 15902-bridge-modal-simple-modes-scroll-is-very-clunky branch from ebf2e7e to 346b33b Compare August 2, 2024 14:37
@caybro caybro merged commit b67ea66 into master Aug 2, 2024
9 checks passed
@caybro caybro deleted the 15902-bridge-modal-simple-modes-scroll-is-very-clunky branch August 2, 2024 16:24
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.

Bridge modal Simple mode's scroll is very clunky
4 participants