Created by: vovakulikov
This PR adds a fix for the bad code insights item sizing at the home and search pages. It turned out that react-grid-layout lib behaves very odd when we don't have all items and therefore we don't know how many elements we have. React grid layout can't count them dynamically (by iteration over child array) and requires a number of ids to generate the right grid layout media queries. So, this PR just adds rendering conditions and now the component does not render grid component if it doesn't have all the needed information.
Before | After |
---|---|
![]() |
![]() |
Note: you need to run the enterprise version of sourcegraph since code insights is part of the enterprise now
sg run enterprise-web-standalone
Also to be able to see insights on the directory page you have to turn on "insights.displayLocation.directory": true,
flag in your settings