zinc-collective / convene

An Operating System for the Solidarity Economy
https://convene.zinc.coop
Other
57 stars 21 forks source link

Make Markdown Gizmo Rich Text and/or add an HTML `Gizmo` #2268

Open rosschapman opened 8 months ago

rosschapman commented 8 months ago

Migrating Moment Park has demonstrated how hard it is to create even a simple web page in Convene. The Markdown Gizmo can get you pretty far, but as you can see on a page like https://convene.zinc.coop/spaces/moment-park/rooms/iphone-apps, you're really at the mercy of vertical flow.

Original: image

On Convene: image

Using ActionText/Trix for the Markdown Gizmo would be an improvement, but that wouldn't help too much where an operator might want more layout control for floated and horizontally aligned image or text blocks. While Trix does support inlining images, it doesn't seem to allow floating text next to images or vice/versa. At least I couldn't figure it out in their demo.

image


Related issues:

anaulin commented 8 months ago

I think that the ideal would be to be able to switch the "block of content" gizmo between Markdown and ActionText ("rich text") modes. But if we have to pick one, I think rich text is more user-friendly than markdown.

Maybe for the specific MomentPark example what we want is something like a "grid" gizmo, which can contain multiple "cards", and each card can be edited separately and the cards might be re-ordered? Could also be used to make an image gallery, for example.

Just spitballing here, adding new gizmos might be more work than it's worth. 🤔

rosschapman commented 8 months ago

Right, markdown is popular but I wonder how popular actually. ActionText's rich text seems like a much friendlier default. It also probably wouldn't be that difficult to add a client-side JS markdown library that would convert markdown as you type into Trix WYSIWYG into HTML on a change/input event. Like, if there was a burning 🔥 desire for that.

I've thought about a generic table and/or grid gizmo, that could be used for a gallery or other purposes. My concern is what behavior you would build into it for the 70-80% use case? I feel like no two people want to display things the same way exactly, or folks would be frustrated by any constraints they wouldn't find just using an html table or grabbing a snippet from somewhere else online and modifying it.

zspencer commented 8 months ago

I think it's fine to use ActionText whenever we are collecting user input and move entirely away from Markdown. I also think refactoring the MarkdownTextBlock to RichTextBlock is entirely reasonable.

I would love a CardGridSectionGizmo at some point; (and maybe now is that point!). My hope for v1 of Gizmos is that they provide a useful building blocks that solves information accessibility and interaction design; and if the Gizmo needs substantial diversity in it's visual design we explore that in V2 of the Gizmo (or split out alternative Gizmos)