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

library: Add WebView entry #299

Merged
merged 4 commits into from
Jun 3, 2023
Merged

library: Add WebView entry #299

merged 4 commits into from
Jun 3, 2023

Conversation

AkshayWarrier
Copy link
Contributor

@AkshayWarrier AkshayWarrier commented Jun 1, 2023

Add WebView Entry
Closes #276

Also I would like to know, where should I include the status page for this demo - title, description, links etc. Since the webview takes up the entire window. I was thinking initially when the demo loads, we show the status page in the window and when a link is entered, the webview is shown. Wdyt?

@andyholmes
Copy link
Contributor

I was thinking initially when the demo loads, we show the status page in the window and when a link is entered, the webview is shown. Wdyt?

That sounds like a good idea. Another idea, if possible, is to demonstrate interacting with the WebView by adding the text & link for the API that way.

@sonnyp
Copy link
Contributor

sonnyp commented Jun 1, 2023

I would prefer the WebView to be immediately available (and load https://gnome.org) so there is no extra step.
It's possible to show links below regardless.

Since the webview takes up the entire window.

It doesn't have to be this way.

@AkshayWarrier AkshayWarrier requested a review from sonnyp June 2, 2023 16:33
Copy link
Contributor

@sonnyp sonnyp left a comment

Choose a reason for hiding this comment

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

Looks great.

Just a couple of things

src/Library/demos/Web View/main.blp Show resolved Hide resolved
const button_stop = workbench.builder.get_object("button_stop");
const url_bar = workbench.builder.get_object("url_bar");
const web_view = new WebKit.WebView({
zoom_level: 0.8,
Copy link
Contributor

Choose a reason for hiding this comment

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

any particular reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh it was because you couldn't really see much of the webpage because the view is small, so I decreased the zoom level. It also gave me a reason to show the property.

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting find. I can confirm it's the same with Box and append.

src/Library/demos/Web View/main.js Outdated Show resolved Hide resolved
src/Library/demos/Web View/main.js Outdated Show resolved Hide resolved
src/Library/demos/Web View/main.js Outdated Show resolved Hide resolved
src/Library/demos/Web View/main.js Outdated Show resolved Hide resolved
src/Library/demos/Web View/main.js Outdated Show resolved Hide resolved
src/Library/demos/Web View/main.json Outdated Show resolved Hide resolved
Copy link
Contributor

@sonnyp sonnyp left a comment

Choose a reason for hiding this comment

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

Well done.

I figured the reason why the webview cannot be created from Blueprint. It's a bug in Workbench, I will fix it and adjust the demo.

@sonnyp sonnyp merged commit 37d1a02 into main Jun 3, 2023
@sonnyp sonnyp deleted the akshaywarrier/webview branch June 3, 2023 18:50
sonnyp pushed a commit to krlade/Workbench that referenced this pull request Jun 3, 2023
sonnyp pushed a commit to SoNiC-HeRE/Workbench that referenced this pull request Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebView library entry
3 participants