kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Profile page titles come from the core composable

Open rtibblesbot opened this issue 2 months ago • 1 comments

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

15 Profile components set their tab title with vue-meta's metaInfo, and no Profile layout defines a titleTemplate, so Profile titles lack the " - Kolibri" suffix. For #4922 they should register through the core composable.

Complexity: Medium Target branch: develop

Context

  • ChangeFacility/index.vue (/change_facility) and each of its 13 child routes set a title; vue-meta shows the child's.

The Change

  • Each Profile component that uses metaInfo registers the same title with the core composable instead; the Change facility steps register as nested routes.
  • Profile pages with a visible <h1> opt out of the hidden H1.
  • Each registered title message moves out of the component's $trs into a createTranslator object, passed to the composable directly.

Out of Scope

  • Focus after navigation: sibling "Focus moves to the page's H1 after each route change".
  • Title wording: #4466.

Acceptance Criteria

General

  • [ ] Every Profile tab title is its develop title followed by " - Kolibri".
  • [ ] On each Profile > Change facility step, the tab title is that step's title followed by " - Kolibri".
  • [ ] An errored Profile page's tab title is "Error - Kolibri".
  • [ ] Every Profile page and Change facility step has exactly one H1.
  • [ ] grep -rn metaInfo kolibri/plugins/user_profile finds nothing.
  • [ ] No title passed to the composable is read from a component's $trs, and no caller uses getCurrentInstance.

References

  • user_profile/frontend/routes.js#L61-L139: the nested Change facility routes.
  • AllPasswordsPage's migration in sibling "Pages register their tab title and H1 through a core composable": the pattern to follow.

AI usage

The assigner chose the approach and scope in #4922; Claude Code chose this split and drafted the issue from a survey of the code.

rtibblesbot avatar Sep 26 '26 09:09 rtibblesbot

Plan: All 15 Profile metaInfo components register their develop title through kolibri/composables/usePageTitle, giving " - Kolibri" titles and exactly one H1 (#15401, part of #4922).

  • [ ] Profile and Edit profile pages
  • [ ] MergeAccountDialog drops getCurrentInstance
  • [ ] Change facility and its steps
  • [ ] Self-review the produced code

Assumptions — the issue did not settle these; say so if one is wrong.

  • ProfilePage's second <h1> around Edit becomes an <h2> at h1 size, like the Change row (ProfilePage/index.vue:161); if reviewers want no heading, it becomes a div.
  • The ban on getCurrentInstance in callers covers MergeAccountDialog's focus helper, so it moves to a template ref; if only title code was meant, that refactor is unneeded.
  • Step titles are tested by rendering each step inside the real ImmersivePage, in one table spec; if reviewers want per-step spec placement as in #15484, the tests move into each step's spec file.
  • Two H1s while ChangeUserPasswordModal, the Learn-more KModal or AddDeviceForm is open are left to #15483; if this issue owns them, the H1 AC fails in those states.
  • Zero H1s while pageLoading hides content are left to #15467; if this issue owns them, the H1 AC fails during load.

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
  • Ran the project's full test suite and linter before committing
  • For UI changes: captured live screenshots to verify rendering
  • For backend changes: verified with example API/CLI output

rtibblesbot avatar Oct 03 '26 22:10 rtibblesbot