GSoC/2018/StatusReports/AnmolGautam: Difference between revisions
Anmolgautam (talk | contribs) (added screenshot) |
Anmolgautam (talk | contribs) (added work done in week 5) |
||
Line 35: | Line 35: | ||
*<u>Added Documentation for the APIs developed till now</u>: Documentation for the API is in the form of code comments which will be generated using Kapidox, which is a wrapper for Doxygen. | *<u>Added Documentation for the APIs developed till now</u>: Documentation for the API is in the form of code comments which will be generated using Kapidox, which is a wrapper for Doxygen. | ||
For more details please visit my blog entry - [https://tarptaeya.github.io/fourth-week-of-coding-phase-gsoc18.html Fourth week of coding phase, GSoC'18] | For more details please visit my blog entry - [https://tarptaeya.github.io/fourth-week-of-coding-phase-gsoc18.html Fourth week of coding phase, GSoC'18] | ||
===Coding Phase: Week 5=== | |||
The week was totally involved in developing the GUI for QML Plugins. The follwoing APIs are developed: | |||
*<u>BrowserAction API</u>: a GUI popup button to the browser, which can be added to either Navigation Tool Bar or Status Bar or both. It consists of the properties like BrowserAction.title, BrowserAction.icon, BrowserAction.toolTip, etc. and signals like BrowserAction.clicked etc. | |||
*<u>SideBar API</u>: to add a side bar widget to the browser. It consists of properties like SideBar.title, SideBar.icon, SideBar.name, etc. | |||
Both these API use QQuickWindow for displaying GUI. BrowserAction uses it with Qt::Popup flag with requestActivate and SideBar with QWidget::createWindowContainer. Also a simple GUI ([[#BrowserAction_Button|screenshots below]]) is added to [https://cgit.kde.org/falkon.git/tree/src/scripts/helloqml?h=anmolgautam HelloQML] plugin in my [https://cgit.kde.org/falkon.git/log/?h=anmolgautam branch]. | |||
For more details please visit my blog entry [https://tarptaeya.github.io/fifth-week-of-coding-phase-gsoc18.html Fifth week of coding phase, GSoC'18] | |||
==Screenshots== | ==Screenshots== | ||
====Permissions to load plugins in Incognito==== | ====Permissions to load plugins in Incognito==== | ||
[[File:falkon_preference_gsoc_anmolgautam.svg]] | [[File:falkon_preference_gsoc_anmolgautam.svg]] | ||
====BrowserAction Button==== | |||
[[File:falkon_browser_action_button_gsoc_anmolgautam.png]] | |||
====BrowserAction Popup==== | |||
[[File:falkon_browser_action_popup_gsoc_anmolgautam.png]] | |||
====SideBar Menu==== | |||
[[File:falkon_sidebar_menu_gsoc_anmolgautam.png]] | |||
====SideBar==== | |||
[[File:falkon_sidebar_gsoc_anmolgautam.png]] | |||
==Branch where I am working== | ==Branch where I am working== | ||
https://cgit.kde.org/falkon.git/?h=anmolgautam | https://cgit.kde.org/falkon.git/?h=anmolgautam |
Revision as of 18:18, 17 June 2018
JavaScript/QML extension support in Falkon
Falkon is a web browser, previously known as Qupzilla. Falkon supports extensions but in C++ & Python. The task for the project is to integrate QJSEngine and QQmlEngine with Falkon, so that extensions can be developed using JavaScript/QML .
Mentor: David Rosca
Project Goals
Develop an API to support JavaScript/QML extension in Falkon which
- is restricted i.e. does not have access to all the browser functions contrary to C++ & Python extensions.
- is similar to WebExtension API so that most of the plugins can be ported easily to Falkon.
Work Report
Community Bonding Phase
Community bonding phase brings to me great opportunity to learn more about Falkon & KDE infrastructure. I have been in constant touch with my mentor discussing about various implementation details. In the meantime, I have been active on the Bugzilla to help fix issues and bugs. I also explored WebExtension API documented at MDN to get motivation on designing the API.
Coding Phase: Week 1
This week was mainly focussed on three things
- Enable loading/unloading of QML plugins in Falkon: QML plugins will now be loaded into Falkon from the subdirectory qml in the standard plugin paths, similar to Python plugins. Also in metadata.desktop file for plugin, the main entry file (QML) can be specified so that the plugin named X can have the entry file Y.qml.
- Adding permission to existing plugin infrastructure for allowing plugin in incognito: Plugins will now support permission to allow them in incognito mode. Also the information for plugins is moved from ini files to sql database.
- Developing QML Bookmarks API similar to WebExtension API: Bookmarks API will support standard WebExtension bookmarks API such as BookmarkTreeNode, create, get, search, remove, onChanged, etc.
For more details please visit my blog entry - First week of coding phase, GSoC'18
Coding Phase: Week 2
The week was totally involved in developing QML APIs similar to WebExtension APIs. The follwoing APIs are developed:
- TopSites API: The API to access the sites displayed in speed-dial. Consists of uncreatable type MostVisitedUrl and singleton TopSites.
- History API: The API to interact with the browser history. Consists of uncreatable type HistoryItem and singleton History.
- Cookies API: The API to interact with & set cookies. Consists of uncreatable type Cookie and singleton Cookies.
For more details please visit my blog entry - Second week of coding phase, GSoC'18
Coding Phase: Week 3
The week was totally involved in developing QML APIs which are not similar to WebExtension APIs. The follwoing APIs are developed:
- Clipboard API: The API to interact with Clipboard. This is a very short API - just with one method copy, enabling copying to clipboard by passing a JavaScript object containg text to Falkon.Clipboard.copy.
- Notifications API: The API to display desktop notifications. This is also a very short API - just with one method create, enabling creation of desktop notifications by passing a JavaScript object containg icon(url), heading and message of the notification to Falkon.Notifications.create.
- Tabs API: The API to interact with Tabs. This exposes the Falkon c++ methods of TabWidget class as singleton Falkon.Tabs and methods of WebTab class as uncreatable type Falkon.Tab.
For more details please visit my blog entry - Third week of coding phase, GSoC'18
Coding Phase: Week 4
The work done in the fourth week was quite different from the other weeks. The following work is done:
- Browser Window API, & Window Id: The methods and properties related to Browser Window are developed. It consists of uncreatable types Window, WindowState, WindowType and single Windows. Window Ids are integers starting from 0, incrementing with each window created but not decrementing with each window removed,
- Added WebView methods and properties to Tabs API:The methods and properties related to WebView are added to the Tabs API, which are developed in the third week, for eg, Tabs.showSource(), Tabs.back(), Tabs.canGoBack, etc.
- Fixed Leaks in the API: There was a major leaks in the APIs, arising because there were many temporary parentless objects created for eg in signals. Those are fixed now.
- Added Documentation for the APIs developed till now: Documentation for the API is in the form of code comments which will be generated using Kapidox, which is a wrapper for Doxygen.
For more details please visit my blog entry - Fourth week of coding phase, GSoC'18
Coding Phase: Week 5
The week was totally involved in developing the GUI for QML Plugins. The follwoing APIs are developed:
- BrowserAction API: a GUI popup button to the browser, which can be added to either Navigation Tool Bar or Status Bar or both. It consists of the properties like BrowserAction.title, BrowserAction.icon, BrowserAction.toolTip, etc. and signals like BrowserAction.clicked etc.
- SideBar API: to add a side bar widget to the browser. It consists of properties like SideBar.title, SideBar.icon, SideBar.name, etc.
Both these API use QQuickWindow for displaying GUI. BrowserAction uses it with Qt::Popup flag with requestActivate and SideBar with QWidget::createWindowContainer. Also a simple GUI (screenshots below) is added to HelloQML plugin in my branch.
For more details please visit my blog entry Fifth week of coding phase, GSoC'18
Screenshots
Permissions to load plugins in Incognito
BrowserAction Button
BrowserAction Popup
SideBar Menu
SideBar
Branch where I am working
https://cgit.kde.org/falkon.git/?h=anmolgautam
Important Links
Contact
Email [email protected]
IRC Nick tarptaeya
GitHub https://github.com/tarptaeya