Page MenuHomePhabricator

Allow panels to be removed from a dashboard
Closed, ResolvedPublic


Unless I missed it, you can't remove panels from dashboards right now.

I recently added "headless" flag, but I think we should back that out and do this instead:

  • there's a "frame mode" or "header mode" or something, which has three values: "none", "normal", and "arrange" (or whatever)
    • none: No header, for panels in panels.
    • normal: Normal header, for most panels on Dashboards. Might get sleeker or something after T5005.
    • arrange: header with remove action (and maybe edit)

Then make the arrange view render panels in "arrange" mode, give 'em a delete button, and make that kick them off the board.

Event Timeline

epriestley assigned this task to btrahan.
epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Dashboards.

I'm minorly of the opinion that dashboards should only be action headers - which come with all sorts of icons for these kinds of things. The regular phuiobjectbox is pretty heavy when 2 or more up. I'm a bit out of touch on dashboards at the moment, it's been a rough week but will look into it today

I can do the action header bit as part of this

@btrahan, my rough uncoded plan was to rename PHUIWorkpanelView as PHUIPanelView and tweak as needed (plain states, etc), then you'd have one library for doing all this fancy stuff like moving, actions, etc. Though maybe that can is a little further down the road. I'll likely get to this today late, but if you're open now and this all makes sense - go for it.

(Isabella is getting her 2 month shots right now, not sure how “today” will go)

Or we can split the work, you implement it as PHUIPanelView, and I'll clean up CSS suckage.

D9156 now makes all panels rendered via PhabricatorDashboardPanelRenderingEngine->renderPanelDiv($content, $header = null, $id = null)

The enclosing div is pretty plain with some modest styles in dashboard.css. It's got the sigil and class dashboard-panel.

I used PhabricatorActionHeaderView and stopped using PHUIObjectView. Instead, a dashboard-panel has an (option) PhabricatorActionHeaderView and then some $content that the panel renders.

Anyhoo, that's the current state of the code as I see it.