Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Study: Foldable / displaced comments & synopses #147

Closed
mkoskim opened this issue Aug 11, 2023 · 3 comments
Closed

Study: Foldable / displaced comments & synopses #147

mkoskim opened this issue Aug 11, 2023 · 3 comments
Labels
consideration Features that may or may not be implemented.

Comments

@mkoskim
Copy link
Owner

mkoskim commented Aug 11, 2023

MaweJS scenes are made of different types of paragraphs:

  1. Text exported to draft: <p>,
    and` paragraphs. These are fine as they are now.
  2. Text not exported: <synopsis>, <comment>, <fill> and <tags> paragraphs.

So far, I have mostly used Synopsis to put a "bookmark" to the middle of the scene. Now, when struggling one of my stories, I am sketching an outline editor, which is meant to create synopses. This would mean, that the amount and length of synopsis text will grow.

Current implementation: Currently, comments and synopses are just plain paragraphs (<p> elements). They work fine, because that makes them editable in the editor itself. There is no need to click around to change them.

The drawback of current implementation is that you tend to keep comments and synopses quite short and scarce, so that they don't disturb the flow of the text. Earlier I have tried out many different styling of these blocks, but so far I have found best to keep them as un-intrusive as possible while stille being able to easily notice.

To encourage writers - that is, me - to write longer synopses and keep more comments around, we could try out some techniques to shorten longer blocks.

Margin notes: One of my old ideas have been, that comments and synopses could be pushed to "margin", that is, a floating box outside the text itself. They could also be pulled back to text somehow.

That is bit difficult to implement with SlateJS and React. The implementations I have investigated for this, generally work so that they have their own database for margin comments, and both comments and anchors are rendered separately. This may be fine, true, but this will also mean, that you can't edit the comment / synopsis together with the text, but you need to separately click your cursor to comment/synopsis box.

Folded notes: I have thought a "light-weight" solution for this. Now that editor has folding, it could be possible to use folding feature to compress synopses and comments to single like (disable word-wrap, give fixed max-width and give ellips, just like in index). This could help a bit.

This is not necessarily even difficult. We'd need to make p.comment.folded style, apply that style to comment block when rendering, and add some code to folding to recognize comment & synopsis blocks as foldable.

@mkoskim
Copy link
Owner Author

mkoskim commented Nov 14, 2023

Tried it out shortly: comments, synopses and missing are truncated to oneliners when folded.

Folding needs more work, so that folded blocks are protected from cursor movement. When a block is truncated to oneliner (in CSS), SlateJS does not understand how it should move around.

@mkoskim mkoskim changed the title Try out: Foldable comments & synopses Study: Foldable comments & synopses Dec 11, 2023
@mkoskim mkoskim added the consideration Features that may or may not be implemented. label Oct 10, 2024
@mkoskim mkoskim changed the title Study: Foldable comments & synopses Study: Foldable / displaced comments & synopses Oct 14, 2024
@mkoskim
Copy link
Owner Author

mkoskim commented Oct 14, 2024

One possible idea:

Tables? What if we make certain elements as 2-column tables? That way you could have some sort of table heading in the first column, and content in second column.

This could be possible implementation of so called metablock:

Metablock is meant to collect information together, so that it can be attached to scenes and chapters for various purposes.

@mkoskim
Copy link
Owner Author

mkoskim commented Dec 2, 2024

There are now synopsis and comment (notes) scenes. These are foldable, so this particular problem is partially solved.

@mkoskim mkoskim closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consideration Features that may or may not be implemented.
Projects
None yet
Development

No branches or pull requests

1 participant