Commit graph

264 commits

Author SHA1 Message Date
Kunal Mehta 78dc653c80 Remove dead dismiss code
mw.echo.setUpDismissability was removed in 08fc83b6de, and will
never be called since the class is never set.

Change-Id: I1e13bbabaeb7df21c161d4cf4205a1564e1d81d9
2015-06-07 18:30:49 -07:00
Kunal Mehta 70d95fbad0 Use mw.Api.postWithToken to automatically re-try badtoken errors
Bug: T101664
Change-Id: I93188099e24102b47384c08113e8dbd26dac8df1
2015-06-07 18:11:48 -07:00
Kunal Mehta 7a196ce358 Remove pre-MW 1.22 compatability code
Change-Id: Ia59464f4a9a5589d84e5028cdabb33aa95df4209
2015-06-07 17:34:26 -07:00
Kunal Mehta 0919b01e75 Pass uselang=user to the API instead of figuring it out client side
Change-Id: I09add693567af577c14c646d2b6b943716e0522e
2015-06-07 17:30:00 -07:00
Matthias Mullie d150625ce1 Until seentime is recorded, we should treat notifications as unseen
Since we didn't use to save seen time, it is unreliable at first.
I decided to just show them as read then, since we couldn't know
if they had or hadn't been read.
However, it would make more sense to keep them unread until we first
save the time a notifiation is seen: it is in line with the current
behavior (where the badge just stays red, always)

Also fixed a problem where I meant to .get a value but had .set
instead. It wasn't noticable because that function is currently
only called when things have just been seen, so even though it
was wrong, it produced a good result.

Bug: T94634
Change-Id: I7ee447249527feb3914c76cfffd673bbda062b75
2015-05-06 10:53:45 +02:00
Roan Kattouw 518101e495 Actually pass jscs
Removed exemptions from .jscsrc and fixed the code to make jscs still
pass.

Kept the dangling underscores exemption because leading underscores
are (for now) used as a naming convention for private functions in
this repo.

Change-Id: I18964f8469f52c294276527d92cb6bf9f48c2576
2015-05-04 19:28:01 +00:00
Matthias Mullie da07893647 Display red badge based on time of notifications vs last time panel was opened
I tried to stick as close to the existing code as possible.

Special:Notifications is slightly different from the overlay,
however. I made it add .mw-echo-unread class for consistency,
but that JS doesn't record seen time (it only loads older
entries), not does the CSS fadeout apply there (it marks
everything as read as soon as it's displayed, so different
behavior from overlay)

PS: I'm not sure about browser compat for the fadeout. But
even if some obscure browsers don't support this, meh. It's
not an "important" feature that can't be missed.

Bug: T94634
Change-Id: Ibb201823fb52ef8a3d5eaa39b0b724ede8d271d1
2015-05-01 11:39:45 -07:00
Matthew Flaschen 0dbf078f8d Make sure eventId is int for client-side events.
Bug: T95169
Change-Id: Ic15b963a3656f8886532d1b990befe327159d56e
2015-04-15 00:18:38 -04:00
Tina Johnson 0e810f0510 Make links in Echo's notification footer blue on hover
Links on the notification footer, "View edit" / "View changes", needs
to be blue instead of grey to be consistent with the Mediawiki interface.
The link turns blue upon hovering, just the way it is currently set
for other links on notifications like the page title.

Bug: T57367
Change-Id: Ibaaff52b9d4bdfc5beca442e10734dd5cf8886d7
2015-03-14 00:41:11 +05:30
Matthew Flaschen b930dfaf47 Use mw-ui-anchor class
This is now required to actually pick up the MW UI progressive
color, so there's a slight visual change (wrong blue => right blue).

Fixes T72818

Bug: T72818
Change-Id: I719eb20a3940904ab45f8376280e20432a3b2d80
2015-03-02 20:16:31 -05:00
jenkins-bot bf0378e57a Merge "Fixed CPB flyout notification count" 2015-02-18 04:33:41 +00:00
Divya 562168b261 Fixed CPB flyout notification count
Added ext.echo.updateNotificationCount to notify other extensions
about updates to the notification count.

Bug: T67178
Change-Id: I7f4e34f2c1808b249db010018dd1b49a8dde246a
2015-02-18 04:31:34 +00:00
bearND e359b304db Make current Echo overlay tab dark gray and bold
mw-ui-quiet gets dark gray and bold.
This way it is easier to see which is the current tab.

Bug: T71929
Change-Id: Ie7e21cd71a385d216402d393344cf76d3ed45d23
2015-02-02 15:22:59 -07:00
Amir E. Aharoni 91847e96c6 Fix the overlay chevron position for RTL
Bug: T78330
Change-Id: Ie438042bc24b8ace429eec68c8b75c09da56aa95
2015-01-09 17:50:51 +00:00
Amir E. Aharoni 94cb6103c2 Cleanup whitespace in modules/overlay/ext.echo.overlay.less
According to
https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#LESS

Change-Id: I361909fcea67fa5e0e3cbb69711ede91417c4e2e
2015-01-09 19:50:08 +02:00
Timo Tijhof 4fdae24555 overlay: Remove needless specifity in .mw-echo-grey-link selector
Binding it to the element name should rarely be needed as it only
adds complexity with no clear benefit.

Nesting classes should also rarely be necessary as it basically
requires the code will never be embedded in or itself embed something
from another component (otherwise you'd clash with that other component's
class name, and if you don't clash, then it wasn't neccecary to
nest the class in the first place).

If the class is overlay-specfic it should be renamed to something
like '.mw-echo-overlay-grey-link'. Keeping it as-is and applying
directly though, as it doesn't appear overlay-specific.

Change-Id: Ied601058c8e501914113d542f88542c83157d5a0
2015-01-06 22:04:12 +00:00
Roan Kattouw e3c4ddc1ae Don't make the notifications list 5px taller than the screen
The max-height of the notifications list was hardcoded to
the height of the window minus 134 pixels. I don't know
where this value came from, but it doesn't seem to take
borders into account. The correct value appears to be
139 in Chrome and 140 in Firefox, so I changed it to 140.

Also, this really really should not be a hardcoded value.
This 140 value can be measured in JavaScript; that's how I
derived it. Even better, oojs-ui has a mixin called
OO.ui.ClippableElement that automatically does this for you
AND automatically adjusts the height when the window is resized
as well.

Change-Id: I17bc2c5333e5c3d5dd720e6bccf8cbbdbb4abe6c
2014-09-23 15:00:21 -07:00
grunny 3093c7a69f Remove use of deprecated "hover" pseudo-event
The "hover" pseudo-event was deprecated in jQuery 1.8 and removed in
1.9. This is logged as "JQMIGRATE: 'hover' pseudo-event is deprecated,
use 'mouseenter mouseleave'". This fix switches to using the .hover()
method which appears to be the original intent as two functions have
been used which .hover() supports, whereas .on() only accepts one
handler. Now the class change works as expected.

Change-Id: Ib28801293b72f8f344455b5f308876d185abc8bd
2014-09-19 03:02:43 +10:00
Erik Bernhardson 8ee843fab5 Hygiene: Dont quote object property keys
Change-Id: I93d669a26f85b4eb5c5e0e06e314b89894f12385
2014-09-12 16:00:07 -07:00
jdlrobson 4ff74ddd50 Hygiene: Alter how initialisation of the overlay works
Restructure code so MobileFrontend can make use of it
Kill ext.echo.desktop

Change-Id: I984373ba54206d447c54a435dbf60e8f6e814be1
2014-09-12 22:49:51 +00:00
Shahyar c0446f683f Set text colors in overlay to mwui light gray, and increase title font size
Change-Id: I24f796df1abee02557db2f4817ad70c227dd8d8f
2014-09-11 19:13:44 -04:00
jenkins-bot 9e925cf021 Merge "Switch the order of Alerts and Messages tabs" 2014-09-10 22:00:17 +00:00
jenkins-bot 34290fb80a Merge "Localize numbers of alerts and messages" 2014-09-10 16:08:45 +00:00
Matthias Mullie adfb235de0 Switch the order of Alerts and Messages tabs
Change-Id: I864d45336c23331543ff6aaea8ec6512d4fba0c3
2014-09-10 15:31:09 +00:00
jenkins-bot 4156e030c8 Merge "Remove (X) next to Alerts/Messages if there is one section" 2014-09-09 23:28:35 +00:00
jdlrobson 2cacf82efa Restore QUnit tests to reflect alert as default tab
This reverts the tests and amends them after the
application of commit 5da9eac08a.

Luckily nothing appears to be broken.

Change-Id: I67acfe5dc74ef750d5443dd619dbb114623ee233
2014-09-09 13:23:37 -07:00
bsitu 75d5c9b9a3 Remove (X) next to Alerts/Messages if there is one section
Change-Id: Ibf66328e31bfefb3d588196c3f4babfa65bb52f3
Eg: Alerts(X) becomes Alerts
2014-09-09 11:12:38 -07:00
Matthias Mullie b090b749de Messages/Alerts text is tiny in Monobook
Just like all other text elements in the overlay: set the font-size to 13px
Not sure why this was em & rest px. 13px is equivalent to the current 0.8em in
Vector.

Change-Id: I29d67f21cc2af7209469299ab228ebe7dac98af7
2014-09-09 18:01:36 +02:00
bsitu 9c55aa0fc8 Colors are backwards for flyout section link
Also make active section link not clickable

Change-Id: I7f391929382489e8bad5ab56fea9f2ef7b2978b0
2014-09-09 16:31:23 +02:00
jenkins-bot 4aa508b6a8 Merge "Default to alerts tab" 2014-09-08 21:42:29 +00:00
Erik Bernhardson 5da9eac08a Default to alerts tab
The only exception is when there are new message notifications but no new
alert notifications.

Bug: 70461
Change-Id: I06daa3f7d526beeb878eb343c169e01acd49e71f
2014-09-08 13:18:51 -07:00
Amir E. Aharoni ce6b730e74 Localize numbers of alerts and messages
Change-Id: Ifc502afaed3fc04e7addb5383e3ed0c3c4efe439
2014-09-08 16:14:19 +03:00
bsitu d9f697414f mw.echo.overlay.updateCount() no longer exists
If you have an unread notifications not in the initial
load of special page, clicking load more would throw
an error

Bug: 69714
Change-Id: I9af588780b2ab8481ba252ddc21bad0601de7a0b
2014-09-05 21:37:12 +00:00
Erik Bernhardson f5985169cc Allow .mw-echo-title-heading outside special page
This class was only being applied to notification output
on special pages and not in the overlay, move it so it can.

Additionally:
* bolds .mw-echo-title-heading same as the anchors it works with
* clean up a repeated rule against `.mw-echo-title a`

Change-Id: I579252399b39746f5aa2cfc51b5cd3b9b8b2cdb0
2014-09-04 18:59:30 -07:00
jenkins-bot abb7655297 Merge "Add support to retrieve unread + read notifcations for section" 2014-08-20 17:37:51 +00:00
bsitu 8e2de3f02b Add support to retrieve unread + read notifcations for section
Change-Id: Ife3750400315f545f5f3e54ac9847f56c2efe9be
2014-08-19 16:54:48 -07:00
jenkins-bot 715ad180a2 Merge "Hygiene: Mega clean up the Echo footer code" 2014-08-19 20:25:04 +00:00
jenkins-bot 8d5421c9cb Merge "Fix line height/size of notifications" 2014-08-19 18:55:10 +00:00
jdlrobson 75cda20a31 Hygiene: Remove unused directory
Let's not use old unused things lying around... it just confuses
people.

Change-Id: I30cecb58fbdce0129e0385be3680ca4a2c6c36f8
2014-08-18 21:11:19 +00:00
jenkins-bot a3449bfb67 Merge "Hygiene: Stop using id for footer" 2014-08-18 17:27:00 +00:00
jdlrobson 088ba0a152 Hygiene: Mega clean up the Echo footer code
Lots of duplicate unused css. This simplifies it drastically.

Change-Id: Idfcca27840410f0287e30478e7978255234127d0
2014-08-18 17:26:40 +00:00
jdlrobson dc45eb246f Fix line height/size of notifications
Previously too cramped and not in relative font.

Change-Id: Idfc2d24a4896883630aee7c105cf67c8a8005a57
2014-08-15 14:02:17 -07:00
jdlrobson 965a8b8a2f Hygiene: Stop using id for footer
No need. Class works perfectly fine here.

Change-Id: I8188e759ad3eed971d5847b23d49b333d80b509f
2014-08-15 17:43:56 +00:00
S Page af2abe84a5 "put a comment nearby with the resulting keys"
Per https://www.mediawiki.org/wiki/I18n#Using_messages
Comment-only change.

Change-Id: I468a79bee19fc5486b564b1a0ec7eb66c9dfa852
2014-08-14 19:01:45 -07:00
jdlrobson 178ec1b816 Fix size of 'mark all as read' button
Change-Id: I2b760e70e60f001824b66e3652dafefaf7f6a32f
2014-08-14 15:10:32 -07:00
jdlrobson 1c6f5906d0 Hygiene: Kill dead code
Not serving any purpose...

Change-Id: I151e80a79bcaba3d9037fc9f21533a4e9161f60f
2014-08-14 14:29:40 -07:00
jdlrobson 8b381e2081 Hygiene: clean up messy less file
Change-Id: I8c76e92b8a4d79cd26ac7ed54c20bdae54e0b5bd
2014-08-14 14:18:42 -07:00
jdlrobson 5ff3189146 Prevent horizontal scroll bars in Firefox
Use inline block and width to force truncation of the flow topics

Bug: 69563
Change-Id: I62fc95a58dbdf0f21e36e67e1941e4e35585e2d2
2014-08-14 13:21:49 -07:00
jenkins-bot 4b472dd9f2 Merge "E2f: mark all as read behaviour" into two_tabs 2014-08-14 18:48:42 +00:00
jdlrobson 92ee69b92d E2f: mark all as read behaviour
Also adds browser tests for the behaviour of the mark all as read button
to ensure it only clears message notifications.

Dependency:  Ifb7b1b7b7feb4a5af65c79bb16b91a5a9c70166c
Change-Id: I46e1de229e32d705e67cebde678ecea3f3633906
2014-08-13 17:08:16 -07:00