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

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

Open
keshav234156 opened this issue Feb 5, 2020 · 16 comments

Comments

@keshav234156
Copy link
Member

keshav234156 commented Feb 5, 2020

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
Copy link
Member Author

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

@VladimirMikulic
Copy link
Contributor

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

@keshav234156
Copy link
Member Author

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

@VladimirMikulic
Copy link
Contributor

Feel free to write a wrapper around it :)

@NitinBhasneria
Copy link
Collaborator

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

@cesswairimu
Copy link
Collaborator

sure go ahead

@jywarren
Copy link
Member

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 jywarren changed the title Heading and converting back. Errors on creating and deleting Headers and converting back to plain text May 12, 2020
@jywarren
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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

@keshav234156
Copy link
Member Author

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

@cypherean
Copy link
Contributor

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
Copy link
Contributor

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.

@jywarren
Copy link
Member

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
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants