Closed kleinerpirat closed 3 years ago
To summarize, I see two ideas here:
Code
field, when accepting the occlusionsThe commands need to be in a field however, as they need to be injected into the template, in order to work on the mobile platforms. This is why I made the Collapsible Fields add-on. It is completely possible to auto-fill a field, while it is collapsed, which is how I imagined it.
I imagined the Code field to be suffixed with a 0
, like Code 0
. This nicely follows the naming convention for the other Code fields.
I will also give the "rect block" an additional prefix in this field, as to still allow possible "power users" to add their own commands below it, and not be automatically replaced. Something like:
[#!autogen [[rect1::1,2,3,4]]
[[rect2::1,3,5,4]]
[[rect3::7,6,6,4]] #]
... extra commands go here
This would also be easy to do, with the add_cards_will_add_note(problem, note)
gui hook.
How would you imagine the behavior in the editor however? I'm afraid users will be very confused, if they then close the "Edit Current Card" window, with the occlusions open, and they were not automatically accepted. Same for the browser. I'm afraid neither the browser, nor edit current offer any convenient hooks for this kind of behavior. I might have to add those myself first.
[#!autogen ... #]
is a very neat idea to meet both average and power user demands. Great thinking!
Edit: I also like the idea of the suffix 0
, seems like the way to go in order to keep things simple.Code 0
field, if a change is made in the occlusion editor", but I'm not sure if that is desirable in your eyes. "Accept occlusions" would still be necessary for users without a Code 0
field...For the future, I will try to implement a live-update solution, like you suggested, but that requires some more work in the JavaScript part of occlusion editor. Updates on that are tracked in #42.
It would be nice to be able to assign a specific field as a container for the "rect-block" when making image occlusions, so Closet could automatically fill it (see mockup below) instead of only adding the markup to the clipboard, since it's quite easy to forget pasting it before adding a note.
Adding the commands manually seems like a redundant task for the use case of standard image occlusions, and should be automated in my opinion, because it is unintuitive for non-tech-savy users. One could even argue that visible commands aren't even necessary for the majority of users and should therefore be hidden somewhere outside of the fields, but auto-pasting them would be a good compromise.