Skip to content
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

Draft js link uses ObjectBrowser #1223

Merged
merged 34 commits into from Sep 22, 2020
Merged

Draft js link uses ObjectBrowser #1223

merged 34 commits into from Sep 22, 2020

Conversation

giuliaghisini
Copy link
Contributor

Added objectBrowser to select a link in draft-js.

Now the widget stores in draft-js structure the link without portalUrl. Do you think it may be right or do you prefer to save the portalUrl in draft-js structure on DB?

Sorry, i committed all buildout files of /api folder for a mistake

@cekk
Copy link
Member

cekk commented Feb 20, 2020

@tisto @sneridagh the problem with portalUrl is that old implementation of this widget sent the complete url and serializer/deserializer in restapi branch (for resolveuid) manage urls with portal_url in it.

If we decide a standard, i can fix the backend

@sneridagh sneridagh added this to In progress in Volto Roadmap (PLIPs) Mar 21, 2020
@sneridagh sneridagh changed the title Draft js link objbrw Draft js link uses ObjectBrowser Mar 21, 2020
@sneridagh sneridagh removed this from In progress in Volto 4 Final Mar 21, 2020
@sneridagh sneridagh removed this from In progress in Volto Roadmap (PLIPs) Mar 21, 2020
@sneridagh sneridagh added this to In progress in Volto Roadmap (PLIPs) Mar 21, 2020
@sneridagh sneridagh added this to To do in Newbie Tasks Apr 22, 2020
@iFlameing iFlameing moved this from To do to In progress in Newbie Tasks May 21, 2020
@iFlameing iFlameing moved this from In progress to Review in Newbie Tasks May 22, 2020
@iFlameing iFlameing moved this from Review to In progress in Newbie Tasks May 22, 2020
@iFlameing iFlameing moved this from In progress to Review in Newbie Tasks May 22, 2020
@tisto
Copy link
Sponsor Member

tisto commented Sep 4, 2020

@giuliaghisini one thing I notice is that when choosing an item from the right sidebar the link overlay shows the full URL (e.g. "HTTP://localhost:8080/Plone/news"):

Add-Document

This could be confusing for the user because the backend URL is displayed which might not make sense to the editor. Would it be possible to show the full path instead (e.g. "/news")?

The second thing I am wondering about is what do we store internally? When the editor chooses from the right sidebar we should store an internal link without the full URL, right? Is that converted internally after the user hits the "->" icon?

@tisto
Copy link
Sponsor Member

tisto commented Sep 4, 2020

@giuliaghisini one other minor thing. We should disable autocomplete (autocomplete=off) on the link overlay.

@tisto tisto closed this Sep 4, 2020
Newbie Tasks automation moved this from Review to Done Sep 4, 2020
Volto Team automation moved this from Review in progress to Done Sep 4, 2020
@tisto tisto reopened this Sep 4, 2020
Newbie Tasks automation moved this from Done to In progress Sep 4, 2020
Volto Team automation moved this from Done to Ready for review Sep 4, 2020
@tiberiuichim
Copy link
Contributor

@tisto
Copy link
Sponsor Member

tisto commented Sep 15, 2020

@tiberiuichim I get that. Though, for the user, this might be very confusing. Editors might have no idea what "localhost" means here.

@tisto
Copy link
Sponsor Member

tisto commented Sep 15, 2020

@giuliaghisini please rebase, then I will do a final review and merge. We discussed the localhost issue and it could be that this just happens when using localhost. :)

@giuliaghisini
Copy link
Contributor Author

@giuliaghisini please rebase, then I will do a final review and merge. We discussed the localhost issue and it could be that this just happens when using localhost. :)

done! thanks!

@tisto
Copy link
Sponsor Member

tisto commented Sep 17, 2020

@giuliaghisini thanks! one other question that crossed my mind: how does this behave when you have a RichText field with a text in the sidebar? We do this a lot in our projects. If the sidebar contains the Link, how do we open another sidebar with the content browser?

@giuliaghisini
Copy link
Contributor Author

@giuliaghisini thanks! one other question that crossed my mind: how does this behave when you have a RichText field with a text in the sidebar? We do this a lot in our projects. If the sidebar contains the Link, how do we open another sidebar with the content browser?

another sidebar come'up and overlays the sidebar. When users select's the link, the sidebar contains the ObjectBrowser disappears and user could continue editing the text

@tisto tisto moved this from Ready for review to Review in progress in Volto Team Sep 22, 2020
Volto Team automation moved this from Review in progress to Reviewer approved Sep 22, 2020
@tisto tisto merged commit 4847eed into master Sep 22, 2020
Newbie Tasks automation moved this from In progress to Done Sep 22, 2020
Volto Team automation moved this from Reviewer approved to Done Sep 22, 2020
@tisto tisto deleted the draft-js-link-objbrw branch September 22, 2020 10:07
@sneridagh sneridagh moved this from In progress to Done in Volto Roadmap (PLIPs) Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Newbie Tasks
  
Done
Volto Team
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants