Skip to content

feat(applications): personal layout for the standalone application - #45

Closed
rubenvdlinde wants to merge 1 commit into
stack/n6-applications-pagefrom
stack/n7-per-user-layout
Closed

rubenvdlinde wants to merge 1 commit into
stack/n6-applications-pagefrom
stack/n7-per-user-layout

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Collaborator

Rebuild of #31 on application pages (nextcloud#3075, see #13). Stacked on #44.

What changes

Opened on its own, an application lets each person choose how wide each widget of a page is, without changing the page for anyone else.

  • Widths: "Edit layout" (next to "Edit page" for managers) lets a person give each widget full width, two thirds, half or one third through a width menu on the widget; "Reset layout" goes back to the page as arranged, and the layout is saved or cancelled as a whole. A widened widget that would no longer fit moves left; the grid moves widgets down where they would overlap.
  • Storage: the layout is personal and kept in the browser (local storage), per user, application and page. It does not follow the user to another browser or device. When the browser refuses to store it, the layout applies to the current visit only and the user is told so.
  • Managers editing the page see and arrange the page as stored; the stored layout never changes.

Carried over from #31, and what changed because of pages

  • Carried over: the four widths, edit/reset/save/cancel as a whole, local storage per user with the warning when storage is refused, the dropped unknown widths.
  • Changed: feat(applications): personal layout for the standalone overview聽#31 laid the tables and views of the standalone overview out as cards on its own 12-column CSS grid. That overview is now the start page, a grid page arranged by its managers, and every page shows on that grid. So the personal widths apply to the widgets of a page on the page grid (GridPage/GridCanvas), keyed by application and page id and widget id instead of by resource key. The CSS grid, its responsive spans and getGridCellStyle are gone; narrow screens reflow as the page grid already does.
  • Not carried over: nothing else. One behaviour is new by necessity: a widened widget can push the widgets below it down on screen, which the CSS grid of feat(applications): personal layout for the standalone overview聽#31 did by itself.

Tests

Nextcloud 34 container (PostgreSQL 16), Playwright at 1600 x 1000, --timeout=120000:

  • application.spec.ts: new "A width chosen for a table in an application opened on its own is kept after a reload" (half width survives a reload, the stored start page keeps width 12). With the rest of application.spec.ts and context-grid-pages.spec.ts: 19 passed.
  • npx cypress run --component --spec cypress/component/contextLayout.cy.js: 4 passing (storage per application and page, reset, unknown widths and a broken entry, widths applied with the widget kept on the grid).
  • npm run lint: 0 errors (1 inherited warning in store.js), stylelint clean, npm run build OK.

Prepared in the Conduction fork for porting upstream by @remko48. Prepared with Claude Code.

Opened on its own, an application lets each person choose how wide each
widget of a page is, without changing the page for anyone else.

- Widths: "Edit layout" lets a person give each widget full width, two
  thirds, half or one third; "Reset layout" goes back to the page as
  arranged, and the layout is saved or cancelled as a whole. A widened
  widget that would no longer fit moves left; the grid moves widgets
  down where they would overlap.
- Storage: the layout is personal and kept in the browser (local
  storage), per user, application and page. It does not follow the user
  to another browser or device. When the browser refuses to store it,
  the layout applies to the current visit only and the user is told so.
- Managers editing the page see and arrange the page as stored.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde

Copy link
Copy Markdown
Collaborator Author

Dropped on Ruben's decision (15 Oct). Without the card grid of tables and views there is nothing personal to arrange. The page grid is designed by the application manager for everyone. Personal layout can come back later if users ask for it. The branch stack/n7-per-user-layout stays for reference. Old #31 is not ported either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant