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 785675 - Use ui template for ProcessRow, SubProcessSubRow and SubProcessListBox
Use ui template for ProcessRow, SubProcessSubRow and SubProcessListBox
Status: RESOLVED OBSOLETE
Product: gnome-usage
Classification: Other
Component: performance
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Usage maintainer(s)
GNOME Usage maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-08-01 09:43 UTC by Petr Štětka
Modified: 2017-11-24 13:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
process-list: Add ui template & better refreshing (30.25 KB, patch)
2017-08-01 09:44 UTC, Petr Štětka
none Details | Review
Splitted patches to 4 commits. (7.03 KB, patch)
2017-08-04 10:25 UTC, Petr Štětka
none Details | Review
sub-process-list-box: Port to Gtk+ widget template (5.40 KB, patch)
2017-08-04 10:25 UTC, Petr Štětka
none Details | Review
process-row: Port to Gtk+ widget template (11.13 KB, patch)
2017-08-04 10:26 UTC, Petr Štětka
none Details | Review
process-list: Better refreshing process list (13.25 KB, patch)
2017-08-04 10:26 UTC, Petr Štětka
none Details | Review
sub-process-sub-row: Port to Gtk+ widget template (7.03 KB, patch)
2017-08-04 10:27 UTC, Petr Štětka
none Details | Review
sub-process-sub-row: Port to Gtk+ widget template (7.03 KB, patch)
2017-09-21 11:30 UTC, Petr Štětka
none Details | Review
sub-process-list-box: Port to Gtk+ widget template (5.40 KB, patch)
2017-09-21 11:31 UTC, Petr Štětka
none Details | Review
process-row: Port to Gtk+ widget template (11.13 KB, patch)
2017-09-21 11:31 UTC, Petr Štětka
none Details | Review
process-list: Better refreshing process list (13.25 KB, patch)
2017-09-21 11:36 UTC, Petr Štětka
none Details | Review
css-styling: Update css for better support others themes (10.61 KB, patch)
2017-09-21 11:36 UTC, Petr Štětka
none Details | Review
sub-process-sub-row: Port to Gtk+ widget template (8.44 KB, patch)
2017-09-26 13:49 UTC, Petr Štětka
none Details | Review
sub-process-list-box: Port to Gtk+ widget template (5.40 KB, patch)
2017-09-26 13:50 UTC, Petr Štětka
none Details | Review
process-row: Port to Gtk+ widget template (14.14 KB, patch)
2017-09-26 13:50 UTC, Petr Štětka
none Details | Review
process-list: Better refreshing process list (9.08 KB, patch)
2017-09-26 13:50 UTC, Petr Štětka
none Details | Review
css-styling: Update css for better support others themes (9.59 KB, patch)
2017-09-26 13:50 UTC, Petr Štětka
none Details | Review
sub-process-sub-row: Port to Gtk+ widget template (6.66 KB, patch)
2017-10-24 14:14 UTC, Petr Štětka
committed Details | Review
sub-process-list-box: Port to Gtk+ widget template (5.33 KB, patch)
2017-10-24 14:14 UTC, Petr Štětka
committed Details | Review
process-row: Port to Gtk+ widget template (12.40 KB, patch)
2017-10-24 14:14 UTC, Petr Štětka
committed Details | Review
process-list: Better refreshing process list (9.08 KB, patch)
2017-10-24 14:15 UTC, Petr Štětka
none Details | Review

Description Petr Štětka 2017-08-01 09:43:28 UTC
Add ui template for ProcessRow, SubProcessSubRow and SubProcessListBox.
Comment 1 Petr Štětka 2017-08-01 09:44:16 UTC
Created attachment 356705 [details] [review]
process-list: Add ui template & better refreshing

Add ui template for ProcessRow, SubProcessSubRow and SubProcessListBox.
This do better refreshing SubProcessListBox too.
Comment 2 Felipe Borges 2017-08-01 15:34:26 UTC
Review of attachment 356705 [details] [review]:

Make multiple patches.

Each one of ProcessRow, SubProcessSubRow, SubProcessListBox could be its own patch.

The refreshing bit should be another one.

The more patches the better. Try to make the changes as small as possible, so we can later git blame the patches.
Comment 3 Petr Štětka 2017-08-04 10:25:16 UTC
Created attachment 356931 [details] [review]
Splitted patches to 4 commits.
Comment 4 Petr Štětka 2017-08-04 10:25:51 UTC
Created attachment 356932 [details] [review]
sub-process-list-box: Port to Gtk+ widget template
Comment 5 Petr Štětka 2017-08-04 10:26:03 UTC
Created attachment 356933 [details] [review]
process-row: Port to Gtk+ widget template
Comment 6 Petr Štětka 2017-08-04 10:26:15 UTC
Created attachment 356934 [details] [review]
process-list: Better refreshing process list

We need more frequent refreshing process list for example for disk i/o.
For better controllability we refreshing all list with processes every 5sec.
But list with subprocesses and values in process-row/sub-row every 1sec.
Comment 7 Petr Štětka 2017-08-04 10:27:32 UTC
Created attachment 356935 [details] [review]
sub-process-sub-row: Port to Gtk+ widget template
Comment 8 Petr Štětka 2017-08-04 10:28:20 UTC
Splitted patches to 4 commits.
Comment 9 Felipe Borges 2017-09-12 12:31:59 UTC
Review of attachment 356932 [details] [review]:

This patch doesn't seem to apply any longer. Could you please rebase it?

::: data/ui/sub-process-list-box.ui
@@ +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="3.10"/>

Use <!-- interface-requires gtk+ 3.10 --> instead.

::: src/sub-process-list-box.vala
@@ +39,3 @@
+        }
+
+        public void init(Process process, ProcessListBoxType type)

I would expect that you'd be able to run this block within the construction method somehow (despite the gtk+ composite template).
Comment 10 Felipe Borges 2017-09-12 12:36:12 UTC
Review of attachment 356933 [details] [review]:

Thanks for your patch!

::: data/interface/adwaita-dark.css
@@ +29,3 @@
 
+ProcessRow.opened:hover {
+    background: #4d5356;

Have you tested Usage with the dark variant or other themes to see whether these colors work just fine?

Can't we get these from the theme somehow?

Check the constants defined at gtk+/gtk/theme/Adwaita/_colors-public.scss

::: src/process-row.vala
@@ +53,3 @@
+        class construct
+        {
+            }

This could also be defined in the .ui file.
Comment 11 Felipe Borges 2017-09-12 12:37:19 UTC
The comments regarding the first two patches also apply to the other two. Could you please address them all and re-attach?

Thanks Petr!
Comment 12 Petr Štětka 2017-09-21 11:30:59 UTC
Created attachment 360179 [details] [review]
sub-process-sub-row: Port to Gtk+ widget template

Use <!-- interface-requires gtk+ 3.10 --> instead of <requires lib="gtk+" version="3.10"/>
Comment 13 Petr Štětka 2017-09-21 11:31:22 UTC
Created attachment 360180 [details] [review]
sub-process-list-box: Port to Gtk+ widget template

Use <!-- interface-requires gtk+ 3.10 --> instead of <requires lib="gtk+" version="3.10"/>
Comment 14 Petr Štětka 2017-09-21 11:31:38 UTC
Created attachment 360181 [details] [review]
process-row: Port to Gtk+ widget template

Use <!-- interface-requires gtk+ 3.10 --> instead of <requires lib="gtk+" version="3.10"/>
Comment 15 Petr Štětka 2017-09-21 11:36:02 UTC
Created attachment 360182 [details] [review]
process-list: Better refreshing process list

We need more frequent refreshing process list for example for disk i/o.
For better controllability we refreshing all list with processes every 5sec.
But list with subprocesses and values in process-row/sub-row every 1sec.
Comment 16 Petr Štětka 2017-09-21 11:36:14 UTC
Created attachment 360183 [details] [review]
css-styling: Update css for better support others themes

Swap using css-name for css class, for better support other themes.
It separate adwaita.css and adwaita-dark.css to common.css for common items.
Comment 17 Petr Štětka 2017-09-21 11:56:10 UTC
>::: src/sub-process-list-box.vala
> @@ +39,3 @@
> +        }
> +
> +        public void init(Process process, ProcessListBoxType type)
> 
> I would expect that you'd be able to run this block within the construction method somehow (despite the gtk+ composite template).

I don't have any idea how can I use constructor with parameters with gtk+ composite template.
Comment 18 Petr Štětka 2017-09-26 13:46:36 UTC
I've done some modifications and refactoring, moving code into more methods..

I'm attach an updated patches.
Comment 19 Petr Štětka 2017-09-26 13:49:46 UTC
Created attachment 360448 [details] [review]
sub-process-sub-row: Port to Gtk+ widget template

Updated version.
Comment 20 Petr Štětka 2017-09-26 13:50:03 UTC
Created attachment 360449 [details] [review]
sub-process-list-box: Port to Gtk+ widget template

Updated	version.
Comment 21 Petr Štětka 2017-09-26 13:50:16 UTC
Created attachment 360450 [details] [review]
process-row: Port to Gtk+ widget template

Updated	version.
Comment 22 Petr Štětka 2017-09-26 13:50:31 UTC
Created attachment 360451 [details] [review]
process-list: Better refreshing process list

We need more frequent refreshing process list for example for disk i/o.
For better controllability we refreshing all list with processes every 5sec.
But list with subprocesses and values in process-row/sub-row every 1sec.

Updated	version.
Comment 23 Petr Štětka 2017-09-26 13:50:46 UTC
Created attachment 360452 [details] [review]
css-styling: Update css for better support others themes

Swap using css-name for css class, for better support other themes.
It separate adwaita.css and adwaita-dark.css to common.css for common items.

Updated	version.
Comment 24 Felipe Borges 2017-10-02 12:30:49 UTC
Review of attachment 360448 [details] [review]:

::: data/interface/adwaita.css
@@ +37,1 @@
     background: #e2e2e2;

Couldn't these values come from the theme?
Comment 25 Petr Štětka 2017-10-02 15:14:35 UTC
(In reply to Felipe Borges from comment #24)
> Review of attachment 360448 [details] [review] [review]:
> 
> ::: data/interface/adwaita.css
> @@ +37,1 @@
>      background: #e2e2e2;
> 
> Couldn't these values come from the theme?

It would be nice, but how? I did not find these colors defined in adwaita theme..
Comment 26 Felipe Borges 2017-10-11 13:35:24 UTC
#e2e2e2 = (In reply to Petr Štětka from comment #25)
> (In reply to Felipe Borges from comment #24)
> > Review of attachment 360448 [details] [review] [review] [review]:
> > 
> > ::: data/interface/adwaita.css
> > @@ +37,1 @@
> >      background: #e2e2e2;
> > 
> > Couldn't these values come from the theme?
> 
> It would be nice, but how? I did not find these colors defined in adwaita
> theme..

Where did you get these colors from in the first place?

#e2e2e2 seems to be very close to @theme_bg_color. I assume you used a color picker to get it from the mockups? In this case, try to get similar colors from the theme. I am not sure whether the designers are sketching mockups with the exact same theme colors.

I am being picky about these colors because that's how Usage looks like in: 

  - Adwaita with the dark variant https://i.imgur.com/qjwGLVE.png
  - HighContrast https://i.imgur.com/ycCK9TG.png
notice that the main view background is not white? This is a problem for users with visual disabilities.
  - Imagine how dissonant it will look like in Ubuntu 17.10 (huge GNOME user base) http://www.omgubuntu.co.uk/2017/09/ubuntu-17-10-gnome-shell-ambiance
Comment 27 Petr Štětka 2017-10-23 15:46:07 UTC
(In reply to Felipe Borges from comment #26)
> #e2e2e2 = (In reply to Petr Štětka from comment #25)
> > (In reply to Felipe Borges from comment #24)
> > > Review of attachment 360448 [details] [review] [review] [review] [review]:
> > > 
> > > ::: data/interface/adwaita.css
> > > @@ +37,1 @@
> > >      background: #e2e2e2;
> > > 
> > > Couldn't these values come from the theme?
> > 
> > It would be nice, but how? I did not find these colors defined in adwaita
> > theme..
> 
> Where did you get these colors from in the first place?
> 
> #e2e2e2 seems to be very close to @theme_bg_color. I assume you used a color
> picker to get it from the mockups? In this case, try to get similar colors
> from the theme. I am not sure whether the designers are sketching mockups
> with the exact same theme colors.
> 
> I am being picky about these colors because that's how Usage looks like in: 
> 
>   - Adwaita with the dark variant https://i.imgur.com/qjwGLVE.png
>   - HighContrast https://i.imgur.com/ycCK9TG.png
> notice that the main view background is not white? This is a problem for
> users with visual disabilities.
>   - Imagine how dissonant it will look like in Ubuntu 17.10 (huge GNOME user
> base) http://www.omgubuntu.co.uk/2017/09/ubuntu-17-10-gnome-shell-ambiance

I think due to https://gitlab.gnome.org/GNOME/gnome-usage/merge_requests/10, we can not solve these colors in this bug (here on bugzilla) but we can focus on these patches as port to Gtk+ template file and Better refreshing process list. 
It would be nice to soon resolve bugs on bugzilla due to move to gitlab.
Comment 28 Felipe Borges 2017-10-24 13:26:46 UTC
(In reply to Petr Štětka from comment #27)
> I think due to https://gitlab.gnome.org/GNOME/gnome-usage/merge_requests/10,
> we can not solve these colors in this bug (here on bugzilla) but we can
> focus on these patches as port to Gtk+ template file and Better refreshing
> process list. 
> It would be nice to soon resolve bugs on bugzilla due to move to gitlab.

Ok. Could you please remove the CSS changes from the patch so it doesn't create unnecessary merge conflicts with that merge-request in gitlab?

Thanks!
Comment 29 Petr Štětka 2017-10-24 14:14:39 UTC
Created attachment 362184 [details] [review]
sub-process-sub-row: Port to Gtk+ widget template
Comment 30 Petr Štětka 2017-10-24 14:14:46 UTC
Created attachment 362185 [details] [review]
sub-process-list-box: Port to Gtk+ widget template
Comment 31 Petr Štětka 2017-10-24 14:14:53 UTC
Created attachment 362186 [details] [review]
process-row: Port to Gtk+ widget template
Comment 32 Petr Štětka 2017-10-24 14:15:05 UTC
Created attachment 362187 [details] [review]
process-list: Better refreshing process list

We need more frequent refreshing process list for example for disk i/o.
For better controllability we refreshing all list with processes every 5sec.
But list with subprocesses and values in process-row/sub-row every 1sec.
Comment 33 Petr Štětka 2017-10-24 14:16:51 UTC
(In reply to Felipe Borges from comment #28)
> (In reply to Petr Štětka from comment #27)
> > I think due to https://gitlab.gnome.org/GNOME/gnome-usage/merge_requests/10,
> > we can not solve these colors in this bug (here on bugzilla) but we can
> > focus on these patches as port to Gtk+ template file and Better refreshing
> > process list. 
> > It would be nice to soon resolve bugs on bugzilla due to move to gitlab.
> 
> Ok. Could you please remove the CSS changes from the patch so it doesn't
> create unnecessary merge conflicts with that merge-request in gitlab?
> 
> Thanks!

Yes, done.
Comment 34 Felipe Borges 2017-10-24 14:39:41 UTC
Review of attachment 362184 [details] [review]:

Thank you!
Comment 35 Felipe Borges 2017-10-24 14:40:34 UTC
Review of attachment 362185 [details] [review]:

ok
Comment 36 Felipe Borges 2017-10-24 14:41:41 UTC
Review of attachment 362186 [details] [review]:

sure
Comment 37 Petr Štětka 2017-10-24 14:59:31 UTC
Attachment 362184 [details] pushed as 4a72be0 - sub-process-sub-row: Port to Gtk+ widget template
Attachment 362185 [details] pushed as f21c39b - sub-process-list-box: Port to Gtk+ widget template
Attachment 362186 [details] pushed as a140ee7 - process-row: Port to Gtk+ widget template
Comment 38 Petr Štětka 2017-11-24 13:36:26 UTC
SubProcessListBox is no more used in master.