After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 714921 - Supported ordered and unordered lists in composer
Supported ordered and unordered lists in composer
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: composer
master
Other All
: High normal
: 0.13.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-06 07:44 UTC by Jim Nelson
Modified: 2017-12-12 13:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of Apple Mail's composer list drop-down (54.34 KB, image/png)
2012-10-08 18:40 UTC, Eric Gregory
  Details
Patch to add lists support in composer (12.79 KB, patch)
2017-12-07 03:54 UTC, Nikolas Tapia
needs-work Details | Review
Custom icons and button hidding (17.86 KB, patch)
2017-12-07 21:56 UTC, Nikolas Tapia
none Details | Review

Description Charles Lindsay 2013-11-21 23:13:04 UTC


---- Reported by jim@yorba.org 2012-10-06 12:44:00 -0700 ----

Original Redmine bug id: 5966
Original URL: http://redmine.yorba.org/issues/5966
Searchable id: yorba-bug-5966
Original author: Jim Nelson
Original description:

They might be available via a hotkey, but Geary should offer them in the
toolbar as well.



---- Additional Comments From geary-maint@gnome.bugs 2013-08-12 18:08:00 -0700 ----

### History

####

#1

Updated by Eric Gregory about 1 year ago

Apple Mail has one button with a drop-down for both unordered and ordered
lists, as well a way to switch between the two. Maybe we could do something
like that?

####

#2

Updated by Jim Nelson about 1 year ago

I'd be fine with something like that. I'd like to see what it looks like.

####

#3

Updated by Eric Gregory about 1 year ago

  * **File** apple mail screenshot.png added

####

#4

Updated by Jim Nelson 10 months ago

  * **Tracker** changed from _Bug_ to _Feature_

####

#5

Updated by Jim Nelson 9 months ago

  * **Target version** changed from _0.3.0_ to _0.4.0_

####

#6

Updated by Jim Nelson 7 months ago

  * **Target version** changed from _0.4.0_ to _0.5.0_

####

#7

Updated by Jim Nelson 4 months ago

  * **Target version** changed from _0.5.0_ to _0.4.0_

There's been a request that we attempt to get this in for 0.4.

####

#8

Updated by Jim Nelson 3 months ago

  * **Target version** changed from _0.4.0_ to _0.5.0_



--- Bug imported by chaz@yorba.org 2013-11-21 23:13 UTC  ---

This bug was previously known as _bug_ 5966 at http://redmine.yorba.org/show_bug.cgi?id=5966
Imported an attachment (id=261189)

Unknown milestone "unknown in product geary. 
   Setting to default milestone for this product, "---".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
Resolution set on an open status.
   Dropping resolution 

Comment 1 Wesley Moore 2017-02-02 23:16:21 UTC
FYI I have added a $50 bounty to this bug: https://www.bountysource.com/issues/1352353-supported-ordered-and-unordered-lists-in-composer
Comment 2 Michael Gratton 2017-02-02 23:44:25 UTC
(In reply to Wesley Moore from comment #1)
> FYI I have added a $50 bounty to this bug:
> https://www.bountysource.com/issues/1352353-supported-ordered-and-unordered-
> lists-in-composer

Thanks! It might be worthwhile advertising this on Geary's mailing list to let people know about it.
Comment 3 Nikolas Tapia 2017-12-07 03:53:47 UTC
Hi, I would like to propose a patch to add this functionality.
I made a PR on GitHub (https://github.com/GNOME/geary/pull/19) but I was told to submit a patch here.
Comment 4 Nikolas Tapia 2017-12-07 03:54:55 UTC
Created attachment 365176 [details] [review]
Patch to add lists support in composer

Proposed changes to the composer to support (un)ordered lists buttons.
Comment 5 Michael Gratton 2017-12-07 12:40:18 UTC
Review of attachment 365176 [details] [review]:

Hi Nikolas, thanks for the patch, this is a good start!

I was hoping GTK+ would ship two named symbolic icons we could use for these, but it doesn't seem to. If you take a look at COPYING.icons there are links to where some of Geary's other custom icons came from, there might be some appropriate ones there? Otherwise it might possible to to use view-list-symbolic.svg from the adwaita-icon-theme source as a basis for two custom icons, but we'd need to check the licensing is compatible.

In any case whichever icons are used would need to get added to icons/CMakeLists.txt to make sure they are installed.

Aside from that, the only other thing that would need to be addressed is to either a) ensure the buttons are hidden when the composer is not in rich text mode (see for example how the `insert_buttons` group is handled in composer-widget.vala), or b) actually add support for them in plain text mode and make sure they are enabled — i.e. use a "* " as a prefix for unorded lists and "1.", "2." as prefixes for ordered lists, a'la Markdown. This would be preferable but the code to do it (see ComposerPageState.htmlToQuotedText() in ui/composer-web-view.js) is a bit convoluted.

I'm pretty happy to not have keyboard shortcuts for these at the moment.
Comment 6 Nikolas Tapia 2017-12-07 21:56:44 UTC
Created attachment 365213 [details] [review]
Custom icons and button hidding

Hi again.

I added code to hide the buttons when in plain-text mode. Also I tried to come up with some custom icons which I created with Inkscape using as a base the icon from Adwaita as you suggested. Strangely the one for the unordered list displays fine but in the ordered one the numbers are the wrong color. I suspect this has something to do with the SVG properties but I wouldn't know how to fix that. Anyway I include then in the patch for you to look at.

I will try to look at the code for the conversion of lists to plain-text in the next few days.
Comment 7 Michael Gratton 2017-12-12 13:05:44 UTC
Hi Nicolas, much better! I had a poke around at the OL icon since I remembered something similar happening in the past, but couldn't remember what it was. Turns out the numbers had to be converted to a path to be properly rendered. I took the opportunity to also increase the size of the numbers a bit so they could be seen a bit more easily. If you want to work on the icons some more, please feel free to do so.

I've committed these patches (along with RTL versions of the icons and a tweak of the button ordering) to master as commit 272417b.

We already have a bug covering conversion of lists to plain text (actually to Markdown-formatted text) in Bug 739464. If you are interested in looking into it still, have a look at that bug see and what you think.

Thanks for the contribution here!