Skip to content

in gui.yml can you simplify the config filter and srt from the # Spawner List GUI filter: button: name: '&#00F986ꜰɪʟᴛᴇʀ sᴘᴀᴡɴᴇʀs' lore: - '%all_color%• ᴀʟʟ' - '%active_color%• ᴀᴄᴛɪᴠᴇ' - '%inactive_color%• ɪɴᴀᴄᴛɪᴠᴇ' - ...#36

Merged
ptthanh02 merged 2 commits intomainfrom
copilot/fix-9063fa06-6478-4b23-8f69-48f5a20acdab
Oct 3, 2025

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 3, 2025

  • Analyze current filter and sort configuration structure in gui.yml
  • Understand the Java code implementation in ListSubCommand.java
  • Review the reference sort_items_button pattern in storage GUI
  • Simplify filter configuration to use selected_option/unselected_option pattern
  • Simplify sort configuration to use selected_option/unselected_option pattern
  • Update ListSubCommand.java to use the new configuration pattern
  • Update all language files (en_US, de_DE, vi_VN, DonutSMP) with the new pattern
  • Validate YAML syntax and configuration structure
  • Verify code changes produce identical visual results

Summary

Successfully simplified filter and sort configurations in gui.yml to match the cleaner pattern used by sort_items_button in storage GUI. This reduces configuration complexity from ~15 lines to ~9 lines per control type while maintaining the same visual appearance.

Changes:

  • Old approach: Used separate color entries for each option with multiple placeholders (%all_color%, %active_color%, etc.)
  • New approach: Uses format strings (selected_option, unselected_option) with a single %available_options% placeholder

Benefits:

✅ Cleaner, more maintainable configuration
✅ Consistent with existing storage GUI pattern
✅ Easier to translate and customize
✅ Reduced from ~91 to ~74 lines total across all files

Original prompt

in gui.yml can you simplify the config filter and srt from the # Spawner List GUI

filter:
button:
name: '&#00F986ꜰɪʟᴛᴇʀ sᴘᴀᴡɴᴇʀs'
lore:
- '%all_color%• ᴀʟʟ'
- '%active_color%• ᴀᴄᴛɪᴠᴇ'
- '%inactive_color%• ɪɴᴀᴄᴛɪᴠᴇ'
- ''
- '&#00F986⊳ &#f8f8ffᴄʟɪᴄᴋ ᴛᴏ ꜰɪʟᴛᴇʀ'
all:
color: '&#00F986'
active:
color: '&a'
inactive:
color: '&#ff5252'

sort:
button:
name: '&#00F986ꜱᴏʀᴛ ꜱᴘᴀᴡɴᴇʀꜱ'
lore:
- '%default_color%• ᴅᴇꜰᴀᴜʟᴛ (ɪᴅ)'
- '%stack_size_desc_color%• ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↓)'
- '%stack_size_asc_color%• ꜱᴛᴀᴄᴋ ꜱɪᴢᴇ (↑)'
- ''
- '&#00F986⊳ &#f8f8ffᴄʟɪᴄᴋ ᴛᴏ ꜱᴏʀᴛ'
default:
color: '&#00F986'
stack_size_asc:
color: '&#00F986'
stack_size_desc:
color: '&#00F986'

you can view reference for the sort button in storage gui

sort_items_button:
name: '&#00F986ꜱᴏʀᴛ ɪᴛᴇᴍꜱ'
lore:
- '%available_items%'
- ''
- '&#00F986⊳ &#f8f8ffᴄʟɪᴄᴋ ᴛᴏ ꜱᴏʀᴛ'
selected_item: '&#00F986• %item_name%'
unselected_item: '&#f8f8ff• %item_name%'
no_item: '&#bdc3c7• None'

for more clean and consistency


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@ptthanh02 ptthanh02 marked this pull request as ready for review October 3, 2025 16:18
Co-authored-by: ptthanh02 <73684260+ptthanh02@users.noreply.github.com>
@ptthanh02 ptthanh02 merged commit b39ac63 into main Oct 3, 2025
2 checks passed
@ptthanh02 ptthanh02 deleted the copilot/fix-9063fa06-6478-4b23-8f69-48f5a20acdab branch October 3, 2025 16:27
Copilot AI requested a review from ptthanh02 October 3, 2025 16:28
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.

2 participants