Bug 508519 - Give user ability to choose target size of the rendered page in Browser
Summary: Give user ability to choose target size of the rendered page in Browser
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2016-12-01 06:07 EST by Mickael Istria CLA
Modified: 2017-08-02 15:05 EDT (History)
5 users (show)

See Also:


Attachments
image: part containing a browser (24.88 KB, image/png)
2016-12-01 06:56 EST, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2016-12-01 06:07:18 EST
As a mobile web developer,
I would like to easily preview what my web page looks like on a phone.
It would be nice if the embedded Eclipse browser could allow me to set a specific target size for the rendered HTML.
Comment 1 Patrik Suzzi CLA 2016-12-01 06:56:50 EST
Created attachment 265673 [details]
image: part containing a browser

Perhaps we can contribute a part containing a control bar and a browser. So the browser can be resized based on the resolution selected by the user.
Comment 2 Mickael Istria CLA 2016-12-01 07:34:21 EST
(In reply to Patrik Suzzi from comment #1)
> Perhaps we can contribute a part containing a control bar and a browser. So
> the browser can be resized based on the resolution selected by the user.

Rather than a new part, it would be much more convenient if this could be offered as an option is the existing browser.
I can imagine this would just a new button or even context menu on the browser with "Size >" and possible value
* Fill
* The 5 most common screen sizes (https://deviceatlas.com/blog/most-popular-smartphone-screen-resolutions-2015)
* Custom... , which would prompt user for width/height.

On selection of one of those values, it might be only a matter of setting the Layout data of the Browser widget in the browser editor and to run "layout(true)" and refresh on the browser.
Comment 3 Ian Pun CLA 2017-08-02 15:05:06 EDT
@Mickael, I don't think this is as easy as to simply just change the browser layout. The correct way of testing the web application would be to spoof the user-agent so that the web application thinks that it is being received from a mobile device and also with certain dimensions.