16075 support multiple customized preview styles - #16615
Conversation
…ation style, Split 'available' panel into csl and customized tabs. customized styles show in editor preview panel, renaming functionality added, add and delete button added to customized tab to add/delete customized styles, persistence added to preserve customized styles and renamings
Merge changes into forked main branch
… constants to jabref_en.properties, refactored naming for CustomizedPreviewStyle
…d string constants to jabref_en.properties, refactored naming for CustomizedPreviewStyle" This reverts commit 9d11263.
…last commit, minus changes to abbrv.jabref.org and csl-styles
…comments and null checks. used modern Java for factory instead of constructor. updated string in JabRef_en.properties. updated changelog and created entry-preivew.md with new features.
…ple-customized-preview-styles
…ss Localization.lang concat violation, resolved NPE risk on TextBasedPreviewLayout constructor, resolve legacy migration rerun on empty list, updated previewPreferences to use CUID over legacy name, fixed rename test case for null pass, removed dependency on javafx.swing, changing out of main branch, updated doc feature req descriptions
PR Summary by QodoSupport multiple customized entry preview styles
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
Code Review by Qodo
1.
|
… fix comments, fix and add unit tests, migration tests added, update migration, fix rename bugs
|
Your pull request conflicts with the target branch. Please merge |
…of entry-preview.md file
…tps://github.com/bgyoo970/jabref into 16075-Support-multiple-customized-preview-styles
|
Hi, just a very quick review of ui without looking into code: The "add new" button should go below the list it belongs to. Maybe also with a text-input for the new name of the new item. See custom entry types. This can maybe combined with "Add BST" as a menu button to add bst or custom or select from different templates. The remove and edit buttons should go to the right inside of every line for the removable and editable items. Should only show up when hovering the mouse. Indicator for customized is also too prominent. Think instead of a filename. Common indicator of a dirty flag is an asterisk. |
Summary
Related to issue 16075
Closed Previous PR, due to merge from main
Analogies
Steps to test
Describe how reviewers can test this fix/feature.
Ideally, think of how you would guide a beginner user of JabRef to try out your change.
A. Add Custom Layout: Options → Preferences → Entry preview → Customized Tab → '+' (add button)
Upon opening the Entry Preview under preferences, navigate to the 'Available' Panel and click on the 'Customized' tab. There you will see a '+' plus button and a '-' minus button. Click on the plus button and you should see a new customized style appear under the 'Customized' tab.
B. Delete Custom Layout: Options → Preferences → Entry preview → Customized Tab → '-' (minus button)
Similarly from adding a custom layout, under the 'Customized' tab in the 'Available' Panel, you will see a '-' minus button. This button will be greyed out until you select a custom style under the 'Customized' tab. If none exist, create one using the '+' plus button. Then select the desired custom style to delete. The minus button will be available to click on. Click on the minus button and you will see that the custom style gets removed from the list.
C. Rename Custom Layout: Options → Preferences → Entry preview → Customized Tab → Under this tab, select custom style to rename → 'Name' text box -> Type name → Hit 'Enter'
Upon opening the Entry Preview under preferences, navigate to the 'Customized' tab or the 'Selected' Panel and click on a custom style. There, you should see at the bottom right corner of the UI, a text field with the name of your custom style. Rename your style as needed and hit 'Enter' to confirm the change. Note you may only rename custom styles. These custom styles will exist under the 'Selected' Panel or under the 'Customized' Tab. Duplicate names are not allowed.
D. Persisted Custom Layouts: After making changes to the 'Customized' tab's contents, Save your changes with the button at the bottom of the UI. Then re-navigate to the Entry Preview UI's 'Customized' tab and confirm that the changes have persisted. This will persist all data around the custom layouts around moving, renaming, adding, deleting, and editing layout's text.
Add screenshots (preferred) or videos.
Related issues and pull requests
Closes #16075
AI usage
Claude (Sonnet 5) was used to assist in understanding the code and providing feedback or suggestions to my approaches. I understand the feedback it provided and had it review each step of the CHECKLIST.md. Adjustments were made as needed after reviewing the checklist, while running successful verification steps and unit tests afterwards.
AI CHECKLIST.md walkthrough
Nullability and control flow
Exceptions
Style and idioms
User-facing text
Security
Tests
org.jabref.model/org.jabref.logichave added or updated tests.2. Verification commands
Run in this order — cheapest first. Each must pass.
3. Documentation
4. Pull request
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)