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

Add preference for visualPreview on hover #83

Closed
wants to merge 1 commit into from
Closed

Conversation

sgraband
Copy link

@sgraband sgraband commented Jun 22, 2023

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 (Add extended tab bar preview option eclipse-theia/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

What it does

How to test

Review checklist

Reminder for reviewers

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
Copy link

@rschnekenbu rschnekenbu left a comment

Choose a reason for hiding this comment

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

That looks good to me!
I tested changing color theme, changing preview preferences, etc. Code seems clean as far as I can say.

@sgraband
Copy link
Author

Closed for upstream PR: eclipse-theia#12648

@sgraband sgraband closed this Jun 22, 2023
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.

Provide visual preview for widgets
2 participants