-
-
Notifications
You must be signed in to change notification settings - Fork 449
feat: custom fields #2115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: custom fields #2115
Conversation
balazs-szucs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your work. This looks good at a high level. However, I have a few notes that would make the review process easier:
- Could you add JUnit tests for this? As far as I can tell, you updated the current tests but missed adding a new one for this specific behavior.
- Could you include screenshots of the frontend changes?
- Could you please detail your testing process? Beyond running the standard build commands (gradlew and npm build), did you perform any manual testing?
Thanks! Looking forward to testing this 😄
|
@balazs-szucs screenshots and such are coming. all testing so far has been automated. |
|
@balazs-szucs pr updated with screen shots showing custom metadata creation and editing. (Need to add the ability to lock fields still. Noticed that was missing.) |
|
Replacing this with another PR that includes exposing the custom fields in the UI. Will replace the docs PR as well. |
🚀 Pull Request
📝 Description
Adds library-scoped Custom Fields (STRING/NUMBER/DATE) and surfaces them in:
{custom:<name>}placeholdersRelates to #2081 #2128
Docs PR: booklore-app/booklore-docs#21
🛠️ Changes Implemented
🧪 Testing Strategy
./gradlew testinbooklore-api{custom:<name>}placeholder outputng test)✅ Additional Automated Tests Added
BookMetadataMapper.mapCustomFields()(defaults vs stored values; NUMBER/DATE formatting){custom:<name>}inPathPatternResolverBookMetadataUpdaterscenarios where only custom fields changed (including when metadata is otherwise locked)📸 Visual Changes (if applicable)
developbranch./gradlew testfor backend)💬 Additional Context (optional)
If reviewers want to sanity-check placeholder behavior quickly, create a custom field named e.g.
Editorand reference it as{custom:Editor}in a file naming pattern.🔒 Custom Field Locking
This PR now also includes per-book per-custom-field locking, matching the behavior/UX of the existing metadata locking:
lockedstate per book/custom-field value (book_custom_field_value.locked) and exposing it viacustomFieldLocksin the book metadata payload.(Commit:
48bff66c– “Add per-custom-field locking (backend+UI)”)✅ Locking Test Coverage
Expanded JUnit coverage for lock edge-cases (locked fields ignore deletes, lock-only updates create/persist lock rows, mapper defaults
locked=nulltofalse).(Commit:
6722147f– “Expand JUnit coverage for custom-field locking”)