Conversation
- Increase vertical spacing between entries in list screens - Reduce the number of entries per page to accommodate larger spacing - Vertically center text in buttons when it needs to be scaled down - Adjust background highlight dimensions for list items Fixes #324 - maybe at least
* Fix bookmark text alignment * fix: improve book list spacing and alignment - Increase vertical spacing between entries in list screens - Reduce the number of entries per page to accommodate larger spacing - Vertically center text in buttons when it needs to be scaled down - Adjust background highlight dimensions for list items Fixes #324 - maybe at least
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses visual inconsistencies in the book UI, specifically focusing on the alignment and spacing of list items within category, entry, and search screens. By refining the rendering of list buttons and adjusting the vertical layout, the changes aim to provide a more polished and readable user experience. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses text alignment issues in entry lists, and the changes appear to be effective. The logic for vertical text centering in CategoryListButton and EntryListButton is well-implemented. The adjustments to ENTRIES_PER_PAGE are also consistent with the new item spacing. I have one suggestion to improve maintainability by replacing a magic number with a named constant, which I've noted in the relevant files.
| for (int i = 0; i < count && (i + start) < this.visibleEntries.size(); i++) { | ||
| var address = this.visibleEntries.get(start + i); | ||
| Button button = new EntryListButton(this.getBook().getEntry(address.entryId()), address, this.bookLeft + x, this.bookTop + y + i * 11, this::handleButtonEntry); | ||
| Button button = new EntryListButton(this.getBook().getEntry(address.entryId()), address, this.bookLeft + x, this.bookTop + y + i * 13, this::handleButtonEntry); |
| void addEntryButtons(int x, int y, int start, int count) { | ||
| for (int i = 0; i < count && (i + start) < this.visibleEntries.size(); i++) { | ||
| Button button = new EntryListButton(this.visibleEntries.get(start + i), this.bookLeft + x, this.bookTop + y + i * 11, this::handleEntryListButton); | ||
| Button button = new EntryListButton(this.visibleEntries.get(start + i), this.bookLeft + x, this.bookTop + y + i * 13, this::handleEntryListButton); |
| protected void addEntryButtons(int x, int y, int start, int count) { | ||
| for (int i = 0; i < count && (i + start) < this.visibleEntries.size(); i++) { | ||
| Button button = new CategoryListButton(this.visibleEntries.get(start + i), this.bookLeft + x, this.bookTop + y + i * 11, this::handleButtonEntry); | ||
| Button button = new CategoryListButton(this.visibleEntries.get(start + i), this.bookLeft + x, this.bookTop + y + i * 13, this::handleButtonEntry); |
| void addEntryButtons(int x, int y, int start, int count) { | ||
| for (int i = 0; i < count && (i + start) < this.visibleEntries.size(); i++) { | ||
| Button button = new EntryListButton(this.visibleEntries.get(start + i), this.bookLeft + x, this.bookTop + y + i * 11, this::handleButtonEntry); | ||
| Button button = new EntryListButton(this.visibleEntries.get(start + i), this.bookLeft + x, this.bookTop + y + i * 13, this::handleButtonEntry); |
Closes #324