[PR #3731] [MERGED] Fix mobile navigation tabs expanding/collapsing when scrolling in modals #46846

Closed
opened 2026-04-26 08:53:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3731
Author: @joel-jeremy
Created: 10/24/2024
Status: Merged
Merged: 11/17/2024
Merged by: @joel-jeremy

Base: masterHead: improve-scroll-provider


📝 Commits (9)

  • 0dc2496 Update scroll provider so that it only captures the scroll on div container and not the whole window
  • dcdb70e Fix lint + release notes
  • a24b23d Rewrite useScroll to be more performant by being ref based instead of state to avoid re-renders when scrolling
  • f81ca45 Check undefined
  • 29cb20e Rename to useScrollListener
  • d0bff65 Remove small 1px gap under mobile nav tabs when fully open
  • b130e1c Cleanup
  • 30a35c1 Fix lint
  • 8282842 Coderabbit feedback

📊 Changes

9 files changed (+362 additions, -209 deletions)

View changed files

📝 packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/src/components/App.tsx (+23 -26)
📝 packages/desktop-client/src/components/FinancesApp.tsx (+110 -101)
📝 packages/desktop-client/src/components/ScrollProvider.tsx (+166 -23)
📝 packages/desktop-client/src/components/mobile/MobileNavTabs.tsx (+50 -50)
📝 packages/desktop-client/src/components/mobile/transactions/ListBox.jsx (+7 -9)
upcoming-release-notes/3731.md (+6 -0)

📄 Description

This should fix the issue where the mobile navigation tabs are opening and closing when you are scrolling anywhere e.g. scrolling through long category/group notes in mobile budget page

Steps to test:

  1. Open Actual in mobile view
  2. Go to budget page
  3. Create a long category note (to make is scrollable)
  4. Scroll through the notes

Previous result: The mobile navigation tabs collapses/expands when scrolling through the notes
Current result: The mobile navigation tabs stays put

Rewritten to be more performant by being ref based instead of state to avoid re-renders when scrolling.
I also disabled the scroll tracking in desktop so that could potentially help with the performance


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/3731 **Author:** [@joel-jeremy](https://github.com/joel-jeremy) **Created:** 10/24/2024 **Status:** ✅ Merged **Merged:** 11/17/2024 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `improve-scroll-provider` --- ### 📝 Commits (9) - [`0dc2496`](https://github.com/actualbudget/actual/commit/0dc2496ea9871db0ffbb48e1b7c1e9cf0b8724c2) Update scroll provider so that it only captures the scroll on div container and not the whole window - [`dcdb70e`](https://github.com/actualbudget/actual/commit/dcdb70e964987590a2ea387267b3afb868621aeb) Fix lint + release notes - [`a24b23d`](https://github.com/actualbudget/actual/commit/a24b23d79801ef814e38c0e9f83df6d8207fc505) Rewrite useScroll to be more performant by being ref based instead of state to avoid re-renders when scrolling - [`f81ca45`](https://github.com/actualbudget/actual/commit/f81ca45fcf732db1cd0c5c49af33b97124ce1de3) Check undefined - [`29cb20e`](https://github.com/actualbudget/actual/commit/29cb20e49bc24153116070967b4854d59be49657) Rename to useScrollListener - [`d0bff65`](https://github.com/actualbudget/actual/commit/d0bff65fcea8148fc34342ee6e7c1aca77c5ea9e) Remove small 1px gap under mobile nav tabs when fully open - [`b130e1c`](https://github.com/actualbudget/actual/commit/b130e1c4841ba6023b0f64a1063a6f424ce03b89) Cleanup - [`30a35c1`](https://github.com/actualbudget/actual/commit/30a35c1eceb0024c34e5759cd8a20634d7a52abc) Fix lint - [`8282842`](https://github.com/actualbudget/actual/commit/8282842e71865c0c0ef25bbdc6b40083a5cc2d29) Coderabbit feedback ### 📊 Changes **9 files changed** (+362 additions, -209 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/settings.mobile.test.js-snapshots/Mobile-Settings-checks-that-settings-page-can-be-opened-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/src/components/App.tsx` (+23 -26) 📝 `packages/desktop-client/src/components/FinancesApp.tsx` (+110 -101) 📝 `packages/desktop-client/src/components/ScrollProvider.tsx` (+166 -23) 📝 `packages/desktop-client/src/components/mobile/MobileNavTabs.tsx` (+50 -50) 📝 `packages/desktop-client/src/components/mobile/transactions/ListBox.jsx` (+7 -9) ➕ `upcoming-release-notes/3731.md` (+6 -0) </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes --> This should fix the issue where the mobile navigation tabs are opening and closing when you are scrolling anywhere e.g. scrolling through long category/group notes in mobile budget page Steps to test: 1. Open Actual in mobile view 2. Go to budget page 3. Create a long category note (to make is scrollable) 4. Scroll through the notes Previous result: The mobile navigation tabs collapses/expands when scrolling through the notes Current result: The mobile navigation tabs stays put Rewritten to be more performant by being ref based instead of state to avoid re-renders when scrolling. I also disabled the scroll tracking in desktop so that could potentially help with the performance --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-26 08:53:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#46846