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

Provide widgets IDs to Operation::container #1695

Merged
merged 4 commits into from
Feb 16, 2023

Conversation

nicksenger
Copy link
Contributor

Use of operation::scoped requires a widget which provides its ID to Operation::container. Currently none of the provided container widgets do this, so using scoped operations requires implementation of a custom widget. This PR adds the option to provide an ID to each container widget that doesn't have it already (button, container, row, column, pane grid) and provides this ID to Operation::container in Widget::operate.

@nicksenger nicksenger changed the title Provide widgets IDs to operation.container Provide widgets IDs to Operation::container Feb 10, 2023
@hecrj hecrj added bug Something isn't working widget labels Feb 10, 2023
@hecrj hecrj added this to the 0.8.0 milestone Feb 10, 2023
@hecrj hecrj added the feature New feature or request label Feb 10, 2023
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

I wonder if we could just get away with adding the id to just the Container widget?

@tarkah
Copy link
Member

tarkah commented Feb 10, 2023

I wonder if we could just get away with adding the id to just the Container widget?

I agree with this. Wrap whatever with a Container if you need to use scoped

@nicksenger
Copy link
Contributor Author

Sounds good, I cut this down to just the container 👍

Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Great! I have rebased and dropped 63cfec6, since Scrollable already has an Id and it makes sense to provide it.

@hecrj hecrj merged commit e3fbaed into iced-rs:master Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature New feature or request widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants