-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add extended tab bar preview option #12350
Add extended tab bar preview option #12350
Conversation
e49f09d
to
69bb4df
Compare
850a64e
to
cdfee08
Compare
cdfee08
to
1584634
Compare
@vince-fugnitto I rebased on the latest master changes. Could you take another look? |
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.
The functionality seems correct from what I tested, I would like the opinion of others if possible 👍
1584634
to
ecc9ddb
Compare
@msujew Do you want to have a look? |
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 fine with the changes as well 👍
@sgraband : Could you resolve the conflict, please? |
Add functionality to render more information on tab bar hover. Also makes sure the feedback is styled be using the hoverService. This currently applies to horizontal tab bars. Right now the title and the caption will be rendered. To not remove the old behavior this feature is enabled via the setting `window.extendedTabBarPreview`. Also added possibility to specify cssClasses to be added to a hover, when requesting it from the HoverService. This way special hovers, like the extended tab bar preview, can easily be styled with CSS. Contributed on behalf of STMicroelectronics
Remove css classes after hover is disposed. Update tab bars after preference has been changed. Contributed on behalf of STMicroelectronics
Also fix potential unnecessary remove class for cssClasses. Contributed on behalf of STMicroelectronics
ecc9ddb
to
f838260
Compare
@vince-fugnitto Are you good with merging this? |
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.
LGTM 👍
Documentation for the feature introduced with eclipse-theia/theia#12350 Contributed on behalf of STMicroelectronics
Documentation for the feature introduced with eclipse-theia/theia#12350 Contributed on behalf of STMicroelectronics Co-authored-by: Philip Langer <[email protected]>
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (eclipse-theia#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes eclipse-theia#12646 Contributed on behalf of STMicroelectronics
* Add preference for visualPreview on hover Made window.tabbar.enhancedPreview an enum preference with these options: - classic: a simple unstyled preview, containing the name - enhanced: a styled preview containing title and caption (#12350) - visual: the enhanced preview + visual preview of the view Extended the hover service so that it supports the visual preview. Added the `PreviewableWidget` interface. Widgets, implementing this interface, can be previewed once they were loaded. The loaded flag is set to true when a widget is set to active. Widgets implementing the interface can specify how the preview should look like. The default is simply the node of the widget. Webviews are currently not previewable, as they raise some challenges. For example, scripts in the webviews would need to be handled/blocked. Therefore, an approach for webviews should be tackled in a follow up. Fixes #12646 Contributed on behalf of STMicroelectronics * Address review feedback Adjust changelog and preference description Contributed on behalf of STMicroelectronics * Scale previews to 16:9 aspect ratio This way the size of the previews is more uniform. If the view is wider than 16:9 the scaling is according to the width. If the view is longer than 16:9 the scaling is according to the height. The other dimension is then cropped. Contributed on behalf of STMicroelectronics * Fix small issue with hover-title and -caption css Before the two fields ignored the max-width. Contributed on behalf of STMicroelectronics * Fix preview width to 300px Contributed on behalf of STMicroelectronics * Rename div's css class Contributed on behalf of STMicroelectronics
What it does
Add functionality to render more information on tab bar hover.
Also makes sure the feedback is styled be using the hoverService.
This currently applies to horizontal tab bars.
Right now the title and the caption will be rendered.
To not remove the old behavior this feature is enabled via the setting
window.tabbar.enhancedPreview
.Also added possibility to specify cssClasses to be added to a hover, when requesting it from the HoverService.
This way special hovers, like the extended tab bar preview, can easily be styled with CSS.
Resolves #12334.
Contributed on behalf of STMicroelectronics
How to test
To test the feature:
window.tabbar.enhancedPreview
settingReview checklist
Reminder for reviewers