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

xilem: make a Pod method pub to allow creating custom buttons in an app #861

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

eugenesvk
Copy link
Contributor

I wanted to create a custom button view, but when needing to pass to the masonry type could not convert the pod to a widgetpod.
So I'd like to make this method pub to allow that

Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

Thanks! I'm looking forward to see what you create.
I do however think that all three of the methods in that impl block should be public. Would you be willing to do that in this PR?

If we're making something public, it's best practise to add documentation, even if it's just a small comment. E.g. for the method here:

  • Create the Masonry widget for this view. In most cases, you will add the return value as a child to another Masonry widget, using a method on that widget type.

@eugenesvk
Copy link
Contributor Author

Sure, can make all pub, didn't add docs because I don't fully understand the various elements of the XilemView-on-top-of-MasonryWidget architecture, so please check the description

@DJMcNab
Copy link
Member

DJMcNab commented Feb 10, 2025

Thank you! I've reworded some of the docs - my previous comment was written quickly, and reading it back revealed that it was misleading.

@DJMcNab DJMcNab enabled auto-merge February 10, 2025 10:19
@DJMcNab DJMcNab added this pull request to the merge queue Feb 10, 2025
Merged via the queue into linebender:main with commit de1d88c Feb 10, 2025
18 checks passed
@eugenesvk eugenesvk deleted the fr-pub branch February 10, 2025 11:09
github-merge-queue bot pushed a commit that referenced this pull request Feb 10, 2025
Similar to #861 this would help
creating custom elements while relying on the already used/tested
library utilities
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