ENG-1503: Replace getFormattedConfigTree consumers with direct helper calls#860
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
📝 WalkthroughWalkthroughThis pull request refactors settings access patterns across the roam application by systematically replacing direct usage of Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
mdroidian
left a comment
There was a problem hiding this comment.
I won't block on this, but most of these changes look like they use the same functions that getFormattedConfigTree was using. If so, how is this an improvement? I was under the impression the removal of getFormattedConfigTree was to consolidate under dual read. But these changes are effectively the same behavior/logic as previously? It actually seems like these changes will make it more difficult to fully migrate (we'll have to look for many more smaller generic functions, rather than one function)
Can you help me understand what the purpose/benefit of these changes are?
| const settings = getFormattedConfigTree(); | ||
| const exportSettings = settings.export; | ||
| const parentUid = settings.export.exportUid; | ||
| const exportSettings = getExportSettingsAndUids(); |
There was a problem hiding this comment.
So the idea is that depending on how we're going to clean up the functions, if we want to clean up by an individual component, we had to remove getFormattedConfigTree. This is because it could be used on multiple components in a single file but also because we cannot remove just a single. It could be the case that if we move a single key when we're trying to clean up that entire tree of components somewhere else in the repo could use that key, which would then break and go outside of the scope of what we're trying to clean up.
77d08f3 to
991a7c9
Compare
https://www.loom.com/share/e1bb8573adfe49549013385f6391d21a
Summary by CodeRabbit