Skip to content

🎨 Palette: [UX improvement] Enhance AcShop Return button#45

Closed
acsoto wants to merge 1 commit intomainfrom
palette-acshop-return-button-ux-3829840038347481722
Closed

🎨 Palette: [UX improvement] Enhance AcShop Return button#45
acsoto wants to merge 1 commit intomainfrom
palette-acshop-return-button-ux-3829840038347481722

Conversation

@acsoto
Copy link
Copy Markdown
Contributor

@acsoto acsoto commented Mar 6, 2026

💡 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's ShopGui.java. Also updated ShopListener.java to 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 ArrayIndexOutOfBoundsException which 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

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>
@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: 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("返回")) {
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 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 👍 / 👎.

@google-labs-jules
Copy link
Copy Markdown
Contributor

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