Arrange should put the dashboard itself into an editing mode, and Settings → Dashboard should go #201
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The change
Pressing Arrange on the dashboard puts the dashboard itself into an editing mode:
the widgets stay where they are, on the page they live on, and grow the controls to move,
remove and add them. Settings → Dashboard — the separate page that does this today —
should not exist.
What happens today
Every arranging control on the dashboard is a link away from it.
core/dashboard.html:48(Arrange),
:24(arrange your dashboard, in the "Not shown yet" banner) and:93(Arrange it, on the empty dashboard) all go to
settings:dashboard. That page —DashboardViewinaccounts/settings_views.py:150,templates/settings/dashboard.html(176 lines), section
dashboardincore/settings_sections.py:45, routesettings_urls.py:10— lists the widgets as rows, each with four move buttons (up anddown move a row, left and right a place), a Remove, and below it the widgets not shown
with Add and Dismiss, plus Reset. Every action is a POST to that page, and the
redirect carries a fragment so focus lands on the widget that moved. Dragging a row into
place is a script-added addition (
app.js:1168onwards,tests/e2e/test_widget_drag.py).So a person arranging their dashboard is arranging a list of names on another page and
switching back to see what it did. The mode this asks for shows the effect where it
happens.
What carries over unchanged, and should
The view's docstring states two rules that hold whatever the page is, and both were
fought for (#124, #125):
a sentence saying where the widget landed. Dragging stays an addition to that, never a
replacement — it does not fire on a touch screen and is not reachable from a keyboard.
cell to name; left and right move one place, up and down a whole row, and on a
narrow screen the two axes coincide. An editing mode on the grid itself makes this
easier to see, not harder — the widget moves in front of you — but the four buttons
stay the model.
The data does not change either:
Profile.dashboard_widgetsanddashboard_known, thewidgetsmodule that reads and writes them,seed, and the export that carries them.What a fix has to settle
(
/?arrange=1), so it survives a reload, works under the back button and can be leftby a plain link Done; the POSTs go to the dashboard and redirect back into the mode
with the fragment. A remembered "editing" state would be wrong: the mode is a moment,
not a preference.
in the widget's header, with the same target-size care the settings rows had (#115).
Widgets not shown — the Add / Dismiss offer, with each widget's sentence — need a
place on the dashboard too, below the grid or in a panel the mode opens; the "Not shown
yet" banner then opens the mode rather than leaving the page.
app.js's widget handler keys ondata-widget-rowand posts todata-widget-place; the dashboard's cells carrydata-widgettoday (dashboard.html:82). One handler, on whichever markup remains.settings_sections.py:45, the route, the view, the template andits
move_widgetpartial.Settingskeeps Appearance, Language and time, Account,Connections, Plugins, and any plugin section. Nothing stored refers to the section by
name, so no migration.
tests/test_dashboard_grid.py,test_dashboard_ownership.py,test_widget_placement.pyandtest_widgets.pypost tosettings:dashboard;tests/e2e/test_widget_drag.pydrags its rows;tests/e2e/test_accessibility.pyandtest_direction.pywalk/settings/dashboard/andtest_page_coverage.pycounts it.They point at the dashboard in its mode instead; the drag test's assertion that the
menu stays is the one to keep word for word.
Getting-started.md:129andInsights.md:3,:14-15,:100— and says "press Arrange, or Settings → Dashboard". It saysArrange alone.
Not in this issue: what the widgets are, their widths, or the packing rule.