Last modified: 2013-07-05 15:13:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52077, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50077 - VisualEditor: Notice popup appears when there are, in fact, no notices because of enwiki's hack
VisualEditor: Notice popup appears when there are, in fact, no notices becaus...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2013-07-04
Assigned To: Krinkle
:
: 50531 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 01:05 UTC by Oliver Keyes
Modified: 2013-07-05 15:13 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot (25.81 KB, image/png)
2013-06-24 01:05 UTC, Oliver Keyes
Details

Description Oliver Keyes 2013-06-24 01:05:44 UTC
Created attachment 12619 [details]
Screenshot

See screenshot. What am I meant to be paying attention to?
Comment 1 James Forrester 2013-06-24 01:08:53 UTC
(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.
Comment 2 James Forrester 2013-06-25 14:54:26 UTC
(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.
Comment 3 James Forrester 2013-07-02 01:05:49 UTC
*** Bug 50531 has been marked as a duplicate of this bug. ***
Comment 4 Brion Vibber 2013-07-02 16:53:40 UTC
I'd recommend prioritizing this very highly, it's a rather negative experience.
Comment 5 Bartosz Dziewoński 2013-07-02 16:55:44 UTC
This really should be solved on en.wp, not in VE.
Comment 6 Krinkle 2013-07-02 21:40:46 UTC
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).
Comment 7 Brion Vibber 2013-07-02 23:10:58 UTC
Last I checked, we're part of the community.
Comment 8 James Forrester 2013-07-03 01:02:20 UTC
(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.
Comment 9 Krinkle 2013-07-03 01:17:29 UTC
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.
Comment 10 Krinkle 2013-07-03 01:27:38 UTC
(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.
Comment 11 James Forrester 2013-07-05 15:13:25 UTC
This has indeed be fixed by the above on-wiki change; closing.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links