Dropdown Arrow in Header Row Taking Up Too Much Space

I like the dropdown arrow in the header row only when it isn’t taking away space from the column label. Many of my spreadsheets now have to be resized because of row header, but this requires extra space in columns that would otherwise not need the extra space. Here is a screenshot showing how the arrow is causing issues with the column labels:

image

Note that the presence of the orange triangle results in the width of nbui-fast-render-container remaining at 100%.

It’s hard to have both the benefit of the arrow in the cell as well as the ability to make concise spreadsheets (minimizing column widths for sheets with many columns).

One idea would be to make the table header row slightly taller to accommodate the drop-down arrow. In Chrome I modified the css to obtain the following:

Idea #1: Make the Table Header Row automatically taller and put the arrow underneath.
image
.nbui-hot-header-row-dropdown-icon {position:relative;background-color:#ccc5;margin-top:-20px;padding:0 6px;}

This looks pretty clean, but it takes up room and this particular css modification throws off the row spacing, but the point was to show what it could look like.

Idea #2: Have the arrows only appear when you mouse over or select the column. Return the label width to 100% and make the arrow have a semi-transparent background. Notice how the arrow appears both in the column I have selected AND the cell that the mouse is currently hovering over.

image

Below is the css modification that can create this effect. I have the “User CSS” extension for Chrome installed and now this works exactly the way I want within app.spreadsheet.com. :grinning:

.nbui-hot-table-renderer:hover .nbui-hot-header-row-dropdown-icon {display:block;}
.highlight .nbui-hot-header-row-dropdown-icon {display:block;}
.nbui-hot-header-row-dropdown-icon {display:none;background-color:#cccc}
.nbui-fast-render-container {width:100% !important}
.nbui-hot-header-row-dropdown-icon {border-radius:2px;}

Worksheet Column Headers:
You can use this same technique to display more text in the main worksheet header row using the following css modification:

image

.handsontable thead th .relative {padding-left:0;padding-right:0;font-size:1em;font-weight:bold;font-family:Arial Narrow,Arial;}
.handsontable thead th .relative .colHeader{width:100%;}
.handsontable .changeType {position:absolute;right:0;background-color:#dddc !important;height:80% !important;margin:1px 1px !important;padding:0 4px;font-size:0.9em;/visibility:visible;/}

In addition to allowing more of the column label text to be displayed, the button can be larger, requiring less mouse precision to click on the arrow.

Here’s a fix for the orange triangle used for cell messages:
.nbui-doggy-ear-triangle-messages {width:auto !important;}

Thank you @Vertex42, this hover effect is something we have discussed for the column headers and table header row. Appreciate this level of detail, it’s something we will discuss & consider internally.

Meanwhile misplaced dog ears on table header row cells with comments looks like a bug. Would you be able to share a copy of a workbook you experienced this in?

Sure. I’m seeing the misplaced dog-ears in all of the spreadsheets that use cell messages within table header rows (I shared one example).

After using this css hack yesterday and today, here are some changes that I think work a little better in terms of color, positioning, etc. (This can be copy/pasted into the “User CSS” extension if you want to try that).

SSDC Test Drop-Downs

/* Table Header Row Drop-Down Arrows */
.nbui-hot-table-renderer:hover .nbui-hot-header-row-dropdown-icon {display:block;}
.highlight .nbui-hot-header-row-dropdown-icon {display:block;}
.nbui-hot-header-row-dropdown-icon {display:none;color:#fff;background-color:#bbbc;font-size:16px;padding:2px 5px;top:50% !important;margin-top:-10px;margin-right:2px;}
.nbui-fast-render-container {width:100% !important}
.nbui-fast-render-span{width:100% !important}
.nbui-hot-header-row-dropdown-icon {border-radius:2px;}
.nbui-hot-header-row-dropdown-icon:hover {color:#000}

/* Worksheet Column Header Drop-Down Arrows */
.handsontable thead th .relative {padding-left:2px;padding-right:0;font-size:1em;font-weight:bold;font-family:Arial Narrow,Arial;}
.handsontable thead th .relative .colHeader{width:100%;}
.handsontable .changeType {position:absolute;right:0;color:#fff;background-color:#cccc !important;top:50%;height:20px;margin-top:-10px;margin-right:2px;padding:0 4px;font-size:12px}
.handsontable .changeType:hover {color:#000;}

/* Fix the Cell Message Triangle */
.nbui-doggy-ear-triangle-messages {width:auto !important;}

It’s probably not a good idea to hide the arrows in the worksheet column header. The purpose of this hack is mainly to prevent the arrows in the table row header from messing up the design and layout of the worksheet. So, here is a modification that leaves the arrows visible in the worksheet column headers.
image

/* Worksheet Column Header Drop-Down Arrows */
.handsontable thead th .relative {padding-left:2px;padding-right:0;font-size:1em;font-weight:bold;font-family:Arial Narrow,Arial;}
.handsontable thead th .relative .colHeader{width:95%;}
.handsontable .changeType {position:absolute;right:0;color:#bbb;background-color:#f3f3f3 !important;top:50%;height:20px;margin-top:-10px;margin-right:1px;padding:0 4px;font-size:10px;visibility:visible;}
.handsontable .changeType:hover {color:#000;background-color:#ccca !important;}

1 Like

Thanks and nicely done. We are tracking these suggestions as 002293 and 002294. We’ll review and follow up on this thread.

As of the January 18th 2021 update, we have changed the behavior of column headers and table header row cells so that drop-down arrows appear non-intrusively on hover. Thanks for your suggestions!
NewColumnAndTableHeaderRowHovers

In addition, we have fixed the mentioned issues with mis-placed dog-ears. 002293 and 002294 are now resolved so marking this thread as “Solved”.

1 Like