web-components
web-components copied to clipboard
Possible to split paragraphs in half with drag and drop
Bug Report 🐛
Dragging and dropping a Clause Template into the margins to the left or right of a paragraph allows the Clause Template to split the paragraph in half.
Expected Behavior
The Clause Template should be placed before or after the paragraph
Current Behavior
https://www.loom.com/share/329b20b14ecf4cd9854d31dba93b5e92
Possible Solution
Steps to Reproduce
- drag Clause Template
- drop into margin in the middle of paragraph
- paragraph is split in half
This can be undone and also fixed manually, so not super serious.
@DianaLease playing with the CSS in the demo, I think this is because the drop point is in the padding
of ap-rich-text-editor
. Could we maybe just switch to margin
instead?
@Michael-Grover is this issue still open? I would like to work on it.
@gatij10 test it out in the live Storybook and see if the issue still exists.
@irmerk I tested it out in the live storybook, looks like the issue still exists. I will try to solve it.
@Michael-Grover @irmerk Since the issue exists in the live storybook so shall I work upon this issue.
@DianaLease playing with the CSS in the demo, I think this is because the drop point is in the
padding
ofap-rich-text-editor
. Could we maybe just switch tomargin
instead?
@irmerk This one is not working.The problem may arise bcoz there is not any type of function which handles drop
. So what I intend to do is write the handleDrop
function to handle the Drop. Does it sound good to proceed?
I think @DianaLease is more familiar with this code and can be of more help at the moment. I won't have a chance to look into this for a bit.
hi @Cronus1007 . The logic that handles drop for the contract editor is here: https://github.com/accordproject/web-components/blob/5c92ecbe046af74aabdeed8be2990c28cb5fd9c6/packages/ui-contract-editor/src/ContractEditor/index.js#L199
This function is passed to the MarkdownEditor
as a prop where it gets called whenever a drop event fired.
I'm cleaning up old issues I created, and it looks like this one hasn't been resolved, so I'm keeping it open in case a hacktoberfest 2021 participant wants to give it a shot
Hi @irmerk I wanted to work on this..?
Hello @irmerk , may I work on this issue, if it's still open?
Hi @irmerk @DianaLease where i can ask doubts regarding the problem cause slack link is offline...?
Hi @vikasazad , the Accord Project now uses Discord instead of Slack, you can join at this link: https://discord.gg/xPPT3gVt
If you have questions about this issue, you can add them as a reply to this github issue
I'll assign this to someone when there is a work in progress PR on it.
Hey! This is issue still exist in the storybook live demo and I had checked the code base of contract editor. I am unable to identify the what causing this issue, need some guidance please