PublicLab.Editor
PublicLab.Editor copied to clipboard
Errors on creating and deleting Headers and converting back to plain text
The maximum tag of heading that can be added is <"h4>". we Should increase it to "<"h6>" and also we can't convert the text back to non-heading once it's made it to heading.We should fix it as well.
@VladimirMikulic @jywarren @emilyashley what are your views on this issue!!!
I don't think that it's an issue, the user can simply manually add #
to get h5/h6.
@VladimirMikulic Agrees with you.But that only possible if you are in Markdown mode and also know how to use it.
Feel free to write a wrapper around it :)
@nstjean @cesswairimu @govindgoel I think we should look up this @keshav234156 makes some point.
sure go ahead
Hi all! Sorry for slow reply, but i think here, we can't convert the text back to non-heading once it's made it to heading
is the critical piece. It's very hard to get rid of headers! There are a variety of header creation/changing bugs and some broken Markdown often gets generated as a result. So I'd like to refocus this issue on thoroughly documenting and solving the header creation/deletion bugs using our #509 #507 workflows?
Here is a GIF of pretty normal-looking header interaction; creating headers by using the header button, but also by selecting text and making it a heading with the hotkeys (cmd-D):
Here is selecting a heading and using the heading button to cycle through heading sizes. These gifs could be part of documentation, and should be covered in a test:
Hmm, i'm not able to get the odd header bugs I've seen on creating headers to happen. I'll keep extra careful watch here and will try to make a GIF. Maybe it only occurs in more complex documents?
This may need to be split into the bug search vs "converting back to plain text" as separate issues!
@jywarren Can you please share the problem related to Header that needs to be fixed here?
The most practical way to implement it in my opinion is to switch back to plain text after the max heading is reached. I agree with @jywarren this need to be included in the doc for users so that they're aware of all the features.
For Heading bug search this is all that I found so far
The same actions yield the desired result in markdown mode.
It does look like that's a good documentation of a bug. I wonder if we can now write a Jest test to reproduce what's happening in that gif!
I also found this. I'm not sure, is it a related bug or shall we split this into two? Basically i try deleting all text and writing, but if the text started with a title, i can't seem to get out of title mode.
This makes for a really great test though! It's so easy to reproduce in Jest. Start with some text that includes a header. Then press select all and delete. Then try typing again, and write an assertion that it should not be a title text!
@keshav234156 would you like to try writing a test for this?