C5-8.3: view.css not loading for Add Block form

Permalink
Is it a bug that when adding a custom block for the very first time, the block's view.css is not loaded? It loads fine on edit or any other block add.

I tried these unsuccessfully:
public function add() 
    {
        $html = $this->app->make('helper/html');
        $this->addHeaderItem($html->css('/blocks/myblock/view.css'));
    }

public function on_start() 
    {
        $al = \Concrete\Core\Asset\AssetList::getInstance();
        $al->register('css', 'blocks/myblock/view.css','../packages/myblock/blocks/myblock/css/view.css');
        $al->registerGroup('blocks/myblock', array(
            array('css', 'blocks/myblock/view.css')
        ));
    ...
    public function registerViewAssets($outputContent = '')
    {
        $this->requireAsset('javascript', 'jquery');
        $this->requireAsset('blocks/myblock');
    }

linuxoid
 
linuxoid replied on at Permalink Reply
linuxoid
Got it:
public function on_before_render()
    {
        $html = $this->app->make('helper/html');
        $this->addHeaderItem($html->css(Package::getByHandle('mypackage')->getRelativePath(). '/blocks/myblock/view.css'));
    }