-
Notifications
You must be signed in to change notification settings - Fork 318
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
Register Views before creating them #3181
Conversation
It's an internal, private component/widget; not expected to have shortcuts
The component is currently presumed to be an internal widget, and doesn't have keyboard shortcuts. Also, its use is currently not well aligned with the claimed "CloseButton" label, as it's also used in function of a "fullscreen button". The decision can be revisited in future if a different understanding is reached.
// NOTE: if implementing a different specialization of ListView, make sure to change the label | ||
// appropriately so that 'register' would properly differentiate shortcuts etc. |
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 if this comment is right. First, I'm not sure what is a different specialization - Rust does not have specializations in c++ style. And the entry does not affect the way the shortcut are handled, so it fact each ListView should have the same label.
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.
Indeed. Now that I think of it, if guidelines should be provided anywhere, I'd rather expect to see them in View trait's docs, forming a part of the trait's contract description. With that said, I'm more than happy to remove it from here. It's not however clear to me what are the rules around the various methods of View, so I don't currently feel confident to be adding docs to View.
Do you think it'd be ok for me to just remove this comment here, or would you suggest I try adding comments in View, or somewhere else?
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 ok with just removing it.
Pull Request Description
Make sure components implementing the
View
trait are registered inview::Registry
, so that their keyboard shortcuts can be displayed to the user in a help window immediately after the IDE is started.Fixes #3093.
Important Notes
View
trait, were also tracked and case-by-case decisions taken to make sure appropriate registering behavior is performed; in particular:?is_in_cloud=true
)new_view
; it was used in 2 separate specializations & places as "close button" and "fullscreen button"; it had no keyboard shortcuts; a decision as of now was made to de-View it, with a possibility to reconsider in future if the understanding of its situation changes/develops)Checklist
Please include the following checklist in your PR: