-
Notifications
You must be signed in to change notification settings - Fork 60
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
ResponsiveCanvasObject interface + object hiding #59
ResponsiveCanvasObject interface + object hiding #59
Conversation
I don't think the concept of "ResponsiveCanvasObject" works - only widgets can be extended. |
@andydotxyz I don't know the details, but it works :)
The behavior is what I would expect too. The details in my table row hide when I shrink the window |
By the way, I'm building widgets and layouts with the goal to get to https://react-bootstrap-table.github.io/react-bootstrap-table2/. I've been breaking them into separate PRs as I slowly build them out. If you have a different approach to managing PRs, let me know. |
I'm not sure that the code sample shows usage of the |
Changed it to extending Widget. Maybe that's better |
Thanks. What I am curious about is whether this has to be tied to window size? It breaks the container model we use everywhere else. |
https://github.com/fyne-io/fyne-x/blob/master/layout/responsive.go#L112 It's in the existing code. I didn't like it either, but didn't want to break your existing functionality. |
OK, I guess that's a fair point, but it was an internal detail before, but with this interface method you force it into the public API: HandleResize(newPos fyne.Position, windowSize, containerSize fyne.Size) |
Can you please take a look on #79 PR @aodhan-domhnaill? I made a few fixes that makes the Responsive Layouts a bit more flexible. It's now a container with Layout, and I already tried with custom widgets and container injections. It must fix what you mean here. Thanks a lot for your tests and help. |
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.
I'm not sure why this change introduces so many new API. Also it seems to move the container layout logic into widgets which isn't how containers generally work.
Perhaps @metal3d can comment on the general idea of hiding at thresholds and how it fits into responsive overall, but this implementation feels like it may not be the best way?
Closing in favor of #79 |
Two changes,
First two are self explanatory. The hiding behavior is something that I personally wanted so I can have a "summary/detail" view in a table widget I will am working on.
Let me know if you think I should move the hiding behavior out into another interface.