Skip to content

🎨 Palette: [UX improvement] Add return button tooltips in AcShop and MedalCabinet#38

Merged
acsoto merged 1 commit into
mainfrom
palette-ux-shop-return-buttons-17341261530163962121
Mar 7, 2026
Merged

🎨 Palette: [UX improvement] Add return button tooltips in AcShop and MedalCabinet#38
acsoto merged 1 commit into
mainfrom
palette-ux-shop-return-buttons-17341261530163962121

Conversation

@acsoto
Copy link
Copy Markdown
Contributor

@acsoto acsoto commented Mar 4, 2026

💡 What: Added the yellow color code (\u00a7e) and a helpful lore description (\u00a77点击返回主菜单) to the generic "Return" button (GOLD_NUGGET) in both AcShop and MedalCabinet. Also updated the corresponding click listeners in both modules to use .endsWith("返回") so that color codes and lore metadata don't interfere with their functionality.

🎯 Why: The original "Return" button was an unstyled name that lacked contextual feedback. The new lore text explicitly informs the user that clicking the item will return them to the main menu, while the updated name styling creates visual consistency with the rest of the interface. Updating the underlying listener logic fixes a potential ArrayIndexOutOfBoundsException or silent failure when clicking the button.

📸 Before/After: Visual changes apply to MedalsGui and ShopGui.

♿ Accessibility: The added lore provides clear feedback about what the button does, aiding users who might be confused by an unstyled return button.


PR created automatically by Jules for task 17341261530163962121 started by @acsoto

Co-authored-by: acsoto <59144459+acsoto@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf0ca3d8cb

ℹ️ 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".

Comment on lines +20 to +22
if (icon.getItemMeta().hasDisplayName() &&
icon.getItemMeta().getDisplayName().endsWith("返回")) {
((Player) event.getWhoClicked()).chat("/menu_shop");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match return button by exact label

Using endsWith("返回") to detect the back button means any clicked item whose display name ends with that suffix will execute /menu_shop and bypass the purchase path. In this GUI, display names are data-driven from shop items, so a legitimate item name that ends with 返回 is misclassified as navigation; this should be an exact normalized match (or a slot/material check) to avoid blocking purchases.

Useful? React with 👍 / 👎.

Comment on lines +70 to 73
if (clickedItem.hasItemMeta() &&
clickedItem.getItemMeta().hasDisplayName() &&
clickedItem.getItemMeta().getDisplayName().endsWith("返回")) {
((Player) e.getWhoClicked()).chat("/menu");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Detect medal back action without suffix matching

The back-button check now triggers on any display name that endsWith("返回"), so medals whose configured names end with that text are treated as “return” clicks and never reach setMainMedal. Because medal names come from data, this creates a real behavior regression for valid medal entries; use an exact back-button identity (or fixed slot/material) instead of suffix matching.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant