web-components icon indicating copy to clipboard operation
web-components copied to clipboard

Possible to split paragraphs in half with drag and drop

Open Michael-Grover opened this issue 4 years ago • 15 comments

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

  1. drag Clause Template
  2. drop into margin in the middle of paragraph
  3. paragraph is split in half

Michael-Grover avatar Jun 22 '20 15:06 Michael-Grover

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?

jolanglinais avatar Jun 25 '20 12:06 jolanglinais

@Michael-Grover is this issue still open? I would like to work on it.

gatij10 avatar Feb 25 '21 11:02 gatij10

@gatij10 test it out in the live Storybook and see if the issue still exists.

jolanglinais avatar Feb 25 '21 13:02 jolanglinais

@irmerk I tested it out in the live storybook, looks like the issue still exists. I will try to solve it.

gatij10 avatar Feb 25 '21 16:02 gatij10

@Michael-Grover @irmerk Since the issue exists in the live storybook so shall I work upon this issue.

Cronus1007 avatar Mar 15 '21 14:03 Cronus1007

@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?

@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?

Cronus1007 avatar Mar 17 '21 11:03 Cronus1007

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.

jolanglinais avatar Mar 17 '21 12:03 jolanglinais

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.

DianaLease avatar Mar 22 '21 02:03 DianaLease

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

Michael-Grover avatar Sep 23 '21 14:09 Michael-Grover

Hi @irmerk I wanted to work on this..?

vikasazad avatar Dec 06 '21 07:12 vikasazad

Hello @irmerk , may I work on this issue, if it's still open?

TC5022 avatar Dec 06 '21 13:12 TC5022

Hi @irmerk @DianaLease where i can ask doubts regarding the problem cause slack link is offline...?

vikasazad avatar Dec 08 '21 08:12 vikasazad

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

Michael-Grover avatar Dec 09 '21 20:12 Michael-Grover

I'll assign this to someone when there is a work in progress PR on it.

jolanglinais avatar Dec 21 '21 17:12 jolanglinais

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

anmode avatar Jan 25 '22 07:01 anmode