online icon indicating copy to clipboard operation
online copied to clipboard

Unify icons between toolbar and sidebar

Open eszkadev opened this issue 3 years ago • 9 comments

This is an Easy Hack. Potential mentors: @eszkadev @pedropintosilva

Detailed description and rationale

We want to unify icons used in toolbar and sidebar. So for the same UNO command / action we will use the same .svg.

Use browser's inspector to look at icons used in the sidebar. They are <img> elements. src attribute of sidebar's button should match background: url(...) for toolbar's icon for the same action. If it doesn't please change css rule for toolbar's element [1]. Toolbar elements have defined special CSS class which defines icon by background property (see [1]).

IMPORTANT: please do not change css class name. if it is .w2ui-icon.deleteformat it should stay .w2ui-icon.deleteformat. Please change only image's URL.

When we changed css rule, old image probably is not needed so we can also remove file from loleaflet/images directory. But first be sure it is not used anywhere by searching in this repository or using git grep.

Code pointers

List of toolbar icons: https://github.com/CollaboraOnline/online/blob/master/loleaflet/src/control/Control.TopToolbar.js#L135 [1] CSS rules for toolbar icons: https://github.com/CollaboraOnline/online/blob/master/loleaflet/css/toolbar.css#L757

eszkadev avatar Oct 12 '21 13:10 eszkadev

I would like to work on this issue if it could be assigned to me - thanks!

bettyspurgeon avatar Oct 15 '21 15:10 bettyspurgeon

Thanks @bettyspurgeon for your interested, assigned ;)

pedropintosilva avatar Oct 15 '21 16:10 pedropintosilva

@bettyspurgeon any luck with this? : )

pedropintosilva avatar Nov 04 '21 10:11 pedropintosilva

@pedropintosilva - I've only just been able to start. I moved recently and had some problems getting my internet back up - thanks for your patience :)

bettyspurgeon avatar Nov 09 '21 08:11 bettyspurgeon

No problem @bettyspurgeon, did you manage to get everything sorted out? Let me know if you still want to work on this :)

pedropintosilva avatar Jan 21 '22 14:01 pedropintosilva

@kcmaxwell is on it : )

pedropintosilva avatar Mar 17 '22 10:03 pedropintosilva

For icons that have a different id than the existing icon we have iconURLAliases so we don't need to duplicate svg: https://github.com/CollaboraOnline/online/commit/142097b3402e0d9aa3221a6e326c6db20137e34a

pedropintosilva avatar Jul 22 '22 13:07 pedropintosilva

@NickWingate is this completed ?

pedropintosilva avatar Jul 22 '22 13:07 pedropintosilva

I just created a more generic one for duplicated icons #5052

pedropintosilva avatar Jul 22 '22 14:07 pedropintosilva

This has been fixed with #5052 and related PRs

pedropintosilva avatar Feb 17 '23 08:02 pedropintosilva