Fix for blank space left in layout for hidden fields in 10.0.0

Sugar 10.0.0 has a bug (defect 79052) where it is leaving blank space in the layout for dependent visible fields where both fields in the row are not visible. If you have layouts like ours with lots of dependent fields, the layout takes up way more space in the 10.0.0 release than it did in previous version, which is funny because the UI changes with field labels to the side of fields was made to make layouts more compact. The defect shows as fixed now and looks like it is targeted for the 10.1 release, but for those who can't wait that long for a fix, here is what I came up with to fix it for us.

In the custom/themes/custom.less file add the following CSS rules:

.record .record-cell.vis_action_hidden>.detail
{
    /* BEGIN fixes for labels on top */
    & > .normal
    {
        display: none !important;
    }
    /* END fixes for labels on top */
   
    /* BEGIN fixes for labels on side */
    & > .labels-on-side
    {
        & > .record-label-wrapper
        {
            margin-bottom: 0;
            min-height: 0;
           
            & > .record-label

            {
                display: none !important;
            }
        }
       
        & > .record-link-wrapper
        {
            min-height: 0;
           
            & > .normal

            {
                display: none !important;
            }
        }
    }
    /* END fixes for labels on side */
}

Do a quick repair/rebuild and make sure to clear your browser's cached files as the CSS files tend to get cached by the browser. Once Sugar releases their fix, you probably better remove these changes as they shouldn't be needed and have the potential to conflict with the CSS styles that Sugar adds to fix the bug.

Seems to work for us, hope it works for you.

-On a side note, I sure wish there was a way to see what the fixes for a Sugar defect were. For this one, the defect showed it was already fixed before I started diving in trying to figure out if I can fix it for us. Sugar support said they couldn't provide a fix and that I just had to wait until the next release or that I could reach out to our Sugar partner and essentially pay them to fix it for me. Would have saved myself a lot of time if there was a way to just see what Sugar had done to fix the bug. If anyone knows a way to get access to that I would love to hear how.