Page MenuHomePhabricator

Don't add new-talk div if there's not a new talk message
Closed, ResolvedPublic


The div for the new talk message notification (newtalk) is always rendered, even when empty. This makes it difficult to style.

461			?>
462			<div id="new-talk">
463				<?php $this->html( 'newtalk' ) ?>
464			</div>

Wrap it in a conditional, as suggested in MediaWiki's skinning docs or as implemented in this skin for site notices, to avoid displaying it if the message is empty.

461			if ( $this->data['newtalk'] ) {
462			?>
463				<div id="new-talk">
464					<?php $this->html( 'newtalk' ) ?>
465				</div>
466			<?php
467			}
468			?>

Event Timeline

Oznogon created this task.Dec 19 2016, 8:17 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 19 2016, 8:17 AM

I'm wondering if this is ./includes/page/WikiPage.php or ./includes/skins/Skin.php or ./includes/user/User.php...

Oznogon updated the task description. (Show Details)Dec 19 2016, 5:49 PM


Sorry, not sure how this got into MW general. I filed it from and for the Refreshed skin project.

SamanthaNguyen moved this task from Backlog to Feedback on the Refreshed board.Dec 19 2016, 6:52 PM

Change 328295 had a related patch set uploaded (by Jack Phoenix):
Only output div#new-talk when it makes sense

Change 328295 merged by jenkins-bot:
Only output div#new-talk when it makes sense

ashley closed this task as Resolved.Dec 19 2016, 10:36 PM
ashley claimed this task.
ashley removed a project: Patch-For-Review.
ashley added a subscriber: ashley.

Thanks, fixed.