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
Transaction entry #426
Transaction entry #426
Conversation
There are some issues/tasks still open:
|
@@ -32,3 +32,30 @@ def insert_line_in_file(filename, lineno, content): | |||
with open(filename, "w") as file: | |||
contents = "".join(contents) | |||
file.write(contents) | |||
|
|||
|
|||
def insert_transaction_in_file(filename, lineno, content): |
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.
This should really insert a data.Transaction
and use parser.printer
for it.
Can you rebase this and fix tests/lint? Then I could help with some of the changes |
I rebased and fixed the tests/lint. You can display the transaction form by using the keyboard shortcut Please announce it (here or on Gitter) if you are working on changes, so we do not work on the same. |
Seems like you didn't push the rebase, will do that. Also the autocomplete is currently shown in the wrong position, will fix the css for that and also hide some of the labels, I find placeholders are nicer. This way we can imitate the form looks more like a transaction in the file. |
- fix position of autocomplete popup - use correct terms - placeholders instead of labels
44143ec
to
eadbec2
Compare
Yes, this looks much nicer! |
@yagebu I guess you are adding the |
Yes just started with improving the completions a bit. |
The algorithm(s) for suggesting the account based on the payee, narration and/or other account are an interesting (and seemingly hard) part. Also, these algorithms could be used (or extended) for implementing a UI for |
Right now, I'm only working on the JS part to do fuzzy matchings (and only suggest active accounts). That already goes a long way. |
I've added an input for the flag - it's "cheap" as it has a default and value and can simply be skipped. I'm against supporting links, tags and metadata - it doesn't even support costs atm (and I'm fine with that, it's meant for simple transactions IMHO). |
<input type="number" step="0.01" class="number" name="number" placeholder="Number" /> | ||
<input type="text" class="currency" name="currency" placeholder="Currency" list="currencies" /> | ||
<div class="postings"> | ||
{% for i in range(15) %} |
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.
This seems like a waste of bandwidth. cloneNode should do the trick
e0327b6
to
3c58864
Compare
For development we use the current code from bitbucket. I guess when this feature is complete we release a new version, for which we would need a new version/release of beancount as well (for people installing via pip). We will ping you once this is approaching. |
The currency-input should change it's width for the last row, so it makes space for the "+" and the number inputs are all the same width and neatly vertically aligned. Currently it looks like this: @yagebu Do you know how to achieve that? |
{% for i in range(2) %} | ||
<div class="fieldset posting"> | ||
{% for i in range(3) %} | ||
<div class="fieldset posting{% if i == 0 %} template{% endif %}"> |
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.
I don't see the need for this superfluous element. What was wrong with my code?
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.
Previous to this change, if you add new posting rows with the "+" the inputs in those rows were not awesomplete-initialized, so there was no auto-complete of them.
Background:
When cloning the .posting
-row after pressing "+", the nodes generated by awesomplete were cloned, and the auto-completion did not "carry over" to those nodes, as the list="..."
-property got removed by awesomplete.
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.
Makes sense, thanks for the explanation!
This now uses a (very stupid) handwritten printer that should address most of the concerns above.
Currently it simply uses whatever the user inputs -- which seems the right thing to do to me.
That's the look I was going for, I didn't like the tiny currency input. Changing the width's in the conditional |
This should be understood as a "feel free to change it, I don't care much" ;) |
Can't reproduce. (Of course when the editor is focused the keyboard shortcut doesn't work, but otherwise the shortcut and the button work for me) |
It works now - sorry for the confusion! |
There are just two tasks open:
After this is complete, Documentation and Translation have to be added as well. |
Also includes optimizations for mobile browsers
Awesomplete listened to |
left: $aside-width; | ||
} | ||
} | ||
|
||
.add-transaction-button { | ||
background-color: $color-sidebar-background; | ||
color: $color-journaltable-header; |
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.
this is definitely not a variable that should be used here
@@ -584,6 +608,10 @@ td { | |||
|
|||
&.active { | |||
margin-left: 0; | |||
|
|||
.add-transaction-button { | |||
left: 160px; |
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.
try not to use random constants like this one, we've got variables for this.
height: 41px; | ||
left: 0; | ||
position: fixed; | ||
top: 95px; |
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.
ditto
@fokusov Could you provide the Russian translation strings? |
@aumayr I can't find no new translated strings with |
@fokusov Oh, there seem to be no new strings to translate after all 😃 I thought I had translated new parts for German before and the Russian counterparts were missing, but that does not seem to be the case. Anyhow, thanks for the help! |
Implementation of #421
This is a very big feature to implement, so any help is welcome!