HUE-8162 [core] Add delete operation to the right document assist

Review Request #12756 — Created April 3, 2018 and submitted

roohi
hue
HUE-7774-Autocomplete
HUE-8162
hue
enricoberti, jgauthier, johan, ranade, romain, weixia, yingc
commit c0b3e14a27104154437ffe8b48e90593f68ba55f
Author: Roohi <roohisyeda@cloudera.com>
Date:   Tue Apr 3 00:35:16 2018 -0700

    HUE-8162 Add delete operation to the right document assist

:100644 100644 0dc3bc78c3... 419497621f... M	desktop/core/src/desktop/static/desktop/js/document/hueFileEntry.js
:100644 100644 0629a85d6d... d877af9c75... M	desktop/core/src/desktop/templates/assist.mako
:100644 100644 5656fe58b0... fa622fb490... M	desktop/core/src/desktop/templates/document_browser.mako

Manually on chrome

  • 0
  • 0
  • 6
  • 0
  • 6
Description From Last Updated
roohi
  1. 
      
    1. Johan, can you please help me fix these issues?

  2. For some reason, selectedEntries is not computed until I click the context menu for the second time. So the modal is coming up only the second time.

    1. You might need to defer the check or call notifySubscribers() on the dependencies of the computed.

  3. This never gets called. why?

    1. On the click binding or the context popover one? You'd have to implement support for beforeOpen in the templateContextMenu binding for this to work.

  4. Can I reuse this modal in both home and right assist? I was able to move it to hue.mako and then use publish, and work well until I navigate to home. But have issues with ko bindings being different, even after using cleanNode and rebinding.

    1. You should be able to use it in both places. An option is to append the modal to the dom and bind just before open. See around line 1287 in ko_context_popover.mako.

    2. Thanks so much Johan. I have resolved all the issues now.

  5. 
      
roohi
romain
  1. Johan to confirm but great stuff despite the difficulty.

    Nit: jira title

    Add delete operation to the right document assist --> [core] Add delete operation to the right document assist

  2. nit:
    binddeletemodal --> bind.deletemodal

  3. 
      
johan
  1. 
      
  2. desktop/core/src/desktop/templates/hue.mako (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Put this and the components.register above inside a dedicated ko_delete_doc_modal.mako. As example see: ko_nav_tags.mako and render in ko_components.mako.

    Also put the huePubSub.subscribe in the new mako, and limit to just one.

    I.e. huePubSub.subscribe('doc.show.delete.modal', function (docViewModel) {
    ...
    ko.applyBindings(docViewModel ...);
    })

    and to show do huePubSub.publish('doc.show.delete.modal', $data/$root)

  3. 
      
roohi
johan
roohi
roohi
Review request changed

Status: Closed (submitted)

Loading...