-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 crashes on reports page with translations enabled #4303
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey 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
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey 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
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
aa852cf
to
f8b97f8
Compare
WalkthroughThis pull request introduces changes that enhance the structure of report option objects across multiple components. The modifications add a new Possibly related PRs
Suggested labels
Suggested reviewers
Tip 🌐 Web search-backed reviews and chat
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
🔇 Additional comments (15)
✨ Finishing Touches
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I imported my pretty large dashboard, and clicked through, changing all the settings on multiple languages, all worked well.
I think there's a bigger refactor to be done here, as you've mentioned, moving away from plain english values stored in the DB but (again, as you said!) it's a lot of work so best done another time.
* Fix crashes * Add release notes
As it says on the tin.
Steps to repro (in the latest release):
Testing this PR involves all of the above, but fixing the original crash uncovered many other crashes of the same shape. It's worth just clicking around the custom reports UI to verify the issue is eliminated (I did as much as I could, but it's possible I missed something).
Note to reviewers: Most of the options I added a "key" to have another value we could have already used as a "key"; for example,
intervalOptions
has.name
. However, there are a ton of places in the reports code that hard-code string checks, and in most of these places, theinterval
(or other attribute) is passed as a plain string rather than a union of possible values. Fixing this is a huge pain—we'd need to add strict string types throughout the entire codebase, then fix all errors, and then add a migration to the new key attribute—so after trying that approach it seemed easier in the short term to just add a 'key' attribute instead with the exact same value as the previously-useddescription
.Also worth noting:
mode
, despite having adescription
attribute, doesn't use that attribute anywhere that's displayed/translated—hence I didn't add akey
.