Page MenuHomePhabricator

Remove the hard-coded homepage, and other Dashboards improvements
Open, NormalPublic

Description

Problems with Dashboards:

Minor stuff:

  • Moving panels is currently a jank-fest.
  • Picking up a panel causes it to visually offset in an incorrect way.
  • In Safari, dragging panels at certain browser widths feels sketchy (???)
  • Old edges and edge transactions could possibly use cleanup.
  • See PHI915, which would like dashboard documentation.

Need Followup:


Resolved Issues

  • "Favorites" should render a menu when rendering content.
  • The dropshadow effect on hover/pick is probably a bit too intense.
  • Deleting a panel redirects to the wrong place. I want to replace this menu, anyway.
  • Template menu on creation should be a modern "clickable" menu.
  • Panel type selection should be a modern "clickable" menu.
  • T12363 is a bug that may be a mess to fix.
  • T6444 can probably be wontfix'd.
  • T9903 is probably easy.
  • See PHI997. Editing and reordering tab panels is a weird, janky mess.
  • Dashboards should update to Ferret.
  • Panels should update to Ferret.
  • Dashboard NUX is probably wrong.
  • Remove obsolete PhabricatorDashboardInstall.
  • See PHI945. An install managed to add a panel to two different columns (how?). This made a lot of stuff not work great and made the panel not removable. This state should probably be formally supported and operations against dashboard should specify more than just a panel PHID, but at a minimum it shouldn't break.
  • See PHI727. Typeahead searches for panels don't use a real index.
  • We need a double-background migration for all this stuff?
  • The "add query to panel" flow needs a revisit.
  • When you're editing a tab panel, all the panels inside the tab panel can be dragged and reordered. Great!

Default Home Page: The default home page looks like a dashboard but is currently hard-coded. Instead, it should be composited from Dashboards.

The hard-coded nature of the page means that a lot of edge cases either don't work or would need to be implemented twice in order to work. Overheating, below, is one example.

  • This was resolved by D20333.

Overheating: Overheated queries recently began throwing exceptions by default. In some cases, this causes problems on the home page:

https://discourse.phabricator-community.org/t/query-overheated-error-when-viewing-home-if-user-cant-see-all-repos/2571/

Panels should allow queries to overheat and handle this case gracefully.

  • This was resolved by D20335.

More Results / View All: Query panels currently give users very limited tools to determine:

  • Are there more results?
  • What do I click to see them?

See PHI854. See PHI1105.

Particularly, the header is linked but it isn't obvious that it's a link since it isn't colored. An unlabeled icon links to the results, but doesn't work on tab panels, doesn't look like a button, and doesn't convey any state information.

These actions should be obvious in the UI and work properly on tab panels.

  • This was resolved by D20336.

Other

  • In T12745, Conpherence items being addable even with the application uninstalled.
  • In T12167, no mobile access to add items to a profile menu.

Details

Differential Revisions
D20476: Really fix movable panels inside tab panels by changing the JX.Request serializer
D20475: Add "Move Left" and "Move Right" to dashboard tab panels
D20474: Add a "Customize Query" action to query panels to make it easier to make minor query adjustments
D20473: Fix an issue where editing a dashboard panel from a dashboard could duplicate the panel
D20472: Restore "Limit" to dashboard Query panels
Commits
D20484 / rPa76e91ea9ef6: Remove obsolete Dashboard panel methods with no callsites
rPaba7d1406ac8: Really fix movable panels inside tab panels by changing the JX.Request…
rPc43618a3a8bb: Add "Move Left" and "Move Right" to dashboard tab panels
rP9d716379a3f1: Add a "Customize Query" action to query panels to make it easier to make minor…
rP45f01dc716ee: Restore "Limit" to dashboard Query panels
rPdfbc4c1cd338: Fix an issue where editing a dashboard panel from a dashboard could duplicate…
D20415 / rPb8551bb5f98c: Reduce drag-and-drop jank on dashboards
D20414 / rPe99c1974b027: Fix the "Add Query to Dashboard..." flow from "Use Results" on search result…
D20412 / rP4eab3c4c8d2b: Reindex dashboards and panels (allow migrations to queue a job to queue other…
D20411 / rPf13709b13b68: Update search indexes for Dashboards and Panels to Ferret, plus various minor…
D20410 / rP80b7274e0bf6: Remove legacy "DashboardInstall" table
D20409 / rPfb994909cf9c: Make "Move Panel" on dashboards use the new storage and transactions
D20408 / rP82c46f4b93bd: Update "add panel" and "remove panel" Dashboard flows to the new panel storage…
D20407 / rPa3c43c473be9: Convert dashboard read/display pathways to the new panel storage format
D20406 / rP0381eed6e619: Modularize dashboard layout modes (one column, two columns, etc)
D20405 / rPd0078570cc50: Convert dashboard panel storage to a format which can handle duplicates
D20403 / rPce723f999db2: Move Dashboards main edit flow to EditEngine
D20402 / rP6fac9044632b: Modularize Dashboard transactions
D20399 / rP51f2ed498dbf: On panel pages, show where panels are used
D20398 / rPd62f4dbfc939: Index and surface usage sites for Dashboards
D20397 / rPcbe13b3065a1: When editing a tab panel from a dashboard, redirect back to the dashboard
D20396 / rP9ad9ac9be695: On Dashboard tab panels in edit mode, make the "Tab Name" and the "Dropdown…
D20384 / rPa35fda2019bb: Rebuild Dashboards on EditEngine: v1 Major Jank Edition
D20383 / rPe4524d470711: When a dropdown menu would render in a way that hides it offscreen, try a…
D20382 / rP41afc7c7e612: Rebuild query panels on top of EditEngine
D20374 / rP4d0904ef9527: Make "Favorites" work more like other customizable menus
D20373 / rPa1a89589b1c0: Make the Dashboard dropshadow a little lighter and turn panel management into a…
D20372 / rPb1e2d3cd2950: Use EditEngine, not CustomFields, to define Dashboard Panel edit behavior
D20371 / rP68d969094ffb: Mostly replace the old panel "Edit" controller with the new "Editpro" controller
D20370 / rP81b58dba8f73: Modularize Dashboard Panel transactionns
D20369 / rP597ef60d7ee2: Move Dashboard panel controllers into a "panel/" subdirectory
D20368 / rPf504f40ee581: Put "workflow" on Dashboard edit links when they're disabled
D20367 / rP5b38d2142c06: Remove the dashboard "template" workflow
D20364 / rP12b922438746: Make the "Install Dashboard" flow smoother
D20362 / rPeea093bec816: Combine the "View", "Arrange", and "Manage" modes of Dashboards into a single…
D20338 / rP6bb9d3ac67a1: Allow users to add "ProfileMenu" items on mobile
D20337 / rP6648942bc885: Don't allow "Conpherence" menu items to be added to editable menus if…
D20336 / rP73feac47c708: When query panels have more results, show a "View All Results" button at the…
D20335 / rP2c184bd4cdbf: When query panels overheat, degrade them and show a warning
D20334 / rP6b069f26c081: Give Dashboard query panels a more obvious "View All" button
D20333 / rPa68b6cfe6541: Use real Dashboard Panels to render the default hard-coded homepage, not hacky…

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

The remaining bugs I want to fix here are:

T8033: Inform editor when panels have more restrictive policy than dashboard

I'm not really sure what's left here, but I believe the desired behavior is fairly straightforward:

  • When you can't see a panel, it should render "Restricted Panel", not fatal/hide the panel/whatever.
  • When you can't see a panel in a tab panel, it should render a "Restricted Panel Tab", not fatal/hide the panel/break/explode/whatever.
  • In the cases where we know policies are strictly stronger or weaker than other policies (which is non-exhaustive, but covers many common cases) we can can show a warning in edit/arrange mode.

T8033 floats some alternative behaviors like:

  • Remove policies on panels.
  • Give users who can view an object containing a panel automatic permission to view the panel.

Maybe we'll end up here eventually but I think these are generally trading away policy-safety for ease-of-use and I don't think that's the right tradeoff. If we do end up here, I'd probably do it by differentiating between "standalone" panels and "embedded" panels (part of a dashboard/other-panel only, bound to that container strictly). This may happen -- and may even happen here -- but I'm currently hoping to leave it for future changes.

T6018: Panels used by Tab panels appear as "This panel does not appear on any dashboards."

There's a long unrelated discussion on this one, but the basic "we should index panel usage properly" is fairly straightforward.

T12363: Configuration of "Tab Panel" is lost when 1st tab has no panel assigned

This is a simple bug but might overflow into a whole lot of rewriting. These are probably also related:

PHI945 - An install managed to add a panel to two different columns (how?). This made a lot of stuff not work great and made the panel not removable. This state should probably be formally supported and operations against dashboard should specify more than just a panel PHID, but at a minimum it shouldn't break.
PHI997 - Editing and reordering tab panels is a weird, janky mess.

The "reordering/layout" code and the "editing a tab panel" code aren't the same pathway, but all of this is largely just "the edit code is pretty old/sketchy".

T7216: Make it easier to update the ApplicationSearch saved query used by a dashboard panel

This one is fuzzy for now. There are currently a lot of workflow issues where updating things requires many more steps than it should.

T8033 - I'm not really sure what's left here...

This already seems mostly fixed. Here's the panel view:

Here's the tab view:

I'll tighten these up and add some more tailored warnings, but this is roughly what I think the desired behavior is.

Currently, Dashboards have a "View" mode, an "Arrange" mode, and a "Manage" mode.

I think we can get rid of these now that we have portals, assume that "View" is effectively always covered by installing the dashboard to some menu (Home, a Portal, a Project, etc), and combine "Manage" and "Arrange" into a single view to start simplifying behavior here.

epriestley updated the task description. (Show Details)Apr 2 2019, 12:52 PM
epriestley updated the task description. (Show Details)Apr 2 2019, 2:42 PM
epriestley updated the task description. (Show Details)Apr 2 2019, 4:09 PM

Panel type selection should be a modern "clickable" menu.

Bad news: big mess.

Panel creation is currently handled by two controllers, an "Edit" controller and an "Editpro" controller. It also relies on custom fields. Transactions are nonmodular. The addition of panels to a dashboard is ad-hoc.

So this is going to be a whole series of changes, probably:

  • Modularize panel transactions.
  • Modularize dashboard transactions? Can I skip this for now?
  • Add an "add panel to dashboard" transaction to panels.
  • Replace the "Edit" controller with the "Editpro" controller.
  • Move all the custom field stuff to EditField stuff. This is going to go poorly with tab panels.

It may be possible to have this avoid spilling over into dashboards completely, although I'm not terribly hopeful.

epriestley updated the task description. (Show Details)Apr 2 2019, 8:22 PM
epriestley updated the task description. (Show Details)Apr 8 2019, 5:07 PM
epriestley updated the task description. (Show Details)Apr 11 2019, 4:32 PM
epriestley updated the task description. (Show Details)Apr 11 2019, 6:44 PM
epriestley updated the task description. (Show Details)Apr 11 2019, 7:25 PM
epriestley updated the task description. (Show Details)Apr 11 2019, 10:44 PM
epriestley updated the task description. (Show Details)Apr 12 2019, 1:26 PM
epriestley updated the task description. (Show Details)Apr 12 2019, 4:01 PM
epriestley updated the task description. (Show Details)Apr 12 2019, 5:45 PM
epriestley updated the task description. (Show Details)Apr 12 2019, 8:13 PM
epriestley updated the task description. (Show Details)Apr 12 2019, 8:16 PM
epriestley updated the task description. (Show Details)
epriestley updated the task description. (Show Details)Apr 12 2019, 11:48 PM
epriestley updated the task description. (Show Details)Apr 15 2019, 6:37 PM
epriestley updated the task description. (Show Details)Fri, May 17, 2:43 PM