-
Notifications
You must be signed in to change notification settings - Fork 102
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
Soft Break not Working => Line Break and Soft Break are interchanged in the code #267
Comments
I think the terminology here may be causing confusion. Softbreaks in the markdown specification are typically rendered as spaces in HTML: Pressing ENTER in the editor should create a new paragraph. Pressing SHIFT-ENTER (sometimes called a soft break in editors!) should create a newline. The markdown specification calls this a hard line break (section 6.9). |
@dselman That is true, the terminology is definitely a little confusing. |
I am new here. Wanted to work on this issue. Can I get started ? |
@Pratik1234agarwal feel free to share here what you'd like to do in regards to this issue that is not captured in #270. |
…#267 Signed-off-by: d-e-v-esh <[email protected]>
…#267 Signed-off-by: d-e-v-esh <[email protected]>
…#267 Signed-off-by: d-e-v-esh <[email protected]>
I believe, based on the tech working group call tonight, this is not actually an Issue. Rather, just a confusion on terminology. Correct @jeromesimeon and @d-e-v-esh? |
That's what I understood for the demo and discussion as well. We should certainly clarify the terminology and how WYSIWYG editing relates to the underlying commonmark. Maybe staying away from "soft break" and "hard break" altogether when we talk about the editing experience would actually improve things. e.g., |
@irmerk @jeromesimeon That is true. This is very confusing. I didn't think of it then but now it makes more sense. We should only have one break (linebreak). right? We can discuss a little bit more on how we want to trigger the line break. |
I think this makes a lot of sense. I'm unclear that the distinction between commonmark softbreak and hardbreaks makes much sense from a user of the rich text editor perspective. And if someone really needs that distinction we can revisit that decision at a later date. I think that also means simply: remove those examples from the demo! |
@jeromesimeon @irmerk Yes, so I thought about this for a few minutes now. The thing that I wasn't able to convey in the call was that I didn't actually change the functionality of any breaks. This is how it was actually supposed to be after removing the restriction on the enter key. I just tried to match the function name in code from what was written in the examples from the demo text so that the hard and soft would make sense. We can put appropriate naming on them now and not care about the soft and hard breaks. This confusion was caused by the text in the demo. That needs to be changed. |
Yes agreed. I think in
Support for CommonMark inline soft line break is supported, but we don't emphasize it in the editor (or the demo text in the Storybook). |
…#267 Signed-off-by: d-e-v-esh <[email protected]>
…#267 Signed-off-by: d-e-v-esh <[email protected]>
…#267 Signed-off-by: d-e-v-esh <[email protected]>
…#267 Signed-off-by: Devesh <[email protected]>
Bug Report 🐛
The soft brake was confused with the line break (i.e. hard break) in the code
This was also causing issue #263
There was no actual functional
linebrake
, just aheadingbrake
with a restriction on the paragraph so it doesn't mess up anything when called from a paragraph. For this reason, the soft break was not working.You can see this when you open up the demo and it appears like this:
Every single break we created came under type
headingbreak
even if it was created in a paragraph.As we can see the soft break is not working in its place and has instead taken up the place of the hard break.
Expected Behavior
It should appear like this:
Current Behavior
Possible Solution
I have fixed up the code and will create a pull request soon explaining the solution in detail
Steps to Reproduce
Context (Environment)
Desktop
Possible Implementation
headingbreak
tolinebreak
andlinebreak
tosoftbreak
so that it automatically matches the template of the frontpage. This shows that this is how it was intended to be written.Enter
from a heading block.linebreak
.The text was updated successfully, but these errors were encountered: