Closed jimafisk closed 1 year ago
I wrestled with fixing the plaintext fields to stop getting unwanted HTML and encoding artifacts. I thought it would be easiest to just use a regular text input, or more appropriately using a textarea since that's what these fields were made for, but getting this to resize correctly was maddening:
This ^ generally worked, but there was weirdness around loading the appropriate height initially (once set, you could remount the component fine) and the padding caused a slight scrolling effect that was unwanted.
So I thought maybe we should stick with the original contenteditable element and on:input
remove the HTML:
But that was over-engineering as well. Ultimately doing a simple bind:textContent
instead of bind:innerHTML
content was the way to go; sometimes I like to make easy problems hard :facepalm:.
Deletion shouldn't display a popup: https://alistapart.com/article/neveruseawarning/
I hadn't thought of using an "undo" function like gmail's undo send extension. It would be easy enough to implement with a timeout function.
I had also thought about using a multi-function, dropdown button that defaults to "cancel" instead of "delete." That way someone would have to consciously switch to the delete option before using it. Drupal uses dropdown buttons to group related operations.
I'd also like the success / failure on save to be more apparent. Currently the save button flashes "changes committed" or "could not commit changes" but you'd have to be paying attention to even notice. At the very least we could change the button from its default blue to green on success and red on failure to provide a visual queue.
Release v0.5.24 has:
Remaining items from this ticket:
When uploading new images, if pane changes
This still needs to be addressed, I created a separate issue to track progress: https://github.com/plentico/plenti/issues/247
Making edit in visual and then adjusting in code editor causes some changes to disappear
I need more details on this, so @stephanieluz if that's still an issue can you please open a new ticket with details
Resolve image name conflicts
As noted previously, there's already a separate issue for this: https://github.com/plentico/plenti/issues/221
CMS issues identified by @stephanieluz: