-
Notifications
You must be signed in to change notification settings - Fork 1
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
Gn 4901 autofill variable #472
Conversation
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.
Works well but some comments on the UX.
Also, I think we need an edit component for this to be useful, as currently there's no easy way to modify it, you need to insert a new one.
<AuLabel for='autofill_key'> | ||
{{t 'variable-plugin.autofill.autofillKey'}} | ||
</AuLabel> | ||
<AuNativeInput |
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 think it would make more sense to me as a powerselect, with the possible values taken from configuration. otherwise there is too much margin for error.
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.
Discussed with Elena but will be happy to discuss with you in a standup or we can set up a meeting, the idea is that the plugin is as flexible as possible and the template app have no idea which final values will be implemented in the filler app, this of course has inconvenients as it has margin for error
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.
Hmm, that makes sense but it still seems error-prone since we know at least some common ones that are likely to exist. Happy to just go with a text input though.
class='variable' | ||
{{on 'click' this.onClick}} | ||
> | ||
<EmberNode::EmbeddedEditor |
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.
Do we actually need an embedded editor? As it is you can actually replace the content with text, which does correctly get replaced with the value, but it still seems confusing to the user.
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.
Fixed that, thank you for spotting the problem :)
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.
It seems like you understood something different than I meant from my comment, but I'm glad it helped spot a bug :)
What I meant was, that I don't see why we want an embedded editor here at all. To my mind, the contents of the variable should only be changeable by setting a different key or label. Here's a screenshot to demonstrate what I mean. This is a document with 2 autofill variables. You can see that I typed over the contents of the second, which means the only way to know that it's an autofill variable is to look in the sidebar. Is there some reason that template builders would want to be able to do this that I am missing?
Ok, so after rewriting a lot of the code, the variable will be initialized only once, so the user can modify it and it won't override its changes |
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.
some translation improvements
@lagartoverde you can merge after you do the translations |
Co-authored-by: Arne Bertrand <[email protected]>
Co-authored-by: Arne Bertrand <[email protected]>
Co-authored-by: Arne Bertrand <[email protected]>
Co-authored-by: Arne Bertrand <[email protected]>
Overview
Made a new variable that get's autofilled if the correct context is provided
connected issues and PRs:
GN-4901
Setup
How to test/reproduce
Challenges/uncertainties
Checks PR readiness