-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quadicon definition needs refactoring #3036
Comments
ping @skateman @himdel @martinpovolny any suggestion about this? I guess decorator would be nice (am I correct), but let's discuss the format and what should be returned from such function. |
@karelhala decorator sounds nice, we already have a def quadicon(_n = nil)
{
:topLeft => {:fonticon => fonticon},
:topRight => {:text => servers.count,
:bottomleft => {:tooltip => power_state, :fileicon => ...},
:bottomRight => {:text => templates.count}
}
end The values on the right side can be both methods on the record that's being decorated or methods of the decorator. For compatibility I would like to reserve at least one argument to set the size of the quad (1 or 4) but for now don't use that. What do you think @himdel && @martinpovolny? |
bottomLeft ;) Otherwise agreed :). (The code calling this should probably make sure that either only And we should probably document all the possibilities (I'm thinking |
|
And more readable 👍 |
@karelhala this can be closed |
Missing quadicon definition
When new provider has quadicon visible, there is no place to define qhich square should have which value and new if/case has to be added to let's say quadicon_helper.rb#L555
. This is not good aproach since there is no way to move this to JSON and ask for such things over API, not talking about new providers making code less readable.
Related UI part
The text was updated successfully, but these errors were encountered: