Skip to content

feat(applications): give applications a technical name - #56

Open
rubenvdlinde wants to merge 1 commit into
stack/s4-overview-extrasfrom
stack/s5-application-technical-names
Open

rubenvdlinde wants to merge 1 commit into
stack/s4-overview-extrasfrom
stack/s5-application-technical-names

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Collaborator

Rebuild of #43 (originally #29) on the page model of nextcloud#3100, see #13. Stacked on #55.

What changes

An application can get a technical name, so it opens at a readable address like /apps/tables/app/intake instead of /apps/tables/app/28.

  • Migration: tables_contexts_context gets a nullable technical_name (Version2400Date20261016120000, dated after r5's page migrations Version2400Date20261016000001-3). App version 2.4.0-dev.8 so installs run it.
  • Rules: lowercase letters, digits and underscores, starting with a letter (the rule of menu items and pages), unique per owner. A malformed or taken name returns a 400. On update, an empty name removes it and leaving it out keeps it.
  • Address: /apps/tables/app/{name} opens the application. The user's own application wins over one shared with them under the same name. Because names are only unique per owner, applications of others are linked by id, both in the app navigation and on the overview. An unknown name opens the Tables start page.
  • Dialogs: the create and edit application dialogs take an optional technical name.
  • Export and import: the technical name travels with an exported scheme.
  • Menu links: a link in the application menu opens in a new tab.
  • API: technicalName on the context response and on the create, update and import scheme endpoints (OpenAPI and TS types regenerated).

Carried over from #43, and what changed because of nextcloud#3100

  • Carried over: the column, the lookup and uniqueness queries, the service rules, the navigation links, the dialogs, the scheme field, the PageController::context test.
  • Page technical names are r5's (feat(pages): technical names for application pages (step 5, separable)聽#50: required, unique per application, TechnicalNameHelper), not part of this PR. To keep the UI consistent, the application dialogs use the page form's wording ("Lowercase letters, digits and underscores, starting with a letter"), and the overview's page list shows each page's technical name next to its title.
  • The migration is re-dated after the page migrations and the version moves from dev.7 to dev.8 (feat(applications): give applications a technical name聽#43 was dev.3 on the old stack).

Tests

Nextcloud 34 container (PostgreSQL 16), one file per call, after occ upgrade to dev.8:

  • tests/unit/Db/ContextMapperTechnicalNameTest.php (real DB): OK (4 tests, 8 assertions)
  • tests/unit/Controller/PageControllerTest.php: OK (4 tests, 7 assertions)
  • tests/unit/Service/ContextServiceTest.php: OK (45 tests, 119 assertions) (malformed and taken names, blank clears, absent keeps, create stores, navigation links by name only for the owner, import passes the scheme's name)
  • tests/unit/Model/ContextSchemeTest.php: OK (16 tests, 38 assertions); ContextControllerTest OK (7 tests, 20 assertions); ContextMapperTest, ContextPagesRoundTripTest, ContextSchemeServiceTest OK.
  • Playwright at 1600 x 1000, --timeout=120000: application.spec.ts with the new "An application with a technical name is opened at its readable address" (the overview shows the address and the start page's dashboard), context.spec.ts (create and edit dialogs), context-menu.spec.ts, context-navigation.spec.ts: 24 passed (4.7m).
  • composer cs:check: no files; psalm No errors found!; composer openapi regenerated; npm run lint: 0 errors, 1 inherited warning (src/store/store.js:176); npm run stylelint: clean.

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

An application can get an optional technical name, unique per owner, so it
opens at /apps/tables/app/{name}. The create and edit dialogs take it, the
scheme carries it, and the owner's links use it; others link by id. The
overview shows each page's required technical name next to its title.
Migration dated after the page migrations; app version 2.4.0-dev.8.

Assisted-by: ClaudeCode:claude-opus-5-5
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