silverstripe / silverstripe-cms

Silverstripe CMS - this is a module for Silverstripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.
http://silverstripe.org/
BSD 3-Clause "New" or "Revised" License
516 stars 333 forks source link

"Link to external URL" displays short code when editing existing link #2513

Open maxime-rainville opened 4 years ago

maxime-rainville commented 4 years ago

Description

You can use the "link to external" option to edit existing link. However, if those links were created with the "link to a page" or "link to a file" option, it will display the short code in the link modal.

Steps to reproduce

Expected behaviour: Nothing appears in URL field. Actual behaviour: You'll see a short code string [file_link,id=4]

image

emteknetnz commented 4 years ago

@sachajudd Does @maxime-rainville expected behavior seem correct?

clarkepaul commented 4 years ago

@emteknetnz @maxime-rainville displaying an empty URL field makes sense. The person would be trying to change the link type, meaning the short-code is irrelevant. If they want to exit and return they can do so still.

Would there be the possibility to advise people they are about to change the link type with a notification in the modal? Could be a separate issue if its possible. For example... "The selected link type is different from what is currently set, by changing the link type some information may be lost."

maxime-rainville commented 4 years ago

Would there be the possibility to advise people they are about to change the link type with a notification in the modal? Could be a separate issue if its possible. For example... "The selected link type is different from what is currently set, by changing the link type some information may be lost."

I'm thinking there's probably a meta discussion to have in here.

Adding a warning to the modal would probably be relatively easy, but generally speaking I think the way we managed link is kind of inelegant, both from a UX perspective and from a developer perspective. That's probably why there's so many link field addons.

In a perfect world, we would have a unified service for managing links, both as a stand alone field and in the WYSIYG. Each type of link you might want to manage would then become some sort of provider you plug into the link management service.

maxime-rainville commented 4 years ago

Ingo's got a discussion started on this topic on the forum. https://forum.silverstripe.org/t/new-links-module/1642

sachajudd commented 4 years ago

Related to https://github.com/dnadesign/silverstripe-elemental/issues/589