After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658925 - Add interactive icon generation for web application.
Add interactive icon generation for web application.
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Web Applications
git master
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 660758 672982 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-13 14:28 UTC by Alexandre Mazari
Modified: 2018-03-30 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add interactive icon generation for web application. (70.63 KB, patch)
2011-09-13 14:28 UTC, Alexandre Mazari
none Details | Review
Generalize and extract widget screengrabbing from EphyWebView. (8.25 KB, patch)
2011-09-15 14:14 UTC, Alexandre Mazari
none Details | Review
Add DOM helpers for attributes manipulation. (4.89 KB, patch)
2011-09-15 14:14 UTC, Alexandre Mazari
none Details | Review
Get the title text entry only once. (2.03 KB, patch)
2011-09-15 14:14 UTC, Alexandre Mazari
none Details | Review
Move the existence checking logic for webapp from window-commands to web-apps-utils. (2.64 KB, patch)
2011-09-15 14:14 UTC, Alexandre Mazari
none Details | Review
Modify web app saving callback by removing some indentation levels. (4.28 KB, patch)
2011-09-15 14:14 UTC, Alexandre Mazari
none Details | Review
Extract notification sending from save_as function. (3.07 KB, patch)
2011-09-15 14:15 UTC, Alexandre Mazari
none Details | Review
Avoid passing the webview low on the stack. (4.90 KB, patch)
2011-09-15 14:15 UTC, Alexandre Mazari
committed Details | Review
Interactive web application icons generation. (57.45 KB, patch)
2011-09-15 14:15 UTC, Alexandre Mazari
none Details | Review
Make web application persisting and deleteing atomic. Handle case where application is in incoherent state (basicaly deleting everything) Intruduce a service for handling web application Bubbling up GError from WebApplicationService Port Io to GIO (45.88 KB, patch)
2011-09-23 14:58 UTC, Alexandre Mazari
none Details | Review
Overhaul web application service; (127.47 KB, patch)
2011-09-28 17:39 UTC, Alexandre Mazari
none Details | Review
window-commands: get app name only once (2.47 KB, patch)
2012-03-28 18:39 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
e-web-app-utils: add ephy_web_application_exists (2.52 KB, patch)
2012-03-28 19:12 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Alexandre Mazari 2011-09-13 14:28:01 UTC
Add an interactive icon template from web applications. The screengrab can be
panned within the svg template.
Icons for every size is generated.

Tech:
- use a webview for icon preview
- move widget screengrabbing logic into lib/ephy-screenshot.c/.h and make
it generic
- rework web application saving
- add the ephy_web_application_exists method
- add lib/ephy-dom-manipulation.c/.h with facilities to fiddle with dom
elements attributes.
Comment 1 Alexandre Mazari 2011-09-13 14:28:04 UTC
Created attachment 196383 [details] [review]
Add interactive icon generation for web application.
Comment 2 Claudio Saavedra 2011-09-13 17:22:59 UTC
I had a quick look, not much but I guess a bit of feedback in an early stage is not a bad thing:

- I didn't understand the interaction very much. I see it's possible to move around the webpage in the preview in order to find something suitable for the icon. But can I also shrink or expand the preview to fit something bigger/smaller in the preview?

- The black background color looks a bit alien. Maybe you should try to get some feedback from the designers on how this should look.

- While you drag the mouse the cursor changes to the "I-beam" pointer. Maybe the drag one would suit better.

- I got stuff like this, afterwards ephy got very sluggish:
 (epiphany:31629): GLib-GIO-CRITICAL **: g_app_info_launch: assertion `G_IS_APP_INFO (appinfo)' failed
*** glibc detected *** epiphany: malloc(): smallbin double linked list corrupted: 0x0000000001426e10 ***

- The cancel button doesn't work.

- I think you could split the patch in different ones so that it's easier to review. For instance, the rework of web application saving could be one, the methods you add to ephy-web-application-utils another one, the new API for dom maniupulation the next one, and so on.
Comment 3 Alexandre Mazari 2011-09-13 17:37:55 UTC
Hi Claudio,
Thanks for the review. As you noted, this is far from being commitable, just wanted
to get some early feedback like yours.

(In reply to comment #2)
> I had a quick look, not much but I guess a bit of feedback in an early stage is
> not a bad thing:
> 
> - I didn't understand the interaction very much. I see it's possible to move
> around the webpage in the preview in order to find something suitable for the
> icon. But can I also shrink or expand the preview to fit something
> bigger/smaller in the preview?

The intended interaction is to make the screengrab of the web app pannable, so the user can choose a realy distinguishing part of the website as the background of the
icon.
We might add a zooming factor if that is what you are referring to. In that case the
current approach might prove to pixelled or blurred... I'll try to see if we can fit an iframe with actual content instead of a screenshot.

> 
> - The black background color looks a bit alien. Maybe you should try to get
> some feedback from the designers on how this should look.

Yep, this is a side effect of making the webview transparent. The alpa is way of. Maybe I need to put a GtkFrame behind to have our lovely grey back :)

> 
> - While you drag the mouse the cursor changes to the "I-beam" pointer. Maybe
> the drag one would suit better.
> 

Yeah, I need to fix that up in the js. Also the stacking of the svg elements sometime steal the mouse event somehow.

> - I got stuff like this, afterwards ephy got very sluggish:
>  (epiphany:31629): GLib-GIO-CRITICAL **: g_app_info_launch: assertion
> `G_IS_APP_INFO (appinfo)' failed
> *** glibc detected *** epiphany: malloc(): smallbin double linked list
> corrupted: 0x0000000001426e10 ***
> 

Could you provide a stacktrace ?

> - The cancel button doesn't work.

I think it never did since the introduction of the feature.

> - I think you could split the patch in different ones so that it's easier to
> review. For instance, the rework of web application saving could be one, the
> methods you add to ephy-web-application-utils another one, the new API for dom
> maniupulation the next one, and so on.

Well the refactoring part of the saving method should indeed go in a separate patch. Not sure about the dom part, as it has currently no other use than this patch.
Also after this patch I'd like to put all the web app dialog code in its own file, windows-commands is frithening as-is. (most of its code should go in GtkAction anyway, IMHO).

Happy coding!
Comment 4 Alexandre Mazari 2011-09-15 14:14:27 UTC
Created attachment 196629 [details] [review]
Generalize and extract widget screengrabbing from EphyWebView.
Comment 5 Alexandre Mazari 2011-09-15 14:14:35 UTC
Created attachment 196631 [details] [review]
Add DOM helpers for attributes manipulation.
Comment 6 Alexandre Mazari 2011-09-15 14:14:44 UTC
Created attachment 196632 [details] [review]
Get the title text entry only once.
Comment 7 Alexandre Mazari 2011-09-15 14:14:51 UTC
Created attachment 196633 [details] [review]
Move the existence checking logic for webapp from window-commands to web-apps-utils.
Comment 8 Alexandre Mazari 2011-09-15 14:14:59 UTC
Created attachment 196634 [details] [review]
Modify web app saving callback by removing some indentation levels.
Comment 9 Alexandre Mazari 2011-09-15 14:15:07 UTC
Created attachment 196635 [details] [review]
Extract notification sending from save_as function.
Comment 10 Alexandre Mazari 2011-09-15 14:15:16 UTC
Created attachment 196636 [details] [review]
Avoid passing the webview low on the stack.
Comment 11 Alexandre Mazari 2011-09-15 14:15:24 UTC
Created attachment 196637 [details] [review]
Interactive web application icons generation.
Comment 12 Alexandre Mazari 2011-09-15 14:18:05 UTC
Current state: 
http://people.igalia.com/amazari/ephy-create-webapp-icon-svg.webm
Comment 13 Alexandre Mazari 2011-09-16 07:53:29 UTC
Some note:

updated:
- broke the patch in severals bits
- small updates to the svg

todo:
- fix icons not showing in the shell. Is putting the icons in the right XDG icon dir enough ? Doesn't seem so :(
- hide most of the webview, showing only a 256x256 rectangle
- make the bg gray
- improve the dialog design with lapo's help

like-to-do:
- extract the webapp dialog into a separate file (window-commands.c) is too huge IMHO
- make web-app-utils a proper GObject WebApplication class.
Comment 14 Alexandre Mazari 2011-09-23 14:58:20 UTC
Created attachment 197356 [details] [review]
Make web application persisting and deleteing atomic. Handle case where application is in incoherent state (basicaly deleting everything) Intruduce a service for handling web application Bubbling up GError from WebApplicationService Port Io to GIO
Comment 15 Alexandre Mazari 2011-09-28 17:39:41 UTC
Created attachment 197690 [details] [review]
Overhaul web application service;

Make web application persisting and deleteing atomic.
Watch web application container dir.
Handle case where application is in incoherent state (basicaly deleting everything).
Introduce a service for handling web application Bubbling up GError from WebApplicationService.
Port Io to GIO
Comment 16 Alexandre Mazari 2011-09-28 17:41:31 UTC
Additionally this patch adds test-cases for the newly introduced web application service.
Comment 17 Claudio Saavedra 2011-10-03 12:01:47 UTC
*** Bug 660758 has been marked as a duplicate of this bug. ***
Comment 18 Xan Lopez 2012-03-28 17:59:33 UTC
Review of attachment 196636 [details] [review]:

Just pushed this to master with a small change, thanks!
Comment 19 Diego Escalante Urrelo (not reading bugmail) 2012-03-28 18:03:31 UTC
*** Bug 672982 has been marked as a duplicate of this bug. ***
Comment 20 Diego Escalante Urrelo (not reading bugmail) 2012-03-28 18:39:54 UTC
Created attachment 210800 [details] [review]
window-commands: get app name only once

Avoid multiple calls to gtk_entry_get_text.

Signed-off-by: Diego Escalante Urrelo <diegoe@igalia.com>
--

Updated to apply to master.
Comment 21 Diego Escalante Urrelo (not reading bugmail) 2012-03-28 19:12:18 UTC
Created attachment 210808 [details] [review]
e-web-app-utils: add ephy_web_application_exists

Signed-off-by: Diego Escalante Urrelo <diegoe@igalia.com>
--

Updated to master.
Comment 22 Xan Lopez 2012-03-30 21:33:02 UTC
Review of attachment 210800 [details] [review]:

OK.
Comment 23 Xan Lopez 2012-03-30 21:34:31 UTC
Review of attachment 210808 [details] [review]:

Looks good.

::: embed/ephy-web-app-utils.c
@@ +467,3 @@
+/**
+ * ephy_web_application_exists:
+ * @name: the name of the web application

Nitpick, but I'd say "the potential name".

@@ +469,3 @@
+ * @name: the name of the web application
+ *
+ * Returns: whether an application with the same @name exists.

"whether an application with @name exists".
Comment 24 Diego Escalante Urrelo (not reading bugmail) 2012-03-31 01:43:06 UTC
Attachment 210800 [details] pushed as c07d767 - window-commands: get app name only once
Attachment 210808 [details] pushed as 2ef933e - e-web-app-utils: add ephy_web_application_exists
Comment 25 Xan Lopez 2013-02-16 11:52:22 UTC
I think it would be good to have this, but by now the patches need to be updated to git master. So marking os obsolete, and hopefully we'll get at it soon.
Comment 26 Michael Catanzaro 2018-03-25 17:44:33 UTC
This is a mass NEEDINFO of all Epiphany bugs with no activity in the past three years. I'm going to be automatically closing old bugs to help us focus on current problems. If you feel this bug is still relevant with Epiphany 3.26 or newer, then please leave any comment here so that I know not to close this one.
Comment 27 Michael Catanzaro 2018-03-30 16:24:31 UTC
This is a mass-close of old bugs currently in the NEEDINFO state.

If you think this bug is still relevant, please leave a comment.