Last modified: 2013-04-02 01:22:59 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 T20249, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18249 - Changes to DSN for more width and finer css/js control
Changes to DSN for more width and finer css/js control
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
DismissableSiteNotice (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-30 06:35 UTC by Chris
Modified: 2013-04-02 01:22 UTC (History)
2 users (show)

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


Attachments
very small changes that have a large impact on how useful this extension is (1.24 KB, patch)
2009-03-30 06:35 UTC, Chris
Details

Description Chris 2009-03-30 06:35:53 UTC
Created attachment 5977 [details]
very small changes that have a large impact on how useful this extension is

This patch does a few things.

@line 30
When in 'user' mode, the mw:sitenotice->encNotice text is copied into a javascript variable, then used in output.
Yet, when in 'anon' mode, it is not, it is only directly output and never assigned to a javascript accessible variable.
This causes any javascript that may be looking for that variable to fail when the user is logged out.


@line 31
When in 'user' mode, the mw:sitenotice->encNotice is wrapped in a table with the message and dismiss link in separate cells.
Yet, when in 'anon' mode, there is no table, only direct output.
This causes any css that was affecting the user version via the css ID of #mw-dismissable-notice to fail as there is now no table with that ID, or a table at all.
Line 31 corrects this by replicating the table used in the 'user' mode notice.


@line 65:part 1
When in 'user' mode, the sitenotice area is in a table, and the notice is in a table cell with the hard coded width of 80% of its parent (the table having width=100%).
This causes the available area to be significantly more narrow for logged in users then logged out.
My change is to make this cell attempt to take as much width as possible by setting (still doing an ugly hard coded width sadly) a width of 100%


@line 65:part 2
The table cell with the contents of the message does not have a direct reference, and any attempt to apply styling to just that requires an odd CSS syntax (that doesn't even work currently for logged out users because of lack of table at all, see above change)
To correct this, I set a ID attribute of mw-dismissable-notice-content


@line 66: part 1
The more annoying part of the 80/20 values was the 20% space allowed for the one tiny [dismiss] link.
This is a very large amount of space to allocate for a link that is only a few em wide even in the longer languages.
By removing the width=20% attribute, combined with the width=100% set in line65:p1, this cell will take up as little space as possible.


@line 66: part2
As with L65:2, the cell containing the [dismiss] link is also not easily accessible via CSS or JavaScript.
Again I simply add a ID attribute to the cell of mw-dismissable-notice-dismiss to allow CSS or JavaScript to reference it (likely to hide the cell or modify the link's style)
Comment 1 Sumana Harihareswara 2012-05-23 19:57:43 UTC
Chris, I'm sorry for the wait in response!  Thank you for the patch.

If this issue is still something that you'd like to follow up on, take a look at our current codebase and consider updating and submitting your patch directly into our new Git source control system.

https://www.mediawiki.org/wiki/Git/Workflow

You can do this by getting and using "developer access"

https://www.mediawiki.org/wiki/Developer_access

Thanks again, and I apologize for the wait.
Comment 2 Kevin Israel (PleaseStand) 2013-04-02 01:22:59 UTC
DismissableSiteNotice no longer uses tables (see bug 25475), so I'll call this "FIXED". Please reopen this ticket if similar issues still exist.

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


Navigation
Links