keystonejs / keystonejs/keystone
"Create related X" popover doesn't relate back to parent item
- Dominant language
- TypeScript
- Stars
- 10k
- Forks
- 1.3k
- Avg merge
- 19h 14m
- Merged PRs (30d)
- 19
Description
### Steps
1. Have schema with `User` and `Post` lists
2. `Post.user` is in relationship with `User.posts`
3. Open Admin
4. Create new `User` item by filling form and pressing `Create User`
5. In the edit sheet, under `Posts` press `Create related Post`
6. The edit popover sheet appears to the right.
### Expected
The `User` field is pre-filled with the relevant `User` record that we wanted to create "related" post for.
### Actual
The form is completely empty (unless default values in field config) and one has to manually search and pick the correct `User` to create relationship, which is error-prone and tedious. Given that the popover has the context of where it was opened from, it should be trivial to pre-fill the field with the back-reference.
Contributor guide
Research direction
Start by reproducing the steps in the Admin UI, focusing on the Create related Post popover opened from a User edit sheet. Trace how the parent User context reaches the related Post form; done means the User field is pre-filled with the parent record while other fields retain their normal defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100