-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Remove the "unlink" button from the toolbar #4751
Comments
I totally agree, but it looks like a ticket for a specific usage. E.g. ckeditor5.gihtub.io. Or do you mean to remove the button totally? |
Yes, I would remove it totally. It can be brought back later on as an optional feature, if necessary, but let's wait and see if it makes sense. |
It is already optional https://github.com/ckeditor/ckeditor5-link/blob/master/tests/manual/link.js#L12 |
It may make sense for one thing – you could be able to do ctrl+a and unlink everything. Quite an edge case though. |
Well, everything that goes in the toolbar is optional... but not really: The above code is always executed: Which means that, although we don't want to have it by default, we'll have to keep maintaining it. If we would ever bring it, it should be "really" optional, like having to load additional features or modules to have it available. Ofc, we may be wrong here and have to revert the code cleanup related to that. Still I would prefer to not have such code, because later on we'll never be able to remove it. |
Indeed an edge case. In any case, I would predict a keystroke combination to execute unlink. |
+1 |
I've just realised one thing. Since you cannot escape link when typing at the end of it, you'll often need to remove link from a piece of a text. This is pretty cumbersome now: As you can see, there's no link balloon in this case. You can either click the unlink button in the toolbar or open the link balloon and remove the link from there but this is counterintuitive. So, I'm a bit unsure now about removing the button. The unlink option must be better exposed and/or we must work on escaping link at its right boundary (e.g. implement Firefox's left/right arrow key behaviour). |
I would, in any case, have no button at the first release. It's easy to bring it in later on. My point is that, although cumbersome, users will be able to fix the link somehow. Hopefully, this is not an extremely common situation and the benefits of a less bloated toolbar will overcome the disadvantages caused by it. |
The unlink button was mentioned in a Twitter discussion (https://twitter.com/ckeditor/status/852077313575583744): I'm curious for more opinions on how important is the ability to remove a couple of links at once. |
@Reinmar It could be a problem if we don't provide "Remove formatting" feature. You may want to paste a lengthy chunk of text from the clipboard and use it as a quote but there's a lot of formatting you'd rather see removed because it obscures the meaning of the text. But it still passes the filtering and it's a valid content in the editor. ATM you can do CTRL+A + 2 * CTRL+B to remove all bolds, italics, etc. but once we get rid of the "Unlink" button, you will need to spend a lot of time to clean-up the content from links. Imagine it was a paragraph from the Wikipedia where almost every single word is a link. Alternatively... we can provide some fancy shortcut like CTRL+SHIFT+V to paste plain text. Then, we can get rid of "Unlink" without any issue, I think. |
Let's have a final decision:
|
It could improve after https://github.com/ckeditor/ckeditor5-utils/issues/168. |
Unlink button is disabled when selection contains more than link elements. |
So it seems some things have changed since I posted this https://twitter.com/anowodzinski/status/852116748518252544. I'm for moving the unlink button to the balloon panel then. In the future, we could offer it in the toolbar as an item of a stacked button (drop-button with an arrow), cleaning all links in the selection. So what I think we should do now:
Future: |
It's already there. You mean – enable it by default?
Not necessary now. I'd do the simplest thing for now and simply remove it from the toolbar and component factory. The rest can be moved to a followup. It's not very intuitive for the unlink button in the link balloon to be on when you're not in a link yet anyway, so this wouldn't be a perfect solution either. |
I suppose I should see my eye doctor 😉. No, I'd leave it as it is, visible only when editing existing link.
👍 |
Tests: Removed the Unlink button from the toolbar (see ckeditor/ckeditor5-link#52).
Tests: Removed the Unlink button from the toolbar (see ckeditor/ckeditor5-link#52).
Tests: Removed the Unlink button from the toolbar (see ckeditor/ckeditor5-link#52).
Tests: Removed the Unlink button from the toolbar (see ckeditor/ckeditor5-link#52).
Tests: Removed the Unlink button from the toolbar (see ckeditor/ckeditor5-link#52).
Tests: Removed the Unlink button from the toolbar (see ckeditor/ckeditor5-link#52).
Tests: Removed the Unlink button from the toolbar (see ckeditor/ckeditor5-link#52).
Other: Removed the "Unlink" button. Closes #52. See https://github.com/ckeditor/ckeditor5-link/issues/31#issuecomment-316992952 and https://github.com/ckeditor/ckeditor5-link/issues/149 for plans how unlinking will be exposed in the future. BREAKING CHANGES: The `unlink'` UI component was removed from the component factory.
The unlinking feature is already available in the link editing ballon. This is great, because we can have one less button in the toolbar. The less, the better.
The text was updated successfully, but these errors were encountered: