Snippet for hiding the sidebar in the Craft 3 control panel for Element index pages.
Since the Craft 3 sidebar handles the index source for querying elements it can be tricky disabling the sidebar and still executing the query.
This uses a twig macro to duplicate the sidebar and hide it while still being able to pass an index source for the query.
See the Craft templates/_layouts/cp.html file for more layout information