Skip to content

Conversation

e13h
Copy link

@e13h e13h commented Aug 17, 2025

Fixes #5560

Removed a hook that caused undesired scrolling when editing a split transaction.

Copy link

netlify bot commented Aug 17, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 9fdba74
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/68a8d1aec842f00008f36bcd
😎 Deploy Preview https://deploy-preview-5572.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@e13h e13h marked this pull request as ready for review August 17, 2025 21:31
@e13h e13h requested a review from joel-jeremy as a code owner August 17, 2025 21:31
@actual-github-bot actual-github-bot bot changed the title [WIP] Remove auto-scrolling behavior when editing split transactions on mobile Remove auto-scrolling behavior when editing split transactions on mobile Aug 17, 2025
Copy link
Contributor

github-actions bot commented Aug 17, 2025

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
23 10.75 MB → 10.75 MB (-299 B) -0.00%
Changeset
File Δ Size
src/components/mobile/transactions/TransactionEdit.jsx 📉 -299 B (-0.81%) 36.1 kB → 35.81 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
static/js/index.js 7.82 MB → 7.82 MB (-299 B) -0.00%

Unchanged

Asset File Size % Changed
static/js/de.js 140.04 kB 0%
static/js/en-GB.js 7.23 kB 0%
static/js/en.js 128.67 kB 0%
static/js/es.js 71.41 kB 0%
static/js/fr.js 149.97 kB 0%
static/js/it.js 142.25 kB 0%
static/js/nl.js 99.98 kB 0%
static/js/pl.js 86.07 kB 0%
static/js/pt-BR.js 142.46 kB 0%
static/js/sv.js 67.67 kB 0%
static/js/th.js 189.09 kB 0%
static/js/uk.js 186.02 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/ReportRouter.js 830.05 kB 0%
static/js/narrow.js 450.92 kB 0%
static/js/TransactionList.js 10.92 kB 0%
static/js/wide.js 116.99 kB 0%
static/js/useAccountPreviewTransactions.js 8.52 kB 0%
static/js/useTransactionBatchActions.js 10.22 kB 0%

Copy link
Contributor

github-actions bot commented Aug 17, 2025

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 4.28 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.qbdvDTe8.js 4.28 MB 0%

Copy link
Contributor

coderabbitai bot commented Aug 17, 2025

Walkthrough

Removed an effect in packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx that previously auto-scrolled to the first child transaction with amount === 0 when childTransactions changed. No other logic or exports were modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Disable automatic scrolling during split entry on mobile (#5560)

Suggested reviewers

  • matt-fidd

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1fc59c7 and 9fdba74.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/5572.md is excluded by !**/*.md
📒 Files selected for processing (1)
  • packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Functional Desktop App
  • GitHub Check: Analyze
  • GitHub Check: Wait for Netlify build to finish
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: build (macos-latest)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@matt-fidd
Copy link
Member

👋 Hey!

I don't know if removing the whole thing is the right move here but I do agree that the behaviour at the moment isn't good when it scrolls away from editing different field.

Is there a way that you could change the scroll behaviour to only activate when the new split is added instead of every time it's 0?

@e13h e13h force-pushed the fix-split-transaction-scrolling branch from 1fc59c7 to 9fdba74 Compare August 22, 2025 20:23
@e13h
Copy link
Author

e13h commented Aug 22, 2025

Is there a way that you could change the scroll behaviour to only activate when the new split is added instead of every time it's 0?

I think this is already happening without any additional changes needed. Here's a screen recording of my branch build. Does this cover what you are asking?

screenrecording.mov

I think this is covered by the existing usage of onEmptySplitFound():

const onEmptySplitFound = useCallback(
id => {
scrollChildTransactionIntoView(id);
},
[scrollChildTransactionIntoView],
);

const onClickRemainingSplit = () => {
if (childTransactions.length === 0) {
onSplit(transaction.id);
} else {
if (!emptySplitTransaction) {
onAddSplit(transaction.id);
} else {
onEmptySplitFound?.(emptySplitTransaction.id);
}
}
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Automatic scrolling on mobile makes it hard to fill out split transactions
2 participants