Page MenuHomePhabricator

VisualEditor: Notice popup appears when there are, in fact, no notices because of enwiki's hack
Closed, ResolvedPublic

Description

Screenshot

See screenshot. What am I meant to be paying attention to?


Version: unspecified
Severity: normal

Attached:

notice.png (121×1 px, 25 KB)

Details

Reference
bz50077

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:56 AM
bzimport set Reference to bz50077.

(In reply to comment #0)

Created attachment 12619 [details]
Screenshot

See screenshot. What am I meant to be paying attention to?

That enwiki's community, in its wisdom, wants you to see that you can add a page notice to every page, because you're +sysop. It doesn't appear for non-sysops. If they want to commit to adding a class to it that we suppress and reduce the count by one, we're happy to do that.

Attached:

notice.png (121×1 px, 25 KB)

(In reply to comment #1)

(In reply to comment #0)

Created attachment 12619 [details]
Screenshot

See screenshot. What am I meant to be paying attention to?

That enwiki's community, in its wisdom, wants you to see that you can add a
page notice to every page, because you're +sysop. It doesn't appear for
non-sysops. If they want to commit to adding a class to it that we suppress
and reduce the count by one, we're happy to do that.

Looking into this, it seems like we can use class="editnotice-redlink" to select and suppress these (including reducing the count by one). Handing to Timo to implement.

Attached:

notice.png (121×1 px, 25 KB)

  • Bug 50531 has been marked as a duplicate of this bug. ***

I'd recommend prioritizing this very highly, it's a rather negative experience.

This really should be solved on en.wp, not in VE.

I fixed most of these last year by supporting client-side "hidden" notices as non-existent through the hasVisibleText logic I wrote.

These used to trigger a notice for all users, now it only triggers a notice for users that have css in their state that makes these red links visible (I think this is limited to MediaWiki:Group-sysop.css by default + anyone else who likes to have it as well).

There isn't much we can do. If the community insists it is useful to have placeholder edit notices when there is no editnotice that allows opt-in users to create them from a red link, then this is exactly what they want, is it not?

It shows that on EditPage as well (except in there, they are less visible as actual notices but appear as part of the page).

Last I checked, we're part of the community.

(In reply to comment #6)

There isn't much we can do. If the community insists it is useful to have
placeholder edit notices when there is no editnotice that allows opt-in users
to create them from a red link, then this is exactly what they want, is it
not?

It shows that on EditPage as well (except in there, they are less visible as
actual notices but appear as part of the page).

I disagree that the consensus that the enwiki community achieved for having this edit notice in wikitext editor (a consensus which I have disagreed for years, but there you go) transfers to consensus that they want it displaying in VisualEditor.

As a quick hack, we could sniff for the edit notice having class="editnotice-redlink" on it and killing that notice from the array. It's horrible, but it will stop the problem until we fix it properly.

I agree that it isn't obvious whether the community does or doesn't want this information on the edit page. However I also want to emphasise that this is hidden by default, and thanks to our logic that strips out fake notices that have no visible content, they are hidden for the vast majority of users.

If this "Page notice" redlink is visible, it is because the user has styles in their state (either from [[MediaWiki:Group-sysop.css]] or their user stylesheet) that make ".editnotice-redlink" or ".show-sysops" visible (the element in the edit notice has both classes).

So one could argue showing it is the right thing to do, for they want to see it. Why would they want to see it on the edit page but not in VisualEditor? Likely because they don't use it that much in the first place, but it is more intruding in VisualEditor because notices pop up from the editor.

Anyway, to hide in visualeditor without hiding it else where, you can use the following line of CSS:

.ve-init-mw-viewPageTarget-toolbar-editNotices-notice .editnotice-redlink { display: none !important; }

I'd recommend the community adds this to [[MediaWiki:Group-sysop.css]] right below the rules for ".show-sysop { display: block !important; }" and the like.

Note that we can't use ve-ui-toolbar, we can only use "ve-init-mw-viewPageTarget-toolbar-editNotices-notice" because the other elements aren't in the notice's element tree until *after* it is already in the VE DOM, and hiding it after that will merely make the link invisible, the notice container will still be there.

(In reply to comment #9)

.ve-init-mw-viewPageTarget-toolbar-editNotices-notice .editnotice-redlink {
display: none !important; }

I'd recommend the community adds this to [[MediaWiki:Group-sysop.css]]

Actually, add it to [[MediaWiki:Common.css]] below ".sysop-show { display: none" because we want it to apply to non-sysops who made this visible in their user css as well. It won't affect anything else.

This has indeed be fixed by the above on-wiki change; closing.