#30147 closed enhancement (fixed)
Consider adding alignment buttons inline for an image
Reported by: | iseulde | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | ui, javascript | Cc: |
Attachments (12)
Change History (38)
This ticket was mentioned in Slack in #feature-imageflow by janneke. View the logs.
10 years ago
This ticket was mentioned in Slack in #feature-imageflow by janneke. View the logs.
10 years ago
#3
@
10 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.1
- Type changed from defect (bug) to enhancement
This ticket was mentioned in Slack in #feature-imageflow by janneke. View the logs.
10 years ago
#5
@
10 years ago
Oh, and this is now a TinyMCE toolbar, which means we could allow plugins to add new buttons.
This ticket was mentioned in Slack in #feature-imageflow by azaozz. View the logs.
10 years ago
#7
@
10 years ago
In 30147.2.patch:
- Changed the positioning to make it more consistent when editor expand is on/off.
- Fixed adding/removing of
alignnone
class and repositioning after that. - Added a bit stronger box-shadow and border to make the image toolbar more defined.
IMHO this works and looks quite well, ready to be committed.
#8
@
10 years ago
In 30147.4.patch:
- Change the toolbar position to be over the image for iOS, so it doesn't clash with the default popup toolbar there.
- Fix various iOS Safari bugs.
- Don't hide when the parent window scrolls unless editor-expand is enabled.
This ticket was mentioned in Slack in #core by azaozz. View the logs.
10 years ago
#12
@
10 years ago
This is pretty neat.
avryl mentioned that it might be possible to keep the toolbar in place under the cursor until the user moves the cursor away. This means if you are swapping an image between left and right alignment then the toolbar doesn't keep moving away. Do you think this might be possible?
#13
@
10 years ago
Yes, it is possible. However when floating an image, it often moves vertically as well as horizontally. Then the toolbar can end in very awkward places, even off the screen. We can detect where the image has moved and hide the toolbar if it is "too far". That would be somewhat inconsistent behaviour though.
#15
@
10 years ago
Very nice, thanks very much @azaozz, @avryl :)
Noticed a small thing to fix, very edge case, when the toolbar is close to the editor right edge, the "triangle" needs some attention, see its position and "faux" border:
there are different ways to do that, not sure which one to use, proposed patch resets the negative margin and use position, though you might prefer a different approach.
#19
@
10 years ago
For accessibility considerations, please see #27642 which still applies even with this new image toolbar.
#20
@
10 years ago
The "Remove alignment" button should be renamed "No alignment", especially as it's toggled by default.
#22
@
10 years ago
- Resolution set to fixed
- Status changed from new to closed
Marking this as complete. New issues can go into separate tickets.
This needs some more work... E.g. the reposition function is a mess, just wanted to upload everything so far. :) Seems to work well. We were also thinking about adding a button to add a caption when there is none, so I'll consider adding that too.