Commit graph

297 commits

Author SHA1 Message Date
Ed Sanders dcab210581 DesktopArticleTarget: Fix fade-in of toolbar tools
Bug: T310711
Change-Id: Icf76e8d4d743e3b43ab0d250c7a57c4ad4ce53d8
2022-06-17 23:21:32 +02:00
Bartosz Dziewoński 1cfef4232d MobileArticleTarget: Avoid jittering while scrolling
Needed after Ia18f31a299338f94e69f1882e6e477f3a22ae905 in VE core.

Bug: T307849
Depends-On: Ia18f31a299338f94e69f1882e6e477f3a22ae905
Change-Id: I87f3ac0974702ecaf7f5459604371de06f4a5756
2022-05-21 13:43:20 +00:00
Bartosz Dziewoński e84718d2b1 ve.init.mw.MobileArticleTarget: Remove hiding keyboard shortcut hints
Now done in VE core since Ie86217ba5651df8c427464e460ed836903834a3c.

Bug: T308200
Depends-On: Ie86217ba5651df8c427464e460ed836903834a3c
Change-Id: I3f65b0bc100895f7bd2262c3cbb5231fb055758b
2022-05-21 13:24:09 +00:00
Ed Sanders ab3b068671 build: Update stylelint-config-wikimedia to 0.13.0
Change-Id: I94a18ebc57ea04fe6246b63f6c9b5d5d8718dd4d
2022-05-04 22:54:48 +01:00
Ed Sanders 38dfa608f8 Simplify ve-mw/init/styles LESS files
Change-Id: I49e05c9680e1fe7db8e01df627a6d5fa2836aac8
2022-03-15 23:10:34 +00:00
Ed Sanders 627bbc4aaf Rename ve-mw/init/styles to LESS
Change-Id: I50969b8798637368942b2d9315e7290f2c579f77
2022-03-15 22:16:59 +00:00
Ed Sanders 1fdda82b58 Remove Apex skin files
The Apex skin (not to be confused with the Apex OOUI theme)
is abandonware. Keeping files around that pretend to support it
is just maintenance debt.

Change-Id: I176e4e25307ab8ca4166a6e9b55e3bec4f058d05
2022-03-12 14:23:23 +00:00
Ed Sanders 78decedd47 Desktop: Always show loading progress in a toolbar placeholder
Bug: T299907
Change-Id: I0eaeb98719bf7a43e4a87366cfcd204f35b74650
2022-02-14 16:17:48 +00:00
Ed Sanders e9dd51a71b Fix specificity for mw-body-content in VE overlay
Bug: T287733
Change-Id: I7eaef3ef89a23932edd5abdd74703eb3297ee061
2021-11-12 17:55:44 +00:00
Bartosz Dziewoński 9c2c4b82c7 Make .ve-init-mw-target-surface styles not apply to nested non-target surfaces
The class .ve-init-mw-target-surface is used on the same element
as .ve-ui-surface. This element contains surface overlays
.ve-ui-overlay, which can contain other .ve-ui-surface elements
(inside inspectors), which would then erroneously have the target
surface styles applied.

Bug: T284312
Change-Id: I8d20a830dc48f6a098b0f9e9a7c7c1656de0fe56
2021-06-04 20:48:18 +00:00
jenkins-bot d06554c81e Merge "Ensure correct classes are added to surfaces" 2021-05-25 19:33:17 +00:00
Ed Sanders a71dd4f797 Ensure correct classes are added to surfaces
* Create getSurfaceClasses method.
* Pass surfaceClasses to target widgets.

This ensures that the 'content' class is passed to mobile
target widgets, and the 'mw-body-content' class is added
in a less hacky way.

Change-Id: Ibce6d1a1d0fda63cca354761f1b91f808858e95b
2021-05-23 20:04:28 +01:00
Ed Sanders eff7d05ca2 Don't apply min-height hacks to TargetWidget surfaces
Change-Id: Ic8547f4408f667d8e3808b7d1e29737448b7cb8d
2021-04-29 16:00:36 +01:00
James D. Forrester 688edf1d64 build: Use "Grade A" rules for stylelint
Change-Id: I54b16407450960fefd5522a25cb733853d2f9372
2020-12-01 08:35:03 -08:00
Ed Sanders 6a238b784e stylelint: Remove needless disables
Change-Id: I83c778f1b08b96e6a34068f497c7a72f2887ad4c
2020-11-19 23:38:11 +00:00
James D. Forrester 726e63cca7 build: Upgrade stylelint-config-wikimedia from 0.10.1 to 0.10.3
Change-Id: Idca06a9c5f8e3b1fa7be156613380e1ed99973fd
2020-11-19 23:37:03 +00:00
jdlrobson 80415f3b0f Change selector vectorTabs => vector-menu-tabs
the former is no longer present
note: i assume the style is still needed, I have
not tested

Bug: T255718
Change-Id: I4e7851362fc0d64097aeff5ec1535f8fe7480682
2020-10-26 18:17:42 +00:00
Bartosz Dziewoński 3866ad7f77 Update toolbar styles for Vector changes
Depends-On: I52938689fc7d99a710510349aaa573a87864a367
Bug: T251648
Change-Id: Ica07cf1dab2cf522532a08fadec599bd2fcade5c
2020-05-08 16:23:57 +02:00
Bartosz Dziewoński f525f63b03 Remove hack to avoid iOS Safari menu bar area tap stealing
Explanation of what this code was for: T227628#5339392

As noted on that task, our behavior is actually unintuitive and
distracting, and iOS Safari limitations prevent us from doing it
better.

This reverts commit 600e369347.

Bug: T227628
Change-Id: Id1a5eebd06e4218e3e102165c60791999293d273
2020-01-31 21:22:23 +00:00
James D. Forrester 2c77e88d2c doc: Bump copyright year for 2020
Change-Id: I30539877543dc2a57bd1428a00d10ac46d8fc294
2020-01-08 09:13:24 -08:00
Bartosz Dziewoński c8fa50c3b2 Exactly match collapsible logic of jquery.makeCollapsible
Bug: T236247
Change-Id: Iaf8e8515585989fd8ca64ffd33b02399a69278b4
2019-11-13 23:26:08 +00:00
Ed Sanders ffa3742ce1 build: Update linters
Change-Id: I03d1a8e63b730ad98ec07ad5f630ba82698de5be
2019-11-01 16:20:22 +00:00
Ed Sanders c83d129f6a Expand collapsible blocks in editor, like we do with collapsible tables
Bug: T236247
Change-Id: I6389d2fbb4a5a5d58bfb08f38bd4c598e20c7aaa
2019-10-31 03:18:34 +01:00
Ed Sanders 4da31e7c9e Update VE core submodule to master (3075d3f8c)
New changes:
4af3f84f7 Mark surface as "showAsDeactivated" when opening a window
79eb0e4e5 ve.ce.Surface: Guard against focusing a un-initialized surface
4124c275e [BREAKING CHANGE] ve.ui.TargetWidget: Construct a real target inside the widget

Local changes:
* Use new target widget
* Remove calls to deprecated methods
* 'surfaceReady' event was upstreamed

Bug: T236400
Change-Id: I765d657c172d96c3b2e2ae5998083e4926a31f15
2019-10-25 17:16:17 +02:00
jenkins-bot b15eea1cb0 Merge "Fix Vector wikitext surface padding overrides when using custom browser font-size" 2019-10-11 15:23:17 +00:00
Bartosz Dziewoński 3f0f302577 Enforce that some files must not use the ve global
Previously, the ve-mw/init/ directory contained two kinds of files:
those that were used when initializing VE, and those that may be
loaded even if VE is not going to be initialized at all. The latter
kind must not use the `ve` global variable.

After moving those files to ve-mw/preinit/ we can enforce this with
.eslintrc.json in that directory. This would have prevented T228684.

(Technically they merely must not use `ve.init`, and may use `ve`,
but that's harder to enforce. We should instead move the few non-init
methods out of `ve`: now, track, trackSubscribe, trackSubscribeAll).

Also, group some files under ve-mw/init/: targets/ now (only)
contains ve.init.mw.Target and its subclasses, apiresponsecache/
now contains ve.init.mw.ApiResponseCache and its subclasses.

Bug: T228684
Change-Id: I945249a27f6a0fa10a432d5c5dc57bc7e0461fd8
2019-10-10 15:15:40 +00:00
Bartosz Dziewoński 69147ce3bc Fix Vector wikitext surface padding overrides when using custom browser font-size
In order to get the desired padding, the `em` values were pre-multiplied
by the parent font-size, which was assumed to be `0.875em` for normal
surfaces and `(13.3333/16)em` for wikitext surfaces. (That should have
been `(13/16em)`, by the way, but that's a negligible difference.)

Unfortunately, the font-size for wikitext surfaces is actually `13px`.
Unlike `em`, `px` values are not affected by custom browser font-size,
so when one was set, the final padding was all out of whack.

Use `rem` units instead to respect the custom browser font-size,
without getting problems due to the parent element font-size.
We don't need separate rules for .ve-ui-mwWikitextSurface now.

Bug: T222217
Change-Id: Ib7ffbf09d5aa23fddb894aa3b081ec993ddcee2d
2019-09-18 22:24:47 +02:00
Ed Sanders 901f107bd0 Delete mobile toolbar flexbox code, upstreamed to VE core
Depends-On: If973baa556a557c2fe5cb3aed44f937fc9d2b62e
Change-Id: I775fb24bd16572cfb8472f5260a7552b2fbb9930
2019-09-03 17:30:19 +00:00
Bartosz Dziewoński 91f99ce78d ve.init.mw.DesktopArticleTarget.init: Update for Minerva changes again
The good thing is that every time our CSS overrides get less crazy.
See 75ff121b29 for the last time.

Change-Id: I9d81aff6a24ec28850563e00206e21c4a6593d2e
2019-08-30 21:40:40 +00:00
David Lynch 1761b6d6d6 MobileArticleTarget: v1 of toolbar refresh
Bug: T211789
Bug: T230807
Change-Id: Ifd2319039628a8143dc09f6fa35e4a9825d3062c
2019-08-29 15:27:56 +00:00
Ed Sanders 042bfdfd9d Update VE core submodule to master (07687721b)
New changes:
77076f828 LinkAnnotationInspector: add a "label" field on mobile

Local changes:
* Updates for mobile link label editing

Bug: T229431
Change-Id: Ib0489f6f59b228ebc4a20f7a0a515be938a8f6d3
2019-08-23 00:25:51 +02:00
Bartosz Dziewoński e14e24f037 MobileArticleTarget: Tweak styling for editor switcher
The .oo-ui-popupToolGroup-handle styles only need to apply to the
editTools toolbar, where they override OOUI styles so that our
"stretched" toolbar works; they don't need to apply to the pageTools
toolbar, which contains just the editor switcher, and where they make
it look different from the MF wikitext editor toolbar for no reason.

Change-Id: I21315b34be0a7c3938f84ada720ff5754d953879
2019-08-08 19:47:14 +02:00
Ed Sanders bae45b63d2 Use flexbox for mobile toolbar
* Makes edit tools equal width
* Improves horizontal alignment within tools

Change-Id: I01b9668b638c21607b12381efc198edfe02f23da
2019-08-05 12:01:32 +01:00
Bartosz Dziewoński b00190a398 MobileArticleTarget: Compat for OOUI scrolling fix on iOS Safari
Our overlay could be higher than the viewport, allowing the viewport
to scroll again.

Bug: T212159
Change-Id: I1e97d1963b214fc7673c33ae6c14ab7b0b80f31d
2019-07-18 02:11:53 +02:00
jenkins-bot 2699566577 Merge "iOS browser menu bar tap stealing hack for bottom contexts" 2019-06-26 20:38:47 +00:00
jenkins-bot 552c5e3331 Merge "Improve debug bar margins on mobile" 2019-06-22 21:14:23 +00:00
Bartosz Dziewoński 0af3ea84de Prevent text on save/publish button from wrapping on mobile
If the translations of save/publish button messages like
'visualeditor-savedialog-label-publish-short-start' contain spaces
(e.g. in Bengali 'bn'), the button on mobile would wrap over two
or more lines, due to weird styles we have for the mobile toolbar.

Change-Id: Ieb439ae489ab7110b81382ffdcf0d3d3ad2f84ac
2019-06-20 20:29:52 +02:00
Ed Sanders ad87c6c009 Improve debug bar margins on mobile
Change-Id: I6fd8b89dd44d5d8d933822851499264e4d0f4585
2019-06-20 13:15:52 +01:00
Ed Sanders 22f43207fe Apply active external link fix to all skins
Change-Id: Ic66082fca53f803f9ede6c100beb9072b40a0c00
2019-06-18 15:23:10 +01:00
Bartosz Dziewoński 600e369347 iOS browser menu bar tap stealing hack for bottom contexts
Change-Id: I7607bef4253fde894e307bcecaac6bd342864c0c
2019-06-14 23:49:38 +02:00
Ed Sanders df8feb6faf Move mobile context to bottom of page
Hidden behind ve.newMobileContext feature flag.

Bug: T204733
Depends-On: Id276686a0e82c12c457c81eaec9939722c65c7ec
Depends-On: Id5f7ead769dc30c0fbd2a8b8f6f6c4d68dcfabac
Change-Id: Ibd4b699dfe4bb9bcaec6898b6b82357eb287d128
2019-06-14 20:57:22 +00:00
Bartosz Dziewoński b9dfb5debb Fix some bad math in CSS code comments
Change-Id: Iff405ab0defabe0fff8f3b2ad2e86ceae78ef546
2019-05-06 21:53:15 +02:00
Ed Sanders f9330c8564 Replace the save button with a save tool
Now shows correct tooltip for save button (including
the access key).

Bug: T163142
Change-Id: If14a1a5a5829fc215cb79827392173dc05c4bdd7
2019-04-30 19:32:33 +00:00
Bartosz Dziewoński 75ff121b29 ve.init.mw.DesktopArticleTarget.init: Update for Minerva changes
I think mostly the incompatible changes were made in commit
I5a7d73b20617cb3c6d6379084ac4bea23ec3bc74, but I didn't try
to track them down.

Also fix an issue where hrefs in section edit links generated
by this code were wrong.

Bug: T208102
Change-Id: Ibf6564bc0dcb7fcb420739a897b54346a01add02
2019-04-26 20:52:52 +02:00
Ed Sanders d0a3237f1c Give mobile document a min height based on 100vh
Makes the whole page focusable.

Bug: T109508
Change-Id: I93e9269a89281d342551be5de43a2c60c848ef33
2019-04-08 13:32:31 +01:00
Ed Sanders 03240609d5 Fix cursor on #firstHeading
Bug: T214790
Change-Id: I68e3837cf71317a18a885d1dc16ad10523c464a3
2019-03-28 21:02:03 +01:00
Bartosz Dziewoński 500462f4b2 ve.init.mw.MobileArticleTarget: Improve iOS Safari by moving 'padding-top' for toolbar
We need to set 'padding-top' matching the height of the toolbar
somewhere, so that the toolbar doesn't cover the top of the editing
surface. Apparently moving it from the current place (the top-level
wrapper for the MF overlay) to the document node (the node with the
'contenteditable' attribute) allows Safari to properly scroll the
cursor into view when focussing, rather than scrolling it offscreen.

Bug: T219066
Change-Id: Iee1e03bce24c2f149a0aa0f393a37b9db43eaca6
2019-03-27 22:06:14 +01:00
Bartosz Dziewoński edc4fe95f6 Allow page title heading to be selected while editor is active
People enjoy copy-pasting it, or something.

Bug: T214790
Change-Id: I0d133f601d178f1d1f0175a411a9bcd433ba9419
2019-02-21 21:35:58 +00:00
jenkins-bot 8846e65e44 Merge "Support only surfacing part of the document" 2019-02-20 19:06:30 +00:00
Bartosz Dziewoński 1998a02b8e ve.init.mw.ProgressBarWidget: Remove 'filter' property for IE 8 & 9
Per I7c083ff57db2fce9a06688d5801149253af6f6da this was only needed
for IE 8 & 9, which we don't support now.

Change-Id: I6e093b8ea6f8304ff296bb74297a465dd7334e07
2019-02-15 17:45:22 +01:00