plentico / plenti

Static Site Generator with Go backend and Svelte frontend
https://plenti.co
Apache License 2.0
985 stars 50 forks source link

CMS editor improvements #233

Closed jimafisk closed 1 year ago

jimafisk commented 1 year ago

CMS issues identified by @stephanieluz:

jimafisk commented 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:

```svelte ```

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:

```svelte
```

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:.

notramo commented 1 year ago

Deletion shouldn't display a popup: https://alistapart.com/article/neveruseawarning/

jimafisk commented 1 year ago

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.

jimafisk commented 1 year ago

Release v0.5.24 has:

Confirmation tooltip when deleting JSON content ![json_confirm](https://user-images.githubusercontent.com/5913244/210289204-888e281b-ab66-495a-80fe-317fd3eb15d9.png)
Confirmation when removing media assets and links to content referenes ![media_confirmation](https://user-images.githubusercontent.com/5913244/210289206-d88ee859-8149-4c4c-82d7-5c1d154f0a10.png)

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