Modify

Opened 7 years ago

Closed 7 years ago

#13248 closed enhancement (fixed)

Allow cards of different colours

Reported by: Jeffrey.Ratcliffe@… Owned by: Peter Suter
Priority: normal Component: CardsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

As far as I can see, all cards are currently yellow. When working with many cards, it would be convenient to have cards of different colour to tell them apart more quickly.

Attachments (3)

T13248_colors.diff (7.6 KB) - added by Peter Suter 7 years ago.
Screen Shot 2017-07-30 at 02.02.54.png (17.4 KB) - added by Ryan J Ollos 7 years ago.
T13248_colors_v2.diff (7.8 KB) - added by Peter Suter 7 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by Peter Suter

Attachment: T13248_colors.diff added

comment:1 Changed 7 years ago by Peter Suter

Untested patch.

  • Needs Trac 1.2 for the DB upgrade upgrade_tables().
  • Supports only yellow, red, green, blue. (Defined as CSS classes and using basic HTML named colors in Javascript / edit screen.)
    • What other colors would be desired? Should the user somehow be able to specify custom colors? (Like e.g. in WeekPlanPlugin.)
  • Forgot add default color to migrated pre-existing cards. Should maybe keep yellow as fallback in CSS class trac-card without a color class.

Changed 7 years ago by Ryan J Ollos

comment:2 Changed 7 years ago by Ryan J Ollos

  • The PLUGIN_VERSION value needs to be set to 3 in core.py
  • I haven't been able to get the Color selector to successfully select a value
  • The width of the Color selector should probably be adjusted and blue is used for the currently selected entry, but should probably be transparent (see screen capture where the mouse was positioned over the yellow (first) entry)

comment:3 Changed 7 years ago by Peter Suter

Thanks for testing, all good points.

Changed 7 years ago by Peter Suter

Attachment: T13248_colors_v2.diff added

comment:4 Changed 7 years ago by Peter Suter

Second patch should work better, avoiding the problems mentioned in comment:2 and allows any colors by using the HTML color chooser control.

comment:5 Changed 7 years ago by Peter Suter

(Small typo in second patch, cards.js line 260 should be color: '#ffffe0', // default: yellow (only four f's, not five). This invalidated the initial selected color of new cards.)

comment:6 Changed 7 years ago by Ryan J Ollos

Works well for me.

I looked for a way to close the color picker when the dialog is closed. It might not be possible: SO:34028501.

comment:7 Changed 7 years ago by Peter Suter

In 16721:

CardsPlugin: Allow selecting card colors.
(see #13248)

Also add "Export" buttons.

comment:8 Changed 7 years ago by Peter Suter

Resolution: fixed
Status: newclosed

Thanks again for testing.

Using the HTML color picker has the downside of less control and all sorts of platform differences, but the upside of being very low effort. For now it seems good enough to me, but feel free to suggest improvements.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Peter Suter.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.