Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28567 closed defect (bug) (fixed)

When a wpview is selected, show the view type in the TinyMCE "path"

Reported by: azaozz's profile azaozz Owned by:
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords: has-patch
Focuses: javascript Cc:

Description

The TinyMCE "path" (at the bottom) is probably the most overlooked feature in the editor. However it can be really helpful in some cases.

When a view is selected the path shown couple of nested divs. It should show only the view's wrapper div, preferably named as the view's type: gallery, video, audio, embed, etc.

Attachments (6)

28567.patch (4.0 KB) - added by iseulde 10 years ago.
28567.2.patch (4.0 KB) - added by iseulde 10 years ago.
28567.3.patch (6.0 KB) - added by iseulde 10 years ago.
28567.4.patch (5.5 KB) - added by iseulde 10 years ago.
28567.5.patch (5.0 KB) - added by azaozz 10 years ago.
28567.6.patch (614 bytes) - added by iseulde 10 years ago.

Download all attachments as: .zip

Change History (22)

#1 @iseulde
10 years ago

Ah, I was about to report this too. :)

#2 @helen
10 years ago

  • Focuses javascript added
  • Keywords needs-patch added

@iseulde
10 years ago

#3 @iseulde
10 years ago

  • Keywords has-patch added; needs-patch removed

@iseulde
10 years ago

@iseulde
10 years ago

@iseulde
10 years ago

@azaozz
10 years ago

#4 @azaozz
10 years ago

In 29022:

TinyMCE wpView:

  • Improve the fake caret hide/show.
  • Improve getView() speed.
  • Add callback for showing the proper path when a view is selected. This currently doesn't work, will start working after we update TinyMCE.

props avryl, see #28567, #28595.

@iseulde
10 years ago

#5 @iseulde
10 years ago

Looks like I left some trailing whitespace there... We should probably include this in de next wpviews patch.

#6 @afercia
10 years ago

hi,
please consider views names displayed in TinyMCE path should be translatable. If I'm not wrong, you're currently using the "viewType" and while terms like "video" or "audio" are probably ok in most languages, I'm pretty sure "gallery", "playlist", "embedURL" are not.
It would be great to make translatable also "more" and "nextpage" :-)

#7 follow-up: @iseulde
10 years ago

That is a good point... I wonder if strings such as table and block quote are translated?
For the more and nextpage tags, see #28539.

#8 follow-up: @azaozz
10 years ago

Don't think we should be translating the elements in the TinyMCE path. It shows the element "type" as used in the HTML. It doesn't make sense to translate P, DIV, SPAN, IMG, same for more, nextpage, gallery, etc.

#9 @azaozz
10 years ago

In 29038:

TinyMCE wpView: remove leftover/unused bits, see #28567.

#10 in reply to: ↑ 8 ; follow-up: @afercia
10 years ago

Replying to azaozz:

Don't think we should be translating the elements in the TinyMCE path. It shows the element "type" as used in the HTML. It doesn't make sense to translate P, DIV, SPAN, IMG

just to make it clear, I didn't suggest to translate all the HTML elements but just the terms you're adding for the wp views.

same for more, nextpage, gallery, etc.

"gallery" isn't exactly an element type as used in the HTML... same for "embedURL" or "embed"

Additionally, some video views (e.g. the self-hosted videos) will show "video" while embedded videos (e.g. vimeo, youtube) will show "embedURL" which for most users will be difficult to understand. There are also other embed types to consider, e.g. Twitter.
I'm just suggesting to show terms that users can easily understand, possibly in their language.
Just my 2 cents.

#11 in reply to: ↑ 7 @afercia
10 years ago

Replying to avryl:

That is a good point... I wonder if strings such as table and block quote are translated?
For the more and nextpage tags, see #28539.

thx avryl, I'm already watching ticket #28539 :-)
One more reason to translate them also in the TinyMCE path, otherwise users will see a translated "more" string in the editor area and an untranslated one in the path

#12 in reply to: ↑ 10 ; follow-up: @azaozz
10 years ago

Replying to afercia:

"gallery" isn't exactly an element type as used in the HTML...

Right, however that is the name of the shortcode. The TinyMCE path shows the "names" of the HTML elements. If you switch to the Text editor you'll see "gallery", not the translation.

Logically we should leave all wpviews to show as div, don't think it would be better.

Version 0, edited 10 years ago by azaozz (next)

#13 in reply to: ↑ 12 @afercia
10 years ago

Replying to azaozz:

Right, however that is the name of the shortcode. The TinyMCE path shows the "names" of the HTML elements, i.e. part of the markup. If you switch to the Text editor you'll see "gallery", not the translation.

yes and no :-)
in the case of "embedURL" if you switch to Text editor there's really no "markup".
We often tend to think as developers, while I'm just trying to see things from a user's perspective. For example, whether it's a video shortcode, embed shortcode or URL auto-embed, for most users those will be just "videos".
Probably the ambiguity lies in the fact that the "Visual" editor is intended to be helpful for non-technical users while the path displays "technical" information that they can't understand. So it's not a surprise the TinyMCE path is one of its most overlooked features.
Btw this is an issue not specific to wpviews so I'm going to agree with you and keep things simple. I'll try to think to something new for our poor, neglected path and hopefully submit a new proposal. Thanks.

This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.


10 years ago

#15 @DrewAPicture
10 years ago

@azaozz: What's left here?

#16 @iseulde
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

TinyMCE is updated now, so event.preventDefault() and event.stopPropagation() work.
Let's deal with localisation in #28799.

Note: See TracTickets for help on using tickets.