🎨 Palette: [UX improvement] Enhance AcShop Return button#45
🎨 Palette: [UX improvement] Enhance AcShop Return button#45
Conversation
Added yellow color code and descriptive lore to the Return button in AcShop to make it visually distinct and clarify its purpose. Safely intercept the click event for this button before parsing lore to prevent ArrayIndexOutOfBoundsException. Co-authored-by: acsoto <59144459+acsoto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ae68ecdba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (icon != null) { | ||
| if (icon != null && icon.hasItemMeta()) { | ||
| if (icon.getItemMeta().hasDisplayName()) { | ||
| if (icon.getItemMeta().getDisplayName().endsWith("返回")) { |
There was a problem hiding this comment.
Match the return button by exact label, not suffix
The new endsWith("返回") check treats any shop item whose display name happens to end with “返回” as the back button, so clicks on those items will run /menu_shop and skip buy(...). This regression was introduced by broadening the previous exact-name check; to support colorized labels safely, compare against the specific return label (or strip color codes and compare equality) instead of a suffix match.
Useful? React with 👍 / 👎.
💡 What: Added a color code (
\u00a7e) to the "Return" (\u8fd4\u56de) button's name and descriptive lore (\u00a77\u70b9\u51fb\u8fd4\u56de\u4e3b\u83dc\u5355- "Click to return to main menu") in AcShop'sShopGui.java. Also updatedShopListener.javato intercept this specific button's click before attempting to parse the newly added lore for item purchases.🎯 Why: To make the "Return" action more obvious and visually appealing (acting as a tooltip). Additionally, the listener check prevents an
ArrayIndexOutOfBoundsExceptionwhich would occur if the original code tried to parse the Return button's lore like a purchasable item.📸 Before/After: The return button now has yellow text and a grey descriptive lore tooltip.
♿ Accessibility: Clarifies the button action through explicitly descriptive text instead of relying solely on an icon or single word.
PR created automatically by Jules for task 3829840038347481722 started by @acsoto