-
Notifications
You must be signed in to change notification settings - Fork 568
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
Hide internal variants of LifeCycle from docs #826
Comments
I think hiding the docs is reasonable; my initial inclination was that it might be helpful for people who are curious about how things work. I think that prepending things with So: no strong opinions. I will not stand in the way of progress. |
I just tried the |
I think |
Also |
I've been thinking about this for the past few days due to my work on focus. I've really started favoring the This approach would keep the public enum free from clutter, especially if we wanted more of precisely targeted events like
I'm not so sure about |
Seems like a good idea.
Would make sens as well, I haven't thought to much about shortcuts tho which would require keyboard events for widgets without being focused.
At least I can't think of a use case where they would need them.
Oh, right. It's probably enough to add a warning that those enums are 'unstable' for ever.
Considering that they are never really used in an exhaustive fashion anyways adding |
I'm happy with this design. We could also hide the internal type of the enum, by doing something like, enum Event {
// ...
Internal(InternalEvent),
}
pub struct InternalEvent(InternalEventT);
enum InternalEventT {
...
} I think this is too much though; I think it's generally useful that people have access to internals if the need/want them. Escape hatches are good. |
I've been thinking about adding doc(hidden) to
RouteFocusChanged
andRouteWidgetAdded
.If I understand correctly, those are never really of interest to the user.
One disadvantage could be that they will still be completed by IDEs like Rust Analyzer, same applies however to the Debug... ones so this problem exists already.
Maybe hiding them and renaming to
InternalRouteFocusChanged
would be an option?By @cmyr:
Also adding a
LifeCycle::Internal(InternalLifeCycle)
came to my mind.The text was updated successfully, but these errors were encountered: