-
Notifications
You must be signed in to change notification settings - Fork 110
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
fix(ui-contract-editor): Highlight read-only text clause template - i242 #251
fix(ui-contract-editor): Highlight read-only text clause template - i242 #251
Conversation
Signed-off-by: k-kumar-01 <[email protected]>
I don't think this is the implementation we'd want. If you click anywhere in the clause while |
I had doubts whether we had to make it all selectable or some parts of it so I stuck to |
I think @Michael-Grover should take the lead on this one as far as UX goes. |
@Michael-Grover Any updates on this? |
@Michael-Grover is on vacation this week. The behaviour I think users will want is that they can select any of the text (in whole, or in part) of the document, including clauses - irrespective of whether the editor is in read/write or read-only mode. As far as I can tell this seems to be the case, in Safari at least. I tested that copy/paste worked into a Google Doc and got quite good results. Paste back into the editor had some issues, but that should be covered under a separate issue. |
@dselman |
Hi @K-Kumar-01 , thanks again for taking on this issue. I'm back from my vacation, so I can give some clarification about the expected behavior. I think we should allow the user to choose what text they want to highlight, instead of forcing them to highlight the entire clause template. See the video for clarification. https://www.loom.com/share/8c31e6837f8546b784f915bb26ede005 Here are some examples of a user choosing what they want to highlight in read-only text. |
@Michael-Grover |
@Michael-Grover |
@K-Kumar-01 The behavior of readOnly:false shouldn't change. This PR should only address allowing users to highlight text in a read only clause template. |
Changed userSelect to text Main body contentEditable set false Variable wrapper contentEditable depend on readOnly prop Signed-off-by: k-kumar-01 <[email protected]>
@Michael-Grover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@K-Kumar-01 Thanks, the functionality looks good to me. I think we should get an engineer's review before merging, like @jeromesimeon or @irmerk
Selection seems strange (Safari) and it seems different if you select forwards, or select backwards. Forwards: Backwards: |
@dselman that's not in read only mode, right? I'm seeing the same behavior in Google Chrome. It looks like in this PR, the user can no longer highlight a combination of clause template text and normal text in editing mode. Users can do this in the current version of storybook here https://ap-web-components.netlify.app/?path=/story/contract-editor--contract-editor. |
@dselman @Michael-Grover |
Signed-off-by: k-kumar-01 <[email protected]>
@dselman @Michael-Grover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great for me. Thank you!
Looks great, thanks @K-Kumar-01 ! |
Signed-off-by: k-kumar-01 [email protected]
Closes #242
Users are able to highlight read-only text in the clause template.
Changes
Screenshots or Video
Author Checklist
--signoff
option of git commit.master
fromfork:branchname