Page MenuHomePhabricator

Improve highlight method for Fragment Previews in Vuejs
Closed, ResolvedPublic

Description

Because fragment previews use "display: unset" or "display: contents", they cannot all be highlighted by changing background color. For previews, we could highlight them by adding a color overlay using the same position and size of the generated fragment.

Event Timeline

DSmit-WMF changed the task status from Open to In Progress.

Change #1240260 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] Add highlight overlay composable to fix display:unset on highlights using background-color. Also style the highlights a bit differently by adding a border and a bit of padding and a bit of animation.

https://gerrit.wikimedia.org/r/1240260

  1. We probably need a bit of work on how we want the style the highlight visually.
Screenshot 2026-03-05 at 16.35.34.png (2,532×1,226 px, 257 KB)
Screenshot 2026-03-05 at 16.35.39.png (2,542×1,196 px, 255 KB)
as a backgroundas a background
  1. But we can also do some kind of visual editor approach and use it as an overlay.

The problem with this is that they use css tokens. SO we should probably find a Codex token way if we want this.

Screenshot 2026-03-05 at 17.38.31.png (1,979×1,150 px, 237 KB)
Screenshot 2026-03-05 at 17.38.34.png (1,972×1,128 px, 237 KB)
as overlay using Visual Editor's colorsas overlay using Visual Editor's colors

Change #1240260 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] AbstractFragment: Replace highlights with an overlay to fix display:unset on highlights using background-color

https://gerrit.wikimedia.org/r/1240260