🎨 Palette: Improve UI discoverability with disabled button states - #3
🎨 Palette: Improve UI discoverability with disabled button states#3devdudumuniz wants to merge 1 commit into
Conversation
* Change the `add_to_queue` button in `pysus/web/pages/1_client.py` to always render, but with `disabled=not selected_indices` instead of conditionally hiding it `if selected_indices and st.button(...)`. * Change the `remove` button in `pysus/web/pages/1_client.py` to always render, but with `disabled=not remove_indices` instead of conditionally hiding it `if remove_indices and st.button(...)`. * Change the `clear` button in `pysus/web/pages/1_client.py` to always render, but with `disabled=not download_queue`. * Change the `download` button in `pysus/web/pages/1_client.py` to always render, but with `disabled=not download_queue`. * This prevents layout shifts (buttons suddenly appearing/disappearing) and makes the UI actions more discoverable, providing a better user experience.
|
👋 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. |
|
Superseded by the reviewed and validated upstream contribution AlertaDengue#338. |
Understood. Acknowledging that this work is superseded by upstream PR AlertaDengue#338 and stopping work on this task. |
💡 What: Replaced conditionally rendered buttons (Add to queue, Remove, Clear, Download) with always-rendered buttons using
disabledstate when actions are invalid.🎯 Why: Hiding buttons when there's no selection or queue causes layout shifts and hides functionality from users until they take specific actions. Disabling them instead provides better discoverability of available features and stabilizes the layout.
📸 Before/After: The buttons are now always visible on the UI, but grayed out/unclickable until appropriate rows are selected or data is available in the queue.
♿ Accessibility: Prevents focus loss and layout jumps that can be disorienting for keyboard and screen reader users.
PR created automatically by Jules for task 11336515273531266948 started by @devdudumuniz