Skip to content

🎨 Palette: Prevent premature detail rendering in Meta Database - #77

Open
Gunnarguy wants to merge 1 commit into
mainfrom
ux/defer-selectbox-rendering-3538455266081987585
Open

Gunnarguy wants to merge 1 commit into
mainfrom
ux/defer-selectbox-rendering-3538455266081987585

Conversation

@Gunnarguy

@Gunnarguy Gunnarguy commented Jul 26, 2026

Copy link
Copy Markdown
Owner

💡 What: Added index=None and placeholder options to the st.selectbox dropdowns in the Unit Roster and Builds tabs of the Meta Database. Additionally wrapped the subsequent detail rendering blocks in conditionals so they only render when a user explicitly makes a selection.

🎯 Why: To improve the default empty state of these tabs. Previously, Streamlit would default to index=0, immediately rendering all the detailed metadata (stats, skills, builds) for the first hero in the list on initial load. This created a cluttered and overwhelming first impression.

♿ Accessibility/UX: The blank initial state with a helpful placeholder creates a cleaner, more intentional interface that waits for user interaction.

📸 Before/After: (Verified via screenshot in trace) Default state is now clean and empty, rather than pre-populating with "Ai" or "Elesis".


PR created automatically by Jules for task 3538455266081987585 started by @Gunnarguy

Summary by Sourcery

Improve the Meta Database unit roster and builds tabs by deferring detailed panel rendering until a user explicitly selects a hero.

New Features:

  • Add placeholders and unset default selection for unit and hero selectboxes in the Meta Database explorer UI to present a clean initial state.

Enhancements:

  • Gate unit detail and build panels behind selection checks to prevent automatic rendering for the first list entry.
  • Document the UX pattern of deferring detail rendering in Streamlit within the Jules palette file.

- Added `index=None` and placeholder strings to `st.selectbox` components in the "Unit Roster" and "Builds" tabs.
- Wrapped detailed UI rendering logic in conditional blocks (`if pick:` and `if build_hero:`) to defer rendering until explicit selection.
- Reduced initial UI clutter and improved empty states on load.

Co-authored-by: Gunnarguy <110250624+Gunnarguy@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.

Copilot AI review requested due to automatic review settings July 26, 2026 08:07
@sourcery-ai

sourcery-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Streamlit “Meta Database” UX by preventing automatic rendering of unit/build detail panels on initial load, requiring an explicit user selection instead.

Changes:

  • Updated Unit Roster and Builds tabs to use st.selectbox(index=None, placeholder=...) for a clean initial state.
  • Wrapped detail rendering blocks in selection guards to avoid rendering details before a selection is made.
  • Documented the “defer detail rendering” UX pattern in .Jules/palette.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/grandchase_meta_analyzer/explorer_app.py Adds selectbox placeholders and gates detail rendering behind selection checks in Meta Database tabs.
.Jules/palette.md Documents the Streamlit UX pattern for deferring detail rendering until user selection.
Comments suppressed due to low confidence (1)

src/grandchase_meta_analyzer/explorer_app.py:3709

  • Using if build_hero: will skip rendering when the selected hero name is a falsy string (e.g., an empty string). Since the unselected state is represented by None with index=None, check is not None instead.
            if build_hero:

st.write(f"Main: {tc1} → T3: {tt1}, T6: {tt2}")
else:
st.write("—")
if pick:
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