Skip to content
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

Replaced dynatree with a modified version of bootstrap-treeview #10767

Merged
merged 1 commit into from
Sep 6, 2016

Conversation

skateman
Copy link
Member

@skateman skateman commented Aug 25, 2016

  • Implement necessary functionalities into bootstrap-treeview
  • Create a JSON-to-JSON tree structure converter for seamless integration
  • Remove unnecessary parameters from locals_for_render hashes
  • Convert trees that are not using layouts/shared/tree and TreeBuilder
  • Convert JavaScript onClick, onCheck, onExpand event handlers
  • Remove support for onDblClick and onHover events (see Dynatree features that maybe aren't necessary #10431)
  • Remove unnecessary logic for highlighting nodes with unsaved changes (see Dynatree features that maybe aren't necessary #10431)
  • Remove dynatree from our codebase
  • Convert or remove ldap_ous_tree
  • Refactor the styling of nodes with dynatree-title and cfme-opacity-node CSS classes
  • Remove unnecessary CSS classes
  • Fix word-wrapping for long node texts
  • Fix tooltips
  • Remove cursor pointer from non-clickable nodes
  • Update patternfly to a version where the new bootstrap-treeview is present

These tasks will be done in a separate PR:

@skateman skateman force-pushed the bs-treeview branch 14 times, most recently from ea7719d to dd1df57 Compare August 29, 2016 11:22
@skateman
Copy link
Member Author

@martinpovolny we had a discussion with @ZitaNemeckova about the coordination of this and her work with TreeBuilders. I think the remaining 2 tasks should be solved in a separate PR. Both of them are mass find-and-replace tasks and would cause a lot of merge conflicts in Zita's PRs.

@skateman skateman changed the title [WIP] Replaced dynatree with a modified version of bootstrap-treeview Replaced dynatree with a modified version of bootstrap-treeview Aug 29, 2016
@skateman
Copy link
Member Author

@martinpovolny @h-kataria @epwinchell @himdel ready for review ✨

@martinpovolny
Copy link
Member

So the plan is to merge this while carrying on reviewing and merging @ZitaNemeckova 's TreeBuilder PRs and then do the mass changes in a separate PR.

@@ -463,6 +314,7 @@ function miqOnCheckCUFilters(tree_name, key, checked) {
return true;
}

// TODO: review this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, forgot to remove ;)

@martinpovolny
Copy link
Member

@skateman : this PR in a single commit and having it rebased and then review the review feedback etc..... That illustrates it should not be done this way.

@skateman
Copy link
Member Author

skateman commented Sep 2, 2016

@martinpovolny tests are now green

@dclarizio
Copy link

@skateman Clicking on a VM in the right side list properly opens the tree and selects that node:
tree1

Clicking on the root node shows the proper items on the right, but for some reason, resets the tree to only show the first level nodes below the root:
tree2

@dclarizio
Copy link

@skateman the tree node images are a bit smaller with the new trees, can that be adjusted?

Old:
tree_old

New:
tree_new

@dclarizio
Copy link

@skateman in automate explorer, clicking on a tree node or on the same item in the list on the right fails to expand the tree node to show the child nodes in the tree, tho the right cell is updated properly. May happen elsewhere, but I have only seen it in automate tree:

automatetree

@dclarizio
Copy link

@skateman clicking on nodes in the Optimize / Utilization or Bottlenecks trees, they do not expand unless they had been expanded before. They used to.

Another point to note here is that when first entering the Optimize / Utilization screen, no node was selected. In this branch, the root node is already selected.

Old:
util_old

New:
util1

@dclarizio
Copy link

@skateman on compare screen (screenshot is from Hosts), even tho a subset of a tree node's children are checked, a full check is shown on the parent initially. This corrects itself if child nodes are checked/unchecked:

compare1

@dclarizio
Copy link

@skateman I just noticed this:

To review this PR, you need to do a manual bower update and select the #patternfly version of bootstrap-treeview, updating with bin/update is not enough!

I'm not sure how exactly to select the proper version, would need clearer instructions. Hopefully my above findings are not skewed, but let me know and I can retest.

@skateman
Copy link
Member Author

skateman commented Sep 3, 2016

@dclarizio sorry, I forgot to tell that the new PF is released and now there is no need for the bower update magic.

@skateman the tree node images are a bit smaller with the new trees, can that be adjusted?

The icon size is defined in patternfly by the patternfly guys, so I guess @serenamarie125 or @priley86 can tell if they can be enlarged.

@skateman on compare screen (screenshot is from Hosts), even tho a subset of a tree node's children are checked, a full check is shown on the parent initially. This corrects itself if child nodes are checked/unchecked:

It's a known issue and this PR fixes it.

Clicking on the root node shows the proper items on the right, but for some reason, resets the tree to only show the first level nodes below the root:

This is a bug in bootstrap-treeview, the fix is on the way.

@skateman in automate explorer, clicking on a tree node or on the same item in the list on the right fails to expand the tree node to show the child nodes in the tree, tho the right cell is updated properly. May happen elsewhere, but I have only seen it in automate tree.

This is caused by a lazy-loading bug in bootstrap-treeview, I created a fix for that.

@skateman clicking on nodes in the Optimize / Utilization or Bottlenecks trees, they do not expand unless they had been expanded before. They used to.

The same lazy-loading bug ...

Another point to note here is that when first entering the Optimize / Utilization screen, no node was selected. In this branch, the root node is already selected.

In the current master with a clean session, the root node gets selected as in my branch.

@miq-bot
Copy link
Member

miq-bot commented Sep 4, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@martinpovolny
Copy link
Member

@dclarizio: do you think that this has enough quality so that we ca merge it and then track the remaining issues?

@miq-bot
Copy link
Member

miq-bot commented Sep 6, 2016

Checked commit skateman@973a1dd with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
125 files checked, 20 offenses detected

app/controllers/application_controller/tree_support.rb

app/controllers/miq_policy_controller/miq_actions.rb

app/controllers/ops_controller/rbac_tree.rb

app/controllers/ops_controller/settings/cap_and_u.rb

app/controllers/report_controller/menus.rb

app/helpers/automate_tree_helper.rb

app/presenters/tree_builder.rb

app/presenters/tree_builder_sections.rb

app/presenters/tree_node_builder.rb

spec/models/automate_import_json_serializer_spec.rb

spec/presenters/tree_builder_roles_by_server_spec.rb

  • ❗ - Line 73, Col 17 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.

spec/presenters/tree_builder_servers_by_role_spec.rb

@epwinchell
Copy link
Contributor

@martinpovolny @dclarizio @skateman LGTM Any minor styling tweaks we can address later.

@dclarizio
Copy link

Merging this as most other issues are forthcoming from other PRs (mostly PF).

The icon size is defined in patternfly by the patternfly guys, so I guess @serenamarie125 or @priley86 can tell if they can be enlarged.

Bump ^^^ can either of you let us know if we can alter the tree node icon sizes as they can appear quite small depending on screen pixel density and they were already small prior to switching to these new trees? Thx, Dan

@dclarizio dclarizio merged commit 81626ce into ManageIQ:master Sep 6, 2016
@dclarizio dclarizio added this to the Sprint 46 Ending Sep 12, 2016 milestone Sep 6, 2016
@skateman skateman deleted the bs-treeview branch September 7, 2016 05:25
@skateman
Copy link
Member Author

skateman commented Sep 7, 2016

✨ ✨ 🎉 🎉 🎉 🍷 🍰 🏆

@serenamarie125
Copy link

serenamarie125 commented Sep 7, 2016

Icons look too small @dclarizio, I agree. I'm talking with one of our Visual Designers now ... I'll get back to you soon. Checking with PF as well. It seems like the node expansion icons are incorrect, the font color is incorrect, and I'm still unclear if the icon size is what is being suggested by PatternFly or not ;). Stay tuned @skateman

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.

8 participants