tweak(persons): show the person name under the page title - #5408
Conversation
Use the page title variant with a second line for the person page, so the header reads Edit person with the name of the person under it. A new person keeps the plain title.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Approval pendingCodeRabbit has no unresolved comments, but it could not review the latest commit because the review limit was reached. Follow the review guidance in this comment to continue. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The shared person record still holds the previously opened person until the effect replaces it, so the title briefly showed the wrong name on direct loads and person-to-person navigation.
|
| const record = isNewPerson | ||
| ? person | ||
| : persons.find((item) => item.person_uid === id); |
There was a problem hiding this comment.
🟡 Edited names leave title stale
When an existing person's name changes, personName reads the saved record instead of current edits. The title retains the old name until saving.
| const record = isNewPerson | |
| ? person | |
| : persons.find((item) => item.person_uid === id); | |
| const record = | |
| isNewPerson || person.person_uid === id | |
| ? person | |
| : persons.find((item) => item.person_uid === id); |
Was this helpful? React with 👍 or 👎 to provide feedback.



The person page had only "Edit person" in the header, with no hint of who is being edited.
It now uses the existing two-line page title: "Edit person" with the person name under it, the same variant the field service reports page already uses. Adding a new person keeps the plain title.
Type of change