offsetTop includes the scroll offset, so when using it to
calculate clientTop (position relative to the viewport),
we need to substract that offset.
clientY comes from mouse events and is already relative
to the viewport so needs no adjustment.
Bug: T270215
Change-Id: I545b14059f416678fc0d35413a76334e57bfc495
These are causing trouble because of the forwards-compatibility
logic. When Cite is present, we transparently switch to using that
code base for reference previews which means these tests are running
against the wrong code. Dropping tests here in favor of the Cite
tests.
Bug: T355194
Change-Id: Ide1940ad1e915eee7127f36fb2a7c87b5fb6f88a
This provides backwards compatibility with Cite, if Cite has register
its own preview module for reference tooltips.
Bug: T355194
Change-Id: Iec6f3d4d6c5f765c151ae0dbba258049530e6bc0
As a precursor to moving this code to the Cite extension move it off
of webpack and switch to using require rather than import
Bug: T355194
Change-Id: Ib6486ad38b79a3b67a9744b716b1a2f5d3779795
The findNearestEligibleTarget method is now being called with an
empty array and thus an empty string as a selector
Follow up to
I5f293a134521f086c9f62babb9d06cd9c51d7d47
Bug: T355933
Bug: T356186
Bug: T356193
Change-Id: I3af44ae65d5097fc44744838a4edb07552568b17
Extensions may want to log metrics relating to settings being enabled
or disabled. This is currently the case with reference previews.
This is a follow up to
I1c434f0098ae23bd62256686a658e3d5ef7f70b9
Additional change: Add FIXME clarifying migrateOldPreferences is temporary
and setting a date it can be removed.
Bug: T353798
Change-Id: If9bac123d731e7da7429ba3a0ea92e80263df6a6
It seems to me, that at this point 3rd parties might not have been
loaded that want to add custom preview types. So the list of
selectors is empty.
We still might want to initialze though for 3rd parties that load
later.
Bug: T355933
Change-Id: I5f293a134521f086c9f62babb9d06cd9c51d7d47
Used for tracking baseline stats in the Cite extension.
Also fixed the wireing of the Reference Preview type constant so
that the settings can be tracked. Not sure where this should go
best in the new code.
Bug: T353798
Change-Id: I1c434f0098ae23bd62256686a658e3d5ef7f70b9
More of a random thing done to increase the coverage a bit because
there are upcomming features that seem to be hard to test.
- Found one test case in reference previews that was configured
wrongly
- Adding some sanity checks to the settingsDialogRender test
Change-Id: I95d3c6f30388b2dcc76b018d5dc0f958d06aad91
This is a precursor to moving the code out to the Cite extension.
This can be squashed into parent commit or merged at same time.
I've kept the two patches separate to make them easier to review.
Bug: T326692
Change-Id: I50dbf28a1078df6c73fd0fbf77480488dd82c7b3
* Adds a new webpack entry point for references previews
* Reference related code in src/index.js is moved to new
file resources/ext.popups.referencePreviews/index.js
The changes:
* References previews now in its own module ext.popups.referencePreviews
* Loaded via getCustomPopupTypes
* OWNERS.md files make clear which team owns which part of the code.
Bug: T326692
Change-Id: Iea8a5b9221c0b1fd41e40bff2cbe01e42124d53f