Skip to content

ADFA-6371: Make the selected toggle button visible in new-file dialogs - #2102

Open
Daniel-ADFA wants to merge 1 commit into
stagefrom
bugfix/ADFA-6371-toggle-selection-visibility
Open

Daniel-ADFA wants to merge 1 commit into
stagefrom
bugfix/ADFA-6371-toggle-selection-visibility

Conversation

@Daniel-ADFA

@Daniel-ADFA Daniel-ADFA commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

ADFA-6371

Selected toggle buttons were filled with colorSecondaryContainer (#E8E8E8 on a #EDEDED dialog) with unchanged text, so picking Kotlin or a class type showed no change. The theme's materialButtonOutlinedStyle now fills checked buttons with colorPrimary and uses colorOnPrimary for text and icon; unchecked and non-toggle buttons keep Material's colours. The Class icon now follows the selected language.

Set at theme level, so the C/C++ dialog in #2101 picks it up too. Not yet checked on device.

Material 3 fills a checked outlined button with colorSecondaryContainer,
which the theme sets to #E8E8E8 on a #EDEDED dialog, and keeps the text
colour, so selecting Kotlin or a class type showed no change. The theme
now points materialButtonOutlinedStyle at a style that fills checked
buttons with colorPrimary and draws their text and icon in
colorOnPrimary; unchecked and non-toggle buttons keep Material's colours.

The Class button also switches to the Kotlin icon when Kotlin is picked.

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 7dca8f0f-9aee-4b61-8bf9-621463719b53
📥 Commits

Reviewing files that changed from the base of the PR and between 29a6418 and 7f3ca1f.

📒 Files selected for processing (4)
  • app/src/main/java/com/itsaky/androidide/actions/filetree/NewFileAction.kt
  • resources/src/main/res/color/button_outlined_background_selector.xml
  • resources/src/main/res/color/button_outlined_foreground_selector.xml
  • resources/src/main/res/values/styles.xml

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Summary
  • Checked outlined toggle buttons now use colorPrimary for the background and colorOnPrimary for text and icons. The styled theme applies this to outlined buttons.
  • In the new Java/Kotlin file dialog, the Class button icon changes to Kotlin when Kotlin is selected and to Java otherwise.
  • Risk: The change has not yet been checked on device.

Walkthrough

The file dialog updates its class-type icon based on the selected language. The styled theme adds an outlined-button style with state-based background, text, and icon colors.

Changes

File dialog icon

Layer / File(s) Summary
Language-based icon update
app/src/main/java/com/itsaky/androidide/actions/filetree/NewFileAction.kt
A language-selection listener sets the class-type icon to Kotlin when Kotlin is selected and to Java otherwise.

Outlined button theme

Layer / File(s) Summary
Outlined-button colors and style
resources/src/main/res/color/button_outlined_background_selector.xml, resources/src/main/res/color/button_outlined_foreground_selector.xml, resources/src/main/res/values/styles.xml
The styled theme applies a Material 3 outlined-button style with state-based background, text, and icon tints.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: dara-abijo-adfa

Merge Risk: ⚪ Minimal · up to 7f3ca

The icon follows the selected language, and unchecked outlined buttons retain their Material colors. No identified issue remains that should delay merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: making selected toggle buttons visible in new-file dialogs.
Description check ✅ Passed The description explains the outlined-button styling changes and the Class icon update, which match the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit spots Kotlin, then Java in view,
The class icon changes with each choice anew.
Outlined buttons gain colors that shift,
When checked or disabled, their shades gently lift.
The rabbit hops off with a bright button glow.

Comment @coderabbitai help to get the list of available commands.

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