PublicLab.Editor icon indicating copy to clipboard operation
PublicLab.Editor copied to clipboard

Errors on creating and deleting Headers and converting back to plain text

Open keshav234156 opened this issue 5 years ago • 16 comments

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.

keshav234156 avatar Feb 05 '20 18:02 keshav234156

@VladimirMikulic @jywarren @emilyashley what are your views on this issue!!!

keshav234156 avatar Feb 05 '20 18:02 keshav234156

I don't think that it's an issue, the user can simply manually add # to get h5/h6.

VladimirMikulic avatar Feb 05 '20 19:02 VladimirMikulic

@VladimirMikulic Agrees with you.But that only possible if you are in Markdown mode and also know how to use it.

keshav234156 avatar Feb 05 '20 19:02 keshav234156

Feel free to write a wrapper around it :)

VladimirMikulic avatar Feb 05 '20 19:02 VladimirMikulic

@nstjean @cesswairimu @govindgoel I think we should look up this @keshav234156 makes some point.

NitinBhasneria avatar Mar 19 '20 17:03 NitinBhasneria

sure go ahead

cesswairimu avatar Mar 23 '20 22:03 cesswairimu

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?

jywarren avatar May 12 '20 14:05 jywarren

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

editor

jywarren avatar May 12 '20 14:05 jywarren

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:

editor2

jywarren avatar May 12 '20 14:05 jywarren

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?

jywarren avatar May 12 '20 14:05 jywarren

This may need to be split into the bug search vs "converting back to plain text" as separate issues!

jywarren avatar May 12 '20 14:05 jywarren

@jywarren Can you please share the problem related to Header that needs to be fixed here?

keshav234156 avatar Jun 11 '20 16:06 keshav234156

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.

cypherean avatar Jun 13 '20 17:06 cypherean

For Heading bug search this is all that I found so far PublicLab Editor-Google-Chrome-2020-06-13-23-20-42

The same actions yield the desired result in markdown mode.

cypherean avatar Jun 13 '20 18:06 cypherean

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!

jywarren avatar Jul 21 '20 16:07 jywarren

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!

editor2

@keshav234156 would you like to try writing a test for this?

jywarren avatar Jul 21 '20 20:07 jywarren