Moveable / Draggable embedded MDX components #4125
Replies: 2 comments 1 reply
-
Thanks for the write up, @jayalfredprufrock. I'm really following this part. Can you elaborate on that?
|
Beta Was this translation helpful? Give feedback.
-
@jayalfredprufrock it sounds like you're looking for something a bit more robust but in the meantime you can copy/paste MDX components. Perhaps we should make it a little easier to select them without going into edit mode on them |
Beta Was this translation helpful? Give feedback.
-
As of now, there isn't really a way of moving an embedded MDX component once it has been brought into the markdown. You must either delete the component and add it back to the new desired location, or you must modify the MDX code directly. Neither solution is great for non-dev authors, which for me is the major appeal of Tina in the first place. Just having the ability to swap positions of two embedded components (i.e. move up/down where it simply ignores non-components) or even better some kind of draggable interface would add a major usability boost IMO and make things much more manageable for non-devs.
Block-based editing using templates would be the solution if it weren't for the fact that all the configuration is stuffed into front-matter, essentially making it impossible for developers to not use Tina. That wouldn't be a deal breaker if it were possible to design a block type (perhaps using references to a different MDX collection item) and have that MDX render directly instead of just the path to the file. Then developers would always have an escape hatch if they needed to inject some custom components in between blocks without having to fully build out that custom component for proper consumption in Tina.
Hopefully all this makes sense. Either solution above would be great, but the end goal is the same: allow developers to stay within the IDE and build out custom stuff without forcing them to fully wire every last thing within Tina, while still exposing a subset of things that are easily editable by non-devs. Tina seems soooo close to fulfilling that dream but still falls a little short IMO. I would consider bringing forward a PR if the team has a specific solution in mind but no bandwidth to tackle in the near future.
Beta Was this translation helpful? Give feedback.
All reactions