Skip to content

Add mobile quick-add floating button and modal for quick transactions#2

Merged
coder11125 merged 1 commit into
mainfrom
codex/add-blue-button-for-quick-expenses-input
May 12, 2026
Merged

Add mobile quick-add floating button and modal for quick transactions#2
coder11125 merged 1 commit into
mainfrom
codex/add-blue-button-for-quick-expenses-input

Conversation

@coder11125

Copy link
Copy Markdown
Owner

Motivation

  • Provide a mobile-only floating action button (FAB) in the bottom-left so users can quickly add income or expense entries from any view on small screens.
  • Reuse existing save/refresh logic so both the dashboard form and the new mobile quick-add behave the same and keep UI consistent.

Description

  • Added a blue floating button and a mobile-only modal form in index.html that appears on screens <768px (#mobileQuickAddBtn, #mobileQuickAddModal).
  • Implemented wiring and behavior in script.js: new DOM refs, mobileQuickDatePicker (Flatpickr), addMobileQuickEntry, updateMobileQuickCategoryOptions, openMobileQuickAdd, closeMobileQuickAdd, and resetMobileQuickAddForm.
  • Refactored transaction creation/refresh into shared helpers saveTransaction and refreshAfterTransactionAdded and updated the dashboard form to use them so both forms save consistently.
  • Kept mobile-only visibility safe without requiring a Tailwind rebuild by adding inline CSS fallbacks that force the FAB/modal to be hidden on desktop and visible on small screens.

Testing

  • node --check script.js ran and returned no syntax errors (success).
  • git diff --check was run to validate whitespace/patch issues (success).
  • npm ci failed due to registry permission errors (403 Forbidden for a dependency), so node modules could not be restored in this environment (failed).
  • npm run build:css could not complete because the Tailwind CLI was unavailable in the environment (failed), so inline mobile-only CSS was added to avoid requiring a rebuild.

Codex Task

@vercel

vercel Bot commented May 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spends-wise Ready Ready Preview, Comment May 12, 2026 9:48am

@coder11125 coder11125 merged commit a783ac0 into main May 12, 2026
2 of 3 checks passed
@coder11125 coder11125 deleted the codex/add-blue-button-for-quick-expenses-input branch May 12, 2026 09:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 53ecb6f68e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread script.js
Comment on lines +842 to +843
} else if (currentFilter === 'history') {
await renderHistoryView();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refresh the account view after quick-add saves

When the FAB is used from the Account view (currentFilter === 'account'), the new entry is added to expense[] but this refresh helper never calls renderAccountView(). The account cards are computed only inside renderAccountView() from the in-memory transaction list, so after adding an income/expense from that visible view the transaction count, income, expense, and balance remain stale until the user navigates away and back.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant