Commit graph

185 commits

Author SHA1 Message Date
Kosta Harlan c7c9033685 Don't show preferences link to temporary users
Bug: T330509
Change-Id: I8e210d916c77e8914be3a06861fa04cf1153d56c
2023-03-30 16:35:13 +00:00
thiemowmde 9c1031c3fa OOUI .addItems() must be called with an array
Some versions of OOUI also accepted single non-array items. But this
was never official. Let's follow the spec.

Change-Id: Ie14431be802a6c71127c1b418e750ce5c9beb863
2023-01-05 16:32:18 +01:00
Fomafix 0bd7114c90 Use shortcut mw.msg( ... ) instead of mw.message( ... ).text()
Change-Id: I3b84e3a19eda44642d5f4993a1e30dda569a4d08
2022-11-05 22:13:42 +00:00
Jon Robson 2e58065ddf Echo should fire onInitialize event after rendering of badge
This allows skins to make modifications to the final output.
This will be used in Vector to make the Echo icon consistent with
other icons.

Bug: T257143
Change-Id: I9fe8c921956ede164d93cb1f42647cf4b80ca976
2022-09-22 08:49:44 -07:00
Bartosz Dziewoński 54c27e5763 Fix notification dynamic actions outside of the dropdown
* Event handler was not registered for the non-dropdown version
* Clicks would be handled by both the action and by the default link

Also remove returning false to prevent default and stop propagation,
this is not supported by OOUI events and did nothing. Handling a
'click' event always returns false to jQuery (so this was not needed),
handling 'choose' event never does (hence my other fix was needed).

Change-Id: Ia8a21749a8edc20f34b2a3e445278ea6922b9109
2022-08-24 00:28:54 +02:00
Jon Robson 0c074ec91a Clicking Echo badge should close ULS dialog
Bug: T295796
Change-Id: I3a7f33cad4e08ce22b6e640901c965d764c9156b
2022-03-04 22:47:23 +00:00
Bartosz Dziewoński 121cbd6ee8 Fix incorrect use of $.extend()
$.extend() with one parameter will merge the given options into the
global `jQuery` object, which was definitely not intended here. Maybe
the `config` variable was supposed to be passed as the second
parameter, but it doesn't look like that would do anything either.

Accessing the global `jQuery` object in that way ended up generating
completely unrelated warnings about deprecated `$.trimByteLength`,
which was reported in the task.

Follow-up to 7658e151d6.

Bug: T256732
Change-Id: I5f92b6725c8abdcfb676e6a09b610ea0dc8c245f
2020-10-03 18:30:30 +00:00
Ed Sanders 5161a2c40e Fix layout of action buttons use display:flex
Bug: T258990
Change-Id: If0ece6e7ff6fef9abfcd4996a9158e86a5ffece0
2020-07-29 14:13:02 +01:00
Ed Sanders eb0603c9af Fix layout of NotificationsInboxWidget on narrow screens
Bug: T258939
Change-Id: I17b968297baf630b71e832f6af0b0b534c9c08b4
2020-07-27 16:11:38 +01:00
Ed Sanders 769d6579f9 Make MenuItemWidgets inherit from ButtonOptionWidgets
This gives them a consistent appearance with the expand/collapse
button. Only requires a small visual tweak to work in the popup
menu.

Bug: T258701
Bug: T258703
Change-Id: Ib3d074d1117e08d11136791354184e2e4b655290
2020-07-23 18:19:32 +01:00
Ed Sanders 3abe6b77bd Make mark as read/unread buttons properly focusable
Bug: T258710
Change-Id: I1ed9d386083d94bf6b5696bb71385169c0ccb807
2020-07-23 15:27:01 +01:00
Ed Sanders 42e2e5efbc Make NotificationItemWidget an <a> tag to fix focus issues
Bug: T258705
Change-Id: Ib44e04dd08e2818eb99ffb0cba73c775256d66d5
2020-07-23 15:27:01 +01:00
Ed Sanders 25e2fb4a8f De-activate toggleExpandButton after clicking
Bug: T258706
Change-Id: I810d7733e1f5f89c521e733713641b28b1ae6237
2020-07-23 15:27:01 +01:00
jenkins-bot 3c62654c2f Merge "NotificationBadgeWidget: Removes role button from footer elements so screen reader announces it as link" 2020-07-13 20:47:55 +00:00
bkudiess-msft dd46c6f665 NotificationBadgeWidget: Removes role button from footer elements so screen reader announces it as link
Bug: T253585
Change-Id: Icb1dfca98d0950e6beda91592c18c877f28214ac
2020-07-02 16:29:40 +00:00
jenkins-bot f87a6a1a19 Merge "Remove unnecessary table markup announcement in notification item widget" 2020-06-30 00:06:40 +00:00
bkudiess-msft 172fb93f14 Remove unnecessary table markup announcement in notification item widget
Bug: T253406
Change-Id: Ibc9d3101b86c4dfb534d37ac2ca42e965fa45ad3
2020-06-23 22:51:12 +00:00
Ed Sanders ffe3363d09 build: Update eslint-config-wikimedia to 0.16.1
Change-Id: I2ce14429f9440e69e36fa349847f58fb32862f2a
2020-06-15 16:19:00 +01:00
Roan Kattouw 7658e151d6 Fix positioning of the secondary actions menu
- Automatically flip the position if there's no room
- Always flip the position in bundled notifications
- Remove menuWidth and related hacks, they didn't work anyway
- Increase maximum label width a bit

Change-Id: I490a925b6265bfbb8bbedae11672fd19d4efba44
2020-06-03 04:41:13 +00:00
Volker E a569321595 Add aria-label to SpecialHelpMenuWidget
Bug: T244543
Change-Id: I04c2c47c5d20cf69f9f0602a2e535c05b01f5f3c
2020-05-18 12:35:43 -07:00
Ed Sanders 04100d4083 SpecialHelpMenuWidget: Use ButtonMenuSelectWidget
Bug: T178387
Change-Id: I521aa3749e1009e5bb028ee1359f732f21226689
2020-05-06 16:21:52 +00:00
jenkins-bot ce186cf03e Merge "Add aria-label to Notifications page “Recent activity” filter widget" 2020-04-03 21:18:37 +00:00
Akinwale Alagbe b49fdb88c3 Add aria-label to Notifications page “Recent activity” filter widget
Adding `aria-label` to the filter widget, with `listbox` role assigned 
to allow screen readers parse read the content.

Bug: T244543
Change-Id: I72a4045abe9a7c391ee3fe471ed944d96259b79e
2020-04-03 20:00:22 +00:00
Akinwale Alagbe f3baccbfb2 Updated notices icon images ARIA role to presentation
Also adding empty `alt` attribute for browsers incapable of 
`presentation` role yet.

Bug: T244814
Change-Id: Ia7b9961aa4210244df0f8e87880b32d9de41a3a9
2020-02-24 20:22:13 +00:00
Ed Sanders 80ddee3956 build: Update linters
Change-Id: I713aafb891306fc21a776a7d4622c6a039798753
2019-12-12 11:20:49 +00:00
Roan Kattouw d95b4bfaac NotificationBadgeWidget: Don't double-convert numbers
We shouldn't run numbers through convertNumber() twice.

Change-Id: If0ab0cad48761eaa1753f65e9d1557d84ec31961
2019-06-25 14:11:26 -07:00
shivanshbindal9 c86a1a5cf3 Remove badgeicon module, use OOUI icon instead.
Now that OOUI's "alerts" icon pack includes all the icons we need, we can use it and get rid of the badgeicons module.

Bug: T139779
Change-Id: I8218530ed2cdd2d81c1fc24509f36ea2b6742bd9
2019-06-05 12:29:17 +05:30
jenkins-bot 22c08547a6 Merge "Add visible help link for Special:Notifications" 2019-04-09 15:32:14 +00:00
Shivanshbindal9 a09db3ea59 Add visible help link for Special:Notifications
Bug: T200184
Change-Id: Iaf321f88322e8a9686be62eb9b055c6544cf0ad6
2019-04-09 10:27:40 -04:00
James D. Forrester 38b41c0f98 build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0
Change-Id: I6747b5e36f64d681b6f83461f0ebb9c9f88bea86
2019-04-03 15:57:20 -07:00
Ed Sanders aee27014e9 SpecialHelpMenuWidget: Remove button handle hack
This leads to broken styling in OOUI 0.30, and is only
a marginal improvement in the Apex theme.

Bug: T215509
Change-Id: Id7d000be7c9dcd50e050f067c6f1fbdc06f332af
2019-02-07 14:41:55 +00:00
Ed Sanders 7ed027ddcf build: Update eslint-config-wikimedia to 0.10.1
Change-Id: I776585adab962c2b1d353d18d3a02b6662941b13
2019-02-06 01:42:53 +00:00
Ed Sanders 17126b2ab1 Remove obsolete aliases from closures
Bug: T208951
Change-Id: If51fc6d50b9755c779fd0bf1be7bb0fe276539ea
2018-11-12 13:56:38 +00:00
Volker E 8423a7ce53 Replace deprecated 'advanced' by renamed to 'settings' icon
Bug: T190581
Change-Id: I63f3252464cd6098e89ff49d0e9881440c6679f8
2018-09-07 19:57:10 -07:00
jenkins-bot c9afa64579 Merge "Always place items outside menu if there's less than two of them" 2018-08-30 21:10:31 +00:00
Zoranzoki21 00dfbd1af7 Fix common typos in code
Bug: T201491
Change-Id: Ibd287f220720c33b82847475fbe88b586557de69
2018-08-25 17:35:13 +00:00
Moriel Schottlender 94f17f7910 Always place items outside menu if there's less than two of them
Bug: T174927
Change-Id: I5a30cf4d5cdc3e7ea9ea7b0536e015de8825f785
2018-06-22 15:31:05 +00:00
jenkins-bot 4bdf8e1e8c Merge "Convert SpecialHelpMenuWidget to a customised DropdownWidget" 2018-05-31 23:52:47 +00:00
Ed Sanders 0f7afb1e5d Convert SpecialHelpMenuWidget to a customised DropdownWidget
Replace the handle with a button widget.

Also remove the unused PendingElement mixin.

Bug: T178387
Change-Id: Iec3afea6c6a8fdb49e17750af7bada42b7ed4b70
2018-05-30 18:57:07 +01:00
Ed Sanders bd2f39ca78 Fix config documentation
Only document config properties used in the current class,
and add missing ones.

Change-Id: I5573f7166fee0409faae7b3af8280aa918fa3dcd
2018-05-30 17:47:20 +00:00
Ed Sanders 9de02857ae Replace .parent with .super
Also remove unused config fallbacks

Change-Id: I10b1ffc0cf69c52c4394f27c02aac5bca2473374
2018-05-22 15:56:46 +01:00
Ed Sanders 3b4be7b6c5 NotificationItemWidgets: Remove property setting duplicated from parents
Change-Id: I03c83d3cfb6ce22ccca0cc2dc1d1e20b36d739c8
2018-05-22 15:54:55 +01:00
Ed Sanders e204977063 Make 'links' a required argument of NotificationBadgeWidget
Change-Id: Ib1ae2cf1edc1d0a280eb62558d93d081f365ca84
2018-05-22 15:42:45 +01:00
Roan Kattouw af323781ab Follow-up 8b84ed2a3: fix eslint failure that snuck in somehow
Change-Id: Iad32afab81d1fc161b2f1e7f04bd8cd89937527e
2018-05-19 14:36:55 +02:00
jenkins-bot 4538925597 Merge "Conditionally rearrange date and button in notif list" 2018-04-13 18:25:38 +00:00
Moriel Schottlender 8b84ed2a3b Conditionally rearrange date and button in notif list
When there isn't enough space for both date and button,
separate them each on its own line.

Bug: T146288
Change-Id: I7ad022da82503f35ae630d171faeed1815c97f7a
2018-03-28 16:19:47 +03:00
Roan Kattouw 1eef6eeee3 Remove footer notice code
But keep the widget files in case we need them again.

Bug: T190481
Change-Id: Iec7dd472cebbee98ea88a0318c017707c7460ae8
2018-03-28 14:57:44 +02:00
Ed Sanders 0fd6d64a29 Fix DOM structure of mw.echo.ui.MenuItemWidget
* Inherit from DecoratedOptionWidget as it comes with
  an icon mixin.
* Keep the DOM structure as similar to its parent as
  possible, to avoid breaking upstream child selectors.
* To this end, replace <a> wrapping hack with override
  of getTagName to set this.$element to <a>.

Change-Id: Ifde70785a1bc996eb09e581b06ed30708323e9f7
2018-03-27 12:33:40 +01:00
Ed Sanders 91076ef7c0 Update OOUI-copied icons
* Rename to match their upstream names.
* For icons without upstream versions, fix canvas to 20x20.
* Use consistent suffices to indicator colour.

Change-Id: Ie6252a8ccbba79143a0f77536c6470b4350be1ad
2018-03-23 09:41:15 -07:00
Ed Sanders 34e3d5feba Replace double-check with checkAll from OOUI
checkAll was specifically designed as a
replacement for double-check.

Change-Id: Ibdd6865213107650b9004ab40e12c6a7453b6251
2018-03-22 21:23:33 +00:00