Skip to content
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

Stretch factor of left column of settings panel. #2971

Closed
sccolbert opened this issue Sep 6, 2017 · 6 comments
Closed

Stretch factor of left column of settings panel. #2971

sccolbert opened this issue Sep 6, 2017 · 6 comments

Comments

@sccolbert
Copy link
Contributor

@sccolbert sccolbert commented Sep 6, 2017

I think we should set the stretch factor of the left column of the settings panel to 0, and the right column to 1, so that the left panel does not resize when expanding the outer panel as shown in the gif below:
browser

@sccolbert
Copy link
Contributor Author

@sccolbert sccolbert commented Sep 6, 2017

This is also an easy fix for a new contributor. Just adjust the stretch factors in the settings panel constructor.

@sat28
Copy link

@sat28 sat28 commented Nov 1, 2017

Hey @sccolbert I would like to work on this issue. Can you guide where to look into first hand as I am a new contributor ?
Update - I found the settings-panel constructor in settingeditor.ts

@eayoungs
Copy link

@eayoungs eayoungs commented Dec 7, 2017

Hey there @sat28 , @sccolbert ! I thought I'd take a stab at this to get oriented to the codebase.

I followed up on Shaleen's insight into the settingeditor.ts and found that the constructor is instantiating a SplitPanel object, which is subclassed from @phosphorjs > splitpanel.d.ts, where there are (2) methods.

  • function getStretch(widget: Widget): number;
  • function setStretch(widget: Widget): number;

I'm trying to call these methods on the panel object, passing in the widget for the sub-panel (settingeditor.ts ln 150, 151) but I'm not sure what the widgets are called and I'm getting this error on build:

error TS2339: Property 'setStretch' does not exist on type 'SplitPanel'

Can you confirm I'm on the right track and if so, how do I access those methods on the right object?

Thanks!

screen shot 2017-12-07 at 10 42 59 am

@sccolbert
Copy link
Contributor Author

@sccolbert sccolbert commented Dec 7, 2017

You are on the right track, however those are not methods on a split panel instance, rather they are free functions in the SplitPanel namespace. You would invoke them like so:

SplitPanel.setStretch(myWidget, value);

@eayoungs
Copy link

@eayoungs eayoungs commented Dec 8, 2017

Awesome; thanks!

@ian-r-rose
Copy link
Member

@ian-r-rose ian-r-rose commented Jun 26, 2018

Fixed by #4772

@ian-r-rose ian-r-rose closed this Jun 26, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants