actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
15.62k stars 1.21k forks source link

feat: now button at budget page #3703

Open UnderKoen opened 4 weeks ago

UnderKoen commented 4 weeks ago
netlify[bot] commented 4 weeks ago

Deploy Preview for actualbudget ready!

Name Link
Latest commit cab4e2ab1c963c8dada82d6707d28cd1fc01307b
Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/67292323a6e49300081c6b9f
Deploy Preview https://deploy-preview-3703.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 site configuration.

github-actions[bot] commented 4 weeks ago

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
10 5.34 MB → 5.34 MB (+805 B) +0.01%
Changeset File | Δ | Size ---- | - | ---- `src/components/budget/MonthPicker.tsx` | 📈 +805 B (+17.69%) | 4.44 kB → 5.23 kB
View detailed bundle breakdown
**Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/wide.js | 239.81 kB → 240.6 kB (+805 B) | +0.33% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/resize-observer.js | 18.37 kB | 0% static/js/workbox-window.prod.es5.js | 5.69 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.5 kB | 0% static/js/BackgroundImage.js | 122.29 kB | 0% static/js/narrow.js | 82.57 kB | 0% static/js/usePreviewTransactions.js | 1.64 kB | 0% static/js/AppliedFilters.js | 21.3 kB | 0% static/js/ReportRouter.js | 1.5 MB | 0% static/js/index.js | 3.35 MB | 0%
github-actions[bot] commented 4 weeks ago

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 1.27 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.js | 1.27 MB | 0%
coderabbitai[bot] commented 4 weeks ago

[!WARNING]

Rate limit exceeded

@UnderKoen has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 30 seconds before requesting another review.

⌛ How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.
📥 Commits Reviewing files that changed from the base of the PR and between 87835c7c6bdf10a5ab97f5f8e78b1bfbca6ae309 and cab4e2ab1c963c8dada82d6707d28cd1fc01307b.

Walkthrough

The changes in the pull request focus on the MonthPicker component located in MonthPicker.tsx. The useTranslation hook has been imported from react-i18next, along with the SvgCalendar component from ../../icons/v2. A new "Now" button has been introduced, which, when clicked, invokes the onSelect function with the current month as its argument. This button is styled with specific attributes and is positioned absolutely within the component's layout.

The overall structure of the component remains unchanged, maintaining the existing hover and selection logic. The t function from useTranslation is used to set the button's title to "Now". The method signature for onSelect in MonthPickerProps has been updated to reflect the context of usage with the addition of the "Now" button, although the signature itself has not changed. The component continues to display months responsively, allowing users to select a month with the current month highlighted.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `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. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - 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 src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
youngcw commented 4 weeks ago

test again

youngcw commented 4 weeks ago

moved back to WIP like it was before

youngcw commented 4 weeks ago

Can you make this not take up extra vertical space? Maybe put the button in line with the picker somewhere instead of over it?

Jonathan-Fang commented 3 weeks ago

I agree with @youngcw about making the now button in line with the picker.

Another suggestion is to put the now button under the picker so that the user knows where to look, the Now is kinda sitting with a lot of whitespace around it to me.

And thank you for getting this started!

github-actions[bot] commented 2 weeks ago

:wave: Hi! It looks like this PR has not had any changes for a week now. Would you like someone to review this PR? If so - please remove the "[WIP]" prefix from the PR title. That will let the community know that this PR is open for a review.

UnderKoen commented 2 weeks ago

/update-vrt

UnderKoen commented 2 weeks ago

/update-vrt

UnderKoen commented 2 weeks ago

/update-vrt

UnderKoen commented 2 weeks ago

/update-vrt

youngcw commented 2 weeks ago

Would it work to use the calendar icon we have, or would that be confusing?

In the dark modes something about my monitor/eyes makes the now button look like its glowing almost like the color changing buttons you see on discord.

UnderKoen commented 2 weeks ago

It definitely looks cleaner! But I would expect a date picker widget when I press it with this icon. What do you think?

image

youngcw commented 2 weeks ago

Isn't it common to have a calendar icon as a "today" button? I feel like that gets used plenty

UnderKoen commented 2 weeks ago

/update-vrt

youngcw commented 2 weeks ago

Instead of "Now" could the hover text say "Today"? And I think it would look nicer if the button stayed with the month picker instead of being pinned to the far left header.

Jonathan-Fang commented 2 weeks ago

It looks great! Thanks for all the good work.

One bug I found is that the calendar button when multiple months are displayed is too far to the left; it's not flush with the left side of the month. image