This differential implements draft store processing functionality in CommCoreModule to enable bulk drafts dump to SQLite.
Details
Make sure eslint and flow do not point errors.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Looks good!
Easy to review as it closely follows the conventions from processThreadStoreOperations(...) and processMessageStoreOperations(...)
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
357 ↗ | (On Diff #18473) | Personally prefer being explicit in the lambda capture list, but don't think we ever determined any "team convention" so totally up to you |
373 ↗ | (On Diff #18473) | Same thing where I'd personally prefer being explicit about the lambda capture list, but up to you |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
373 ↗ | (On Diff #18473) | Here and above I was following the code for processMessageStoreOperations and processThreadStoreOperations where lambda captures are also as simple as this. |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
317–318 ↗ | (On Diff #18473) | It's a really bad practice to use #define constants (in ancient times this was the solution, but now it's ok to use const). The most important drawback of using #define is that the name will disappear and during the runtime (e.g. debugging) there's only the value. So you won't see MOVE_DRAFT_OPERATION when debugging, it will be just "move" and that will make this process a lot harder. |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
317–318 ↗ | (On Diff #18473) | Sure. I will also replace #define with constants for MessageStore and ThreadStore operations. |
At this point, nearly every workflow requires additional steps. Maybe we can think about a way to make this seem better in the future -- users should know before reading the footnote that Nix isn't going to do everything for them. But, it will do most of the work for them, and anything else will be smaller.
While the user might still know this, the footnote isn't really helping right now. It makes it seem like we told them Nix will do a lot of things, and then later slid in that they will have to do more things.
Currently, the footnote for these sections has a lot of examples for "additional steps." Plus, "additional steps" is broad and could mean any amount of steps, especially to a user who has no familiarity with the dev environment.
So we should think about that, since most of the time footnotes should be used sparingly. If they end up affecting a large portion of a section, we should just make it information the user knows outside of just the footnote. But this can be a separate issue.