Page MenuHomePhabricator

Briefly change color of section header selected by user in the menu (implement yellow fade effect)
Open, LowPublic

Description

When the article has a lot of sections, it sometimes requires some effort to visually identify the section after it is scrolled to from the menu.

This is particularly true for Wiktionary, where sections are abundant, usually short, and lacking pictures and other visually distinguishing signs.

Suggested behavior:
After the page is scrolled to the section, its header, or the whole section should briefly change color. This will save brain "CPU cycles" that can be used for better things.

This site http://english.stackexchange.com , among others, employs such behavior.

Event Timeline

Yurivict created this task.Aug 21 2015, 7:53 AM
Yurivict raised the priority of this task from to Needs Triage.
Yurivict updated the task description. (Show Details)
Yurivict added a subscriber: Yurivict.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 21 2015, 7:53 AM

I know this isn't too difficult to do with JavaScript. This behavior can be made optional.

Hi @Yurivict. Please associate at least one project with this tasks that you file, otherwise nobody can find this task when searching in the corresponding project(s). Thanks.

Aklapper renamed this task from [Feature suggestion] Header of section selected by user in the menu should briefly change color to show user where it is. to Briefly change color of section header selected by user in the menu (to show user where it is).Aug 21 2015, 1:42 PM
Aklapper set Security to None.

What is the project corresponding to basic Wiki software (php/html/js/etc)? This is what should be assigned here, but I don't find anything like that in the list.

Glaisher added a subscriber: Glaisher.
Glaisher renamed this task from Briefly change color of section header selected by user in the menu (to show user where it is) to Briefly change color of section header selected by user in the menu (implement yellow fade effect).Aug 21 2015, 5:54 PM
Glaisher updated the task description. (Show Details)

Will it be better if a "global gadget" is written for this instead of implementing it in core?

Actually, no JavaScript is needed to achieve this effect, only CSS:

@keyframes highlight {
    from {
        background-color: yellow;
    }
    to {
        background-color: transparent;
    }
}
.mw-headline:target {
    animation-name: highlight;
    animation-duration: 2s;
}

(plus some browser prefixes to support older browsers, too).

Ooh neat. Thanks!

Aklapper triaged this task as Low priority.Aug 22 2015, 2:46 PM
TheDJ added a subscriber: TheDJ.May 8 2017, 9:37 PM

I've been testing this for a while now, and it's really nice. Not a fan of the color scheme, but worth considering in general.

Jdlrobson added subscribers: alexhollender, Jdlrobson.

@alexhollender might be of interest for table of contents