Make clicks on theme settings preview select palette fields to edit

Created on 15 June 2010, over 14 years ago
Updated 20 April 2024, 7 months ago

I realize we're waay past the date for feature requests, but this (IMO) is a very simple feature that helps out in UX. This patch adds the capability to add regions clickable regions in the inline preview area, so that a user can directly click on regions to select the palette element to edit.

This is done by adding classes to elements in the preview.html which get scanned by color.js. Patch includes changes to the core preview.html.

Classnames are called hotspot-palette-XXX where XXX is the name of the palette element. You can add the classes to div, p, a or other elements. Event propagation is stopped so that when regions overlap, the "topmost" region is the "winner" (e.g. an anchor within a paragraph).

To test: apply patch, clear caches if necessary. Then go to the theme settings for Garland at admin/appearance/settings/garland. Click on the text and links in the preview, and the proper element will be selected.

For further testing, I'm also including a preview.html for Bartik . (Rename it to preview.html and place it in the color/ folder inside the bartik folder)

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States janusman

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024