Commit graph

11 commits

Author SHA1 Message Date
jenkins-bot 3591e4f14d Merge "Allow the ref re-use sub-menu options to wrap" 2024-10-04 11:50:23 +00:00
WMDE-Fisch bcd76a24c4 Allow the ref re-use sub-menu options to wrap
We discovered that the label can be really long depending on the
language. On mobile, where the screen is quite narrow it seems
more useful to let it wrap.

In this context it's even more relevant, because the options you
can choose from might only differ in the last parts of the message.

Bug: T375053
Change-Id: I9ec111ab1b80843f993d605ff11a1702c3d7b37c
2024-10-04 11:11:22 +02:00
WMDE-Fisch c517172ecb Position the re-use sub-menu under its button
When the reference to re-use has a lot of content the button element
of the sub-menu expands over the whole height of the result widget.

The expanded sub-menu will always be positioned at the end of the
button element, that's why it was always added to the end of the
result widget and not the visible button.

Makeing sure that the element of the button is not larger than the
visible outlines fixes that problem.

Bug: T375053
Change-Id: I3c16aeae37c3774808544b03c7e6e52762e6d145
2024-10-04 10:05:18 +02:00
WMDE-Fisch 14d87b1e04 Add a submenu to offer a re-use with different details
Adding a submenu to the results of the reference re-use search.
This allows the user to either create a direct reuse or a reuse with
different details.

Hide the menu when there's a sub-reference.

Known Issues:
- Ref name is hidden (conditionally when our feature is enabled) as a
  quick fix to not having a good layout choice yet.
- Submenu is clipped at the dialog bounds.
- Submenu highlight should vanish when the submenu is closed
- Instrument action with metrics.

Bug: T375053
Change-Id: I3eddd6bad328aaf9bb99eb2783ba66d4e08f862d
2024-10-01 13:26:52 +02:00
WMDE-Fisch 73917d493b [refactor] Move result items rendering to ReferenceResultWidget
The exact rendering of each item should be part of the widget.
This also allows a better application of the sub-ref indent.

Bug: T375841
Change-Id: Ic2c24f40d59f41b316c6d6f362726c1ee68f2102
2024-09-29 20:06:02 +02:00
thiemowmde a3a6091534 Fix and update styling in reference re-use dialog
This makes the dialog's behavior much more robust, especially when
confronted with overly long and complex references.
* Limit the height of list items to avoid the situation where a
  single item overflows the dialog. This makes it especially hard
  to navigate with the cursor keys. We can't see any more what's
  going on. The proposed height is intentionally a very high upper
  bound, equivalent to about 2/3 of the dialog's height.
* Limit the name on the right side to take up less than half of an
  item. The left side is for the content. Usually the names are very
  short anyway. But if a name is long it currently creates a mess
  where the name is intertwined with the content.
* Break overly long words in references.
* Changing the opacity to use upstream values makes the dimmed names
  a bit darker. I think this is good, even necessary for legibility.

Technical changes:
* Use LESS variables from upstream, where possible.
* Remove redundant `relative` already set upstream.

Bug: T372385
Change-Id: Ie59b7b7e4aa7eadc8f82b39884313f5aa8cfd950
2024-08-27 07:07:06 +00:00
thiemowmde 55ef3dee9e Fix missing cursor focus visualization in reference search
This is really just a bug. The reuse tab in the reference dialog
always supported keyboard actions (cursor up and down). It was just
impossible to see it because the OOUI base widget we use here doesn't
come with a default styling for this. I suspect this got lost with
some OOUI update years ago. Let's just fix it.

The colors are what OOUI dictates for this situation.

Bug: T360034
Change-Id: I6cfd423830bc0cc86b1aff5dc08a53c49b6e2d9f
2024-07-19 17:54:15 +02:00
thiemowmde aa6a5c3bf2 Start using design tokens in .less files relevant for VE
Note this actually changes the "subtle" color to be darker. As far
as I understand this is an intentional decision. The old color token
from OOUI is deprecated and intentionally made darker in Codex.
See Ie667c35 and most notably T313502.

Change-Id: I37ad25aa6821d61fe3321e1390d1ccf987075250
2024-07-19 17:45:17 +02:00
thiemowmde bc7f1a7005 Replace "shield" hack in MWReferenceResultWidget with CSS
Same as in I7e82e03. The extra "shield" element was added in
2013 (!), see Ib244ff6. Back then we couldn't use the CSS property.
But nowadays we can.

Bug: T360034
Bug: T367030
Change-Id: Ib41e062491e65eabc8a52facefe283ba04ce16ff
2024-06-18 12:06:37 +00:00
thiemowmde 16711d681b Group and nest stylesheets now they are .less files
Change-Id: Iedd9748cf9f38847ef4553459d533a67a0950645
2024-01-21 15:59:20 +01:00
Ed Sanders ca9ef93409 ve-cite: Convert .css files to .less
Change-Id: If831c23721cc2c3ec3cc17d4cd9c9533a0aa4cb4
2023-03-27 15:01:45 +01:00
Renamed from modules/ve-cite/ve.ui.MWReferenceResultWidget.css (Browse further)