muni-corn / silverfox

The double-entry plain-text accounting tool designed with budgeting in mind
GNU General Public License v3.0
6 stars 0 forks source link

Idea: Comment enum #13

Open muni-corn opened 4 years ago

muni-corn commented 4 years ago
pub enum Comment {
    Right(String),
    Above(String),
    Below(String),
}

Entries and postings can include a Comment so that comments are retained if mvelopes is given permission to move stuff around, e.g. with a format command.

In the event that mvelopes encounters a conflict:

2020/06/11 * foo
    ...
    expenses:other 10

// conflicting comment

2020/06/11 * bar
    ...

mvelopes might present the user with this:

mvelopes found a comment but can't decide which entry it belongs to:

A:  | 2020/06/11 * foo
    |     ...
    |     expenses:other 10
    |
--> | // conflicting comment
    |
B:  | 2020/06/11 * bar
    |     ...

does this comment belong to [A] or [B]? (default: A) 

mvelopes will default to the comment being below the upper entry.

muni-corn commented 4 years ago

Of course, this might get annoying, so mvelopes will either keep a record of the user's decision or completely scrap this idea.

muni-corn commented 4 years ago

Development on this idea: comments are only belong to an entry or posting if it is to the right of the content:

2020/06/12 * foo // entry comment
    ...
    expenses:other 10 // posting comment