HUE-8341 [assist] Create a new document from the doc assist

Review Request #13021 — Created June 3, 2018 and submitted

roohi
hue
HUE-8253_query_dwld_non_ascii
HUE-8341
hue
enricoberti, jgauthier, johan, ranade, romain, weixia, yingc
commit 39691a8dd92db37e4438200302d07ee329553715
Author: Roohi <roohisyeda@cloudera.com>
Date:   Sun Jun 3 23:36:04 2018 -0700

    HUE-8341 [assist] Create a new document from the doc assist

:100644 100644 51aa23d08a... ecac05729a... M	desktop/core/src/desktop/templates/assist.mako

Manually on chrome

  • 0
  • 0
  • 5
  • 0
  • 5
Description From Last Updated
roohi
  1. 
      
  2. Hi Johan, The drop down doesn't come up, when I click. Can you pls help me?

  3. 
      
johan
  1. 
      
  2. That's odd, could be a z-index issue, does the DOM change when you click it, i.e. <span class="dropdown"> changes to <span class="dropdown open">?
    
    If yes, check the z-index on <ul class="dropdown-menu" ...> Change it to 10000 in chrome dev tools to see if it appears. If yes, add a style="z-index: N" where N is the lowest possible z-index for the dropdown to appear.
    1. Thanks Johan. No, the DOM change doesn't happen when I click.

      I had tried changing z-index too to 10000 plus and didn't work.

    2. So here there are two problems:
      - the dropdown automagic from bootstrap is not called when the elements is added via Knockout <!-- ko xxxx: -->, so we will need a dropdown binding for this case that simply calls $(element).dropdown()
      - the dropdown appears but it's cut off the screen because of the flexbox model (if you increase the height of flex for the header actions, you will see the dropdown appearing)

    3. Thanks Enrico! I will try this.

  3. 
      
roohi
roohi
roohi
  1. 
      
  2. Hi Enrico,
    I still have one more issue after changing this one. The drop down menu comes up but the header actions go invisible like this https://docs.google.com/document/d/1jUGF95fQ4Zi15f9aIkbcdEk4CLD2DU5_B_r0xGpF4GQ/edit?usp=sharing
    I pushed my code to HUE-8341_new_doc_assist branch, can you pls help?

    1. I checked and it's because of the left margin of the dropdown, if you change it into this it works pretty well (also when you resize the assist)

      margin-top:3px; margin-left:-140px; width: 175px;position: absolute;

    2. Thanks Enrico!

  3. 
      
roohi
roohi
johan
  1. 
      
  2. This was added to prevent scroll on long table names etc. Do you need to remove it?

  3. desktop/core/src/desktop/templates/assist.mako (Diff revision 4)
     
     
     
     
     
     
     
     

    Move to ko.hue-bindings.js

  4. 
      
roohi
enricoberti
  1. 
      
  2. why on click? isn't it enough to just do
    
    ko.bindingHandlers.dropdown = {
        init: function (element, valueAccessor) {
            $(element).dropdown();
        }
      };
  3. 
      
roohi
enricoberti
  1. Ship It!
  2. 
      
roohi
Review request changed

Status: Closed (submitted)

Loading...