#32604 closed task (blessed) (fixed)
Inline link toolbar
Reported by: | iseulde | Owned by: | iseulde |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
Show an inline toolbar when the user moves the cursor inside a link.
- The user will be able to see the URL immediately, no need to open the modal.
- It will be a hyperlink, so the user can navigate to that page. This is not currently possible. You have to copy paste the URL in the browser.
- There will be two buttons, one to edit and remove. For now we can link the edit button to the modal. When this is done, we can look into making it inline too.
Attachments (21)
Change History (76)
#2
@
9 years ago
- Keywords ux-feedback added
I can see this being pretty handy. This seems like a common feature with online editors these days.
We'd need to truncate URLs longer than a certain length, possibly by truncating them in the middle (rather than at the end). Eg. example.com/abc...uvwxyz.html
.
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
9 years ago
#4
@
9 years ago
- Keywords ux-feedback removed
We'd need to truncate URLs longer than a certain length, possibly by truncating them in the middle (rather than at the end). Eg. example.com/abc...uvwxyz.html.
Yes! :)
#6
@
9 years ago
We'll need to disable this for images. It already has an inline toolbar. While we could have both on desktop (top/bottom), I don't see how this could work on mobile.
First we need to rework the reposition method in the wordpress
plugin. It should not overlap the target, at least not when it's text. There should also be a setting to render the toolbar above or under the target.
#7
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 4.3
Current patch will make it so that the toolbar does not overlap the target, unless it is higher that half the visible editor area.
Also cleans ups some logic and caches DOM lookups.
TODO: Add the setting.
#10
@
9 years ago
Simplified more, fixed an issue with the toolbar position when the statusbar or toolbars are removed with the settings.
#11
@
9 years ago
32604.5.patch looks good. It feels a bit unexpected when the image toolbar shows under the image, but can get used to it.
Was thinking we may want to get reposition()
out of the menus code block. We will most likely reuse it when implementing the inline links dialog, and possibly other cases in the future.
Would probably be best to create a separate plugin for shared functions used by the other plugins. Then ensure it is always initialized first.
#13
@
9 years ago
There are still a couple of other improvements we should do. When refocussing the editor, the current toolbar should show again. It's bad UX when you click edit, a modal opens, you close it, and the toolbar is gone.
#15
@
9 years ago
Above patch: Move the whole component under preinit. We don't have access to editor.dom before that and other plugins can't add a toolbar earlier anyway. It also makes sure the active toolbar shows after scrolling/resizing. Reduces the amount of callbacks.
#16
@
9 years ago
We shouldn't show the toolbar for anchor tags without a href
attribute, like <a name="foo"></a>
. https://cloudup.com/cJdX0TJJUGP
#17
@
9 years ago
That patch is far from done, it should also exclude linked images, include links with children, have a max-width, be mobile friendly... Probably a few other things. :)
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
9 years ago
#25
@
9 years ago
Also in [32937]: don't show the link toolbar for images wrapped in links. Show the image toolbar.
#26
@
9 years ago
Wondering if there's a way to give keyboard users the ability to activate the preview link. maybe not so easy but would be a nice addition :)
Please consider to update the text for the keyboard shortcuts:
Also, maybe would be useful to explain in the Help tab how the inline toolbars and all the keyboard features work, currently only the Alt+F10 shortcut is mentioned:
This ticket was mentioned in Slack in #core-flow by boren. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-editor by boren. View the logs.
9 years ago
#33
@
9 years ago
@ryan thanks for the vizrecs :)
The link toolbar showing over the link popup is yet another iOS Safari bug :( The z-index is set properly, only iOS disregards it...
Closing/hiding the toolbar with the [X]
button: yeah, it looks similar to other close buttons and is approximately at the tight place -- up/right. Not sure if there s a better icon to use for "Remove".
This ticket was mentioned in Slack in #core-flow by boren. View the logs.
9 years ago
@
9 years ago
Step 2: Click X in the inline media toolbar to remove the image. The result is this. The inline link toolbar is left behind with a link to the deleted image.
#37
@
9 years ago
The images above show how the inline link toolbar is left behind when deleting images via the inline media toolbar. Mac and Chrome with 4.3-alpha-32976.
#38
@
9 years ago
Also an image inserted creates an underline (to denote a link?) behind the image. The underline is present till the image is aligned to centre or left or right. The underline returns back if the image is set to no alignment.
Here is a screenshot https://cloudup.com/c8DnW7g7QEs
Mac and Safari with 4.3-alpha-32991.
#39
follow-up:
↓ 47
@
9 years ago
Might be cool, might be clutter: Copy icon in the link toolbar.
https://wordpress.slack.com/archives/core-editor/p1435510799000244
#40
follow-up:
↓ 41
@
9 years ago
@ryan How can I get access to the archives of your Slack? I'd like to view it, or is it available only to the participants of the dialogues?
#41
in reply to:
↑ 40
@
9 years ago
Replying to daniluk4000:
@ryan How can I get access to the archives of your Slack? I'd like to view it, or is it available only to the participants of the dialogues?
You can get slack access here: https://make.wordpress.org/chat/
But, I should copy that here. I'll attach and caption the image.
@
9 years ago
It might be clutter, but I’m editing a post right now wishing I could click an icon to copy the link to the clipboard for use elsewhere in the post. Currently, I’m clicking the edit icon to raise the link modal, hitting Cmd + C to copy the automatically highlighted link, and then clicking X to dismiss the modal.
This ticket was mentioned in Slack in #core by obenland. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-editor by boren. View the logs.
9 years ago
#47
in reply to:
↑ 39
@
9 years ago
Replying to ryan:
Might be cool, might be clutter: Copy icon in the link toolbar.
https://wordpress.slack.com/archives/core-editor/p1435510799000244
As discussed in chat, copy still requires Flash, so nevermind. :-)
#50
@
9 years ago
- The above doesn't look good. The URL is shortened at the wrong place and the buttons should not wrap.
- Minor: the link is not focusable.
The above image shows how it will look.