Skip to content

Conversation

@skateman
Copy link
Member

@skateman skateman commented Jul 13, 2017

This introduces initial support for having custom fonticons with custom colors for custom buttons and button sets. For now there is just an input field for the fonticon class and for the CSS color, but the new fonticon picker will come soon and I would like to have something similar for the colors.

screenshot from 2017-07-13 16-10-04
screenshot from 2017-07-13 16-11-07
screenshot from 2017-07-14 15-12-21

The <input type="color"> isn't fully supported by IE and it falls back to a regular text input:
screenshot from 2017-07-14 15-08-57

There is a migration required to make this green: ManageIQ/manageiq-schema#39
Displaying the colorized icons in the toolbar requires this to be merged: ManageIQ/ui-components#85

There is an issue when editing a custom button that is irrelevant to this PR: #1683

Pivotal story: https://www.pivotaltracker.com/n/projects/1613907

@skateman
Copy link
Member Author

Unfortunately the <input type="color"> doesn't have support for an empty value and it defaults to #000000. A possible workaround is to change this default to #4d5258 and ignore it (or not, it's not really important) in the controller when the button is being saved. This could be problematic if the default PF colour changes in a newer release. @himdel @karelhala @epwinchell any ideas?

@himdel
Copy link
Contributor

himdel commented Jul 14, 2017

Well, fuchsia #ff00ff used to be the default transparent color in Win 95, so maybe we can reuse that :D. But that's probably not an option.

But I mean, the course is clear, not all the browsers support input color, so you need to find/write a colorpicker component :). And since you're doing that anyway, it should be trivial to support a null value :).

@skateman
Copy link
Member Author

There is this one, but I'm not sure if it supports a nil value.

@epwinchell
Copy link
Contributor

@skateman I think #4d5258 will be fine. Although #ff00ff is tempting.

@epwinchell
Copy link
Contributor

@skateman Tested. Looks good.

@skateman skateman force-pushed the custom-button-fonticons-colors branch 2 times, most recently from 4b5f175 to ccedb2e Compare July 16, 2017 11:23
@miq-bot
Copy link
Member

miq-bot commented Jul 17, 2017

This pull request is not mergeable. Please rebase and repush.

@dclarizio
Copy link

@skateman can any of the cc issues be fixed?

@skateman
Copy link
Member Author

@dclarizio not really, all of them were previously there and don't really want to do refactoring in a feature PR.

@Fryguy
Copy link
Member

Fryguy commented Jul 26, 2017

@dclarizio I merged ManageIQ/manageiq-schema#39, so this should probably be merged next

@skateman
Copy link
Member Author

@miq-bot remove_label pending core

@miq-bot
Copy link
Member

miq-bot commented Jul 28, 2017

This pull request is not mergeable. Please rebase and repush.

@skateman skateman force-pushed the custom-button-fonticons-colors branch from 147e20f to e95b725 Compare July 31, 2017 08:02
@miq-bot
Copy link
Member

miq-bot commented Jul 31, 2017

Checked commit skateman@e95b725 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
14 files checked, 2 offenses detected

app/views/shared/buttons/_ab_list.html.haml

  • ⚠️ - Line 52 - Avoid more than 3 levels of block nesting.

app/views/shared/buttons/_ab_show.html.haml

  • ⚠️ - Line 27 - Line is too long. [172/160]

@martinpovolny martinpovolny merged commit 371d406 into ManageIQ:master Jul 31, 2017
@martinpovolny martinpovolny added this to the Sprint 66 Ending Aug 7, 2017 milestone Jul 31, 2017
@skateman skateman deleted the custom-button-fonticons-colors branch July 31, 2017 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants