Skip to content

Conversation

@maxceem
Copy link
Collaborator

@maxceem maxceem commented May 12, 2019

New DraftJs Link Editor functionality (like in Google Docs) which would also help to fulfill the requirements of #2937

In particular, it automatically shows a small popup as soon as link is created, to encourage user to add a title to the link.

maxceem added 2 commits May 12, 2019 10:42
# Conflicts:
#	package-lock.json
#	src/components/RichTextArea/RichTextArea.jsx
@maxceem maxceem requested a review from vikasrohit May 12, 2019 02:53
@maxceem maxceem removed the request for review from vikasrohit May 12, 2019 02:56
@RishiRajSahu
Copy link
Contributor

@maxceem thanks will check it out.

Copy link

@vikasrohit vikasrohit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good with couple of queries about using new libraries. Also, can we have the plugin separate out (I am okay for having separate task for that) in react-components library for sharing the newly developed DraftJS plugin?

@maxceem
Copy link
Collaborator Author

maxceem commented May 13, 2019

@vic-topcoder

Also, can we have the plugin separate out (I am okay for having separate task for that) in react-components library for sharing the newly developed DraftJS plugin?

Yes, we can do that and during the challenge it was one of the requirements to keep the plugin code isolated so it could be potentially reused.

Just want to note, that at the moment we don't have DraftJs editor component inside react-components library. It's fully implemented inside Connect App. Would you like to move DraftJs editor component from Connect App to react-components and reuse it from there?

@vikasrohit
Copy link

Just want to note, that at the moment we don't have DraftJs editor component inside react-components library. It's fully implemented inside Connect App. Would you like to move DraftJs editor component from Connect App to react-components and reuse it from there?

@maxceem What are the other components for related to the DraftJS which we need to move? And I assume once we refactor them to react-components repo, it won't have any specific logic for Connect.

@maxceem
Copy link
Collaborator Author

maxceem commented May 13, 2019

@maxceem What are the other components for related to the DraftJS which we need to move? And I assume once we refactor them to react-components repo, it won't have any specific logic for Connect.

I think we only have to move DraftJs editor RichTextArea component as a component which would let us edit Rich Text. At the moment this component in Connect App is tightly bound with other Connect specific features. So the whole component renders next part:

image
It includes:

  • field to edit title
  • user avar
  • Attach a file button
  • Private switch
  • Cancel and Post buttons

If we move this component to react-components we should only move Rich Text editor:
image

  • the tricky thing would be to handle panel with buttons, as in our design it's mixed with other Connect specific functionality on the right. So on the one hand this panel should be quite independent from DraftJs component so we can put it where we want. On the other hand, it's tightly bound with DraftJs component, so if we keep this panel as a separate component, we should somehow bind functions of the buttons with DraftJs editor. Preferably, without writing a lot of code when reusing this component.

@vikasrohit
Copy link

Thanks @maxceem for the detailed update. Lets move this discussion to a separate issue which we may take up later.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants