Last modified: 2013-04-02 01:22:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 18249 - Changes to DSN for more width and finer css/js control
Changes to DSN for more width and finer css/js control
Product: MediaWiki extensions
Classification: Unclassified
DismissableSiteNotice (Other open bugs)
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
  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: ---

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

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.

You can do this by getting and using "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.