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

Add a size method to UpdateCtx and LifeCycleCtx. #917

Merged
merged 3 commits into from
May 11, 2020
Merged

Add a size method to UpdateCtx and LifeCycleCtx. #917

merged 3 commits into from
May 11, 2020

Conversation

jneem
Copy link
Collaborator

@jneem jneem commented May 11, 2020

I found myself needing this, for a widget that wants to update its internal state based on changes to data, but needs the size to do so (think of something like a scroll bar, whose state depends on the viewport size).

More generally, is there a rationale somewhere for which contexts have which functions? For example, I see that LifeCycleCtx is also missing size...

Copy link
Collaborator

@luleyleo luleyleo left a comment

Choose a reason for hiding this comment

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

As far as I know, the current rational is "we add it when we need it".

@xStrom
Copy link
Member

xStrom commented May 11, 2020

Yeah I think this is something that's fine to have on LifeCycleCtx as well. Feel free to add it as well, or say if you would prefer to just have this merged.

@xStrom xStrom added the S-waiting-on-author waits for changes from the submitter label May 11, 2020
@jneem
Copy link
Collaborator Author

jneem commented May 11, 2020

Ok, I just added it to LifeCycleCtx as well.

Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

Thanks!

@xStrom xStrom removed the S-waiting-on-author waits for changes from the submitter label May 11, 2020
@xStrom xStrom changed the title Add a size method to UpdateCtx. Add a size method to UpdateCtx and LifeCycleCtx. May 11, 2020
@xStrom xStrom merged commit f666974 into linebender:master May 11, 2020
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.

None yet

3 participants