- 
                Notifications
    
You must be signed in to change notification settings  - Fork 329
 
FIX: [ISXB-1733] Prevent the Add Control Scheme popup window from expanding beyond its parent's visible area #2269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
          PR Reviewer Guide 🔍Here are some key observations to aid the review process: 
 🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent  | 
    
        
          
                Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ControlSchemesView.cs
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for adding!
          Codecov ReportAll modified and coverable lines are covered by tests ✅ @@             Coverage Diff             @@
##           develop    #2269      +/-   ##
===========================================
+ Coverage    76.70%   76.82%   +0.11%     
===========================================
  Files          465      476      +11     
  Lines        87919    88715     +796     
===========================================
+ Hits         67442    68153     +711     
- Misses       20477    20562      +85     Flags with carried forward coverage won't be shown. Click here to find out more. 
 ... and 25 files with indirect coverage changes 🚀 New features to boost your workflow:
  | 
    
| 
           In my opinion it shouldn't expand at all, I think our menus are the only ones that do that and It's weird when it expands to full width, you delete the text and it stays wide.  | 
    
| 
           While I agree with the sentiment, I think it's against the popup design: no matter what initial size I pick, if you resize the asset window, you can always resize it such that it's smaller than the pickup and the pickup is then cut. For that reason, I think that the change is kinda right in its spirit: we do need to limit the popup by the visible area.  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I'm following the reasoning to keep the expansion but It's not worth fighting over something this small, this would be an improvement either way.
I did notice one bug though: Open the Projects Settings -> ProjectWideActions -> Make the Control Scheme popup expand -> scale the Project Settings window to its minimum size -> the text is squashed. Only happens once per window being opened, you have to reopen it to reproduce the bug again
30.10.2025.-.Unity.319.mp4
| 
           Dear god, this is pretty surprising!! No idea why would the text field not repaint itself after expanding back...  | 
    
          
 It's not a big deal, clicking once inside the editor fixes it. 😄 Wouldn't mind skipping it if you decide It's not worth it  | 
    
| 
           hey @Pauliusd01, I think what you found is a minor UI Toolkit issue, it's not in our package. It doesn't repro for me on a Mac in Unity 6000.0.49 Wonder if we could allow this change with the refresh defect that is likely to be fixed elsewhere.  | 
    
          
 I'm fine with ignoring it then  | 
    
| { | ||
| text = "Add Control Scheme", | ||
| style = { position = new StyleEnum<Position>(Position.Absolute) } | ||
| style = { position = new StyleEnum<Position>(Position.Absolute), maxWidth = new StyleLength(new Length(100, LengthUnit.Percent)) } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw this already got merged, but I wonder if the right thing to do here was to constrain the window, wasn't it the text input field that was supposed to be constrained in size?

Description
Before this change we had a minor problem where the Add Control Scheme popup window would be allowed to expand infinitely to fit its content. Addressing it by limiting the popup to only what the parent window can fit.
Testing status & QA
Local testing, pending a QA pass on it.
Overall Product Risks
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.After merge: