[go: up one dir, main page]

Skip to content

Abstract "MR metadata" outside of a specific app

In this discussion thread, part of the resolution was to open an issue to move our authoritative list of files to a higher, less-app-specific, non-feature-specific location.

Problem

Due to the ad hoc nature of how the Diffs app has grown up, our "authoritative" list of diff files has settled on the list of entries that are generated for the Diffs file tree.
While this works, it's a bit confusing to deal with the file tree entries in places of the code that are unrelated to the file tree.

Moreover, we have other places where a general list of files & metadata will be useful, and they cannot rely on the diffs app having been loaded (and thus generating the tree).

Proposal

Move the authoritative MR metadata to a higher level than any one app.

  • Create an "MR" contract that the Notes and Diffs apps (especially) can use
  • Apps communicate over a standard API with the high-level "MR" abstraction
    • e.g. there's a single way for any code to tell the abstraction "the list of files has changed" or "the number of files is currently indeterminate", and each app is informed of that update