-
Notifications
You must be signed in to change notification settings - Fork 357
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
Unify generic object toolbar selection with the other toolbars. #1323
Unify generic object toolbar selection with the other toolbars. #1323
Conversation
af7d01d
to
6884c4e
Compare
b77d6ad
to
597bfd2
Compare
597bfd2
to
3cdeee3
Compare
Checked commits martinpovolny/manageiq-ui-classic@f41d7b8~...3cdeee3 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/helpers/application_helper/toolbar/generic_object_definition_center.rb
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems fine for this PR. However, I still don't like how the x_history toolbar and the GTL toolbar just kind of magically happen within the ToolbarChooser
. (Or don't happen in the case of GTL)
Is the goal that we specify all toolbars within the controller in a certain order or something like this?:
history_tb :x_history
center_tb :generic_object_definition
view_tb :blank_view
And then if we needed any custom ones, it would be similar?:
custom_tb :my_custom_tb
I think that's similar to what I was originally attempting to do when I made the GenericObjectHelper
, and it seems a lot cleaner to me than having to maintain a huge if/else block in the ToolbarChooser
. If that's the way we want to go going forward, then I'm all for it 👍 .
@@ -667,6 +667,7 @@ def unassigned_configuration_profile_node(nodes) | |||
end | |||
|
|||
NO_GTL_VIEW_BUTTONS = %w(chargeback | |||
generic_object | |||
generic_object_definition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get rid of generic_object_definition
, there is nowhere that currently uses that layout, as far as I could find, and it probably should've been removed back when I originally wrote it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am ok to remove it. I did not find why that value was there and did not dare removing it.
Neither do I but it's not the topic of this PR to resolve that. I prefer to limit the scope of PR.
I don't think that is the solution. I think that the logic behind the display of the view toolbar/toolbars should be elsewhere, it should be part of the layout of the particular page not the controller. I have not yet figured that out. In case of view toolbar for GTL then next step is to couple that closer with the GTL component and to process that on client side w/o server roundtrip. Similar applies to the history toolbars: At this point I am not sure what are the criteria for that toolbar to be displayed. It's surely not (just) the controller. I think we need some UX work to properly understand when that should be displayed and when not. And that is also out of scope here. |
I agree, I was just trying to generate a discussion around what you were thinking about going forward in terms of how to handle these types of things. So, yeah, like I said before, this PR is fine by me 👍 |
Use #621 to unify how toolbars are selected for Generic Objects.
Fixes part of #1238