Letting Users Rearrange Their Own Dashboard
Letting each user arrange their own dashboard is a popular request and a deceptively deep one. The visible part - dragging a panel to a new position - is a solved problem with well-known libraries. The part that determines whether the feature survives contact with a real portal is what happens on every subsequent page load, when the page the author defines and the layout the user saved no longer agree.
Two owners, one page
A page-building platform already has a layout system, and it belongs to the author. Adding a user-level layer creates a second opinion about what the page looks like, and the first design decision is how those two relate. Getting this wrong produces a feature that quietly fights the people maintaining the page.
| Decision | Author owns | User owns |
|---|---|---|
| Which widgets exist on the page | Yes | No |
| Which widgets a user may see | Yes, via permissions | No |
| Whether a widget is mandatory | Yes | No |
| The order widgets appear in | Sets the default | Overrides it |
| Column width or span | Sets the default | Overrides it, within bounds |
| Hiding an optional widget | Marks it optional | Yes |
Stating it that way removes a whole class of problems in advance. A user cannot remove a widget that compliance requires, cannot surface one they lack permission for, and cannot end up on a page that no longer reflects what the author published.
Store a preference, not a page
The tempting shortcut is to save the resulting layout - the markup, or a full description of every panel and its contents. It works immediately and makes the feature impossible to change later, because every saved layout is now a frozen copy of a page that has since moved on.
{
"pageKey": "executive-dashboard",
"version": 1,
"items": [
{ "widget": "open-applications", "span": 8 },
{ "widget": "approvals-queue", "span": 4 },
{ "widget": "recent-activity", "span": 12, "hidden": true }
]
}Small, declarative and versioned. The version field costs nothing now and is what lets you change the shape later without abandoning every saved layout on the system.
The reconciliation rule is the whole feature
On every load, the saved preference and the page's current widget set have to be merged. This is where naive implementations break, usually a month after launch when someone adds a widget and nobody who had personalized the page ever sees it.
- Start from the widgets the page currently offers, filtered by what this user is permitted to see.
- Order them by the saved preference, for any that appear in it.
- Append widgets the preference does not mention - new ones - at the end, visible by default.
- Discard entries in the preference that no longer correspond to an available widget.
- Force mandatory widgets to be visible regardless of what the preference says.
- Never write the reconciled result back automatically; save only when the user actually rearranges something.
Step three is the one that matters most. Appending new widgets rather than ignoring them means an author can add something to the dashboard and be confident everyone will see it - which is the difference between a personalization feature and a feature that silently freezes the page for your most engaged users.
Step six is subtler. Writing back on load means a user who visited once has a saved preference forever, so a later change to the default order never reaches them. Preferences should exist only for users who expressed one.
Permissions belong on the server
The available widget set must be filtered before it reaches the browser. Sending everything and hiding some client side puts the data in the page for anyone who opens developer tools, and a saved preference then becomes a way to request something the user should not have. This is the ordinary rule that hiding a control is presentation and refusing a request is security, and layout personalization is an easy place to forget it.
Drag and drop cannot be the only way
Dragging is unusable with a keyboard, difficult with assistive technology, and awkward on touch devices where the gesture competes with scrolling. A dashboard that can only be arranged by dragging is one that a portion of your users cannot arrange at all.
The practical answer is to build the feature on explicit controls - move up, move down, change width, hide - and treat dragging as an accelerator layered on top. This inverts the usual build order and produces a better result, because the explicit controls also give you the state model the drag implementation needs anyway.
Responsive layouts erase half the preference
A three-column arrangement means nothing at phone width, where everything is one column. This has to be decided rather than discovered: width preferences apply above a breakpoint and are ignored below it, while order is preserved at every width.
Saying so in the interface avoids the support question that otherwise follows, because a user who carefully arranged a wide layout and then opened the page on a phone will reasonably assume their settings were lost.
Saving without thrashing
- Save on drop, not during the drag, and debounce rapid successive changes.
- Update the interface optimistically; a layout change should never feel like it is waiting on the network.
- If the save fails, say so and keep the arrangement on screen rather than snapping back.
- Make the payload the whole preference rather than a diff - it is tiny, and it avoids merge problems across tabs.
- Always offer a visible reset to the default layout, which is also your best support response.
The reset control does disproportionate work. Most support tickets about personalization are from someone who arranged the page into a state they dislike and cannot undo, and a single button closes all of them.
Conclusion
The drag interaction is the part users notice and the smallest part of the work. Decide that the author owns the widget set and the user owns only a preference over it, store that preference as small declarative data with a version, and write the reconciliation carefully - especially appending widgets the preference has never seen. Build on explicit controls so everyone can use it, be clear about what responsive layouts discard, and always provide a way back to the default.