Merge lp://qastaging/~nataliabidart/ubuntuone-control-panel/folders-in-the-ui into lp://qastaging/ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 35
Merged at revision: 26
Proposed branch: lp://qastaging/~nataliabidart/ubuntuone-control-panel/folders-in-the-ui
Merge into: lp://qastaging/ubuntuone-control-panel
Diff against target: 1768 lines (+703/-523)
10 files modified
data/account.ui (+27/-65)
data/management.ui (+122/-106)
data/overview.ui (+1/-1)
data/page.ui (+0/-38)
data/window.ui (+0/-12)
ubuntuone/controlpanel/gtk/gui.py (+111/-114)
ubuntuone/controlpanel/gtk/tests/__init__.py (+16/-0)
ubuntuone/controlpanel/gtk/tests/test_gui.py (+107/-179)
ubuntuone/controlpanel/gtk/tests/test_widgets.py (+215/-0)
ubuntuone/controlpanel/gtk/widgets.py (+104/-8)
To merge this branch: bzr merge lp://qastaging/~nataliabidart/ubuntuone-control-panel/folders-in-the-ui
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Review via email: mp+42304@code.qastaging.launchpad.net

Commit message

* Added the "Folders" tab in the control panel (LP: #674455).
* The banner was improved to make it shorter.
* Proper background colors were set to the rest of the status bar (at the top, showing quota and file sync status).

Description of the change

This branch present several changes, mostly to the UI.

The main goal was to add the "Folders" tab in the control panel (LP: #674455).
Side effects were improving the banner to make it shorter, and ergo setting proper background colors to the rest of the status bar (at the top, showing quota and file sync status).

Quota information is now also shown in the progress bar.

Still pending: show file sync status.

To test, please branch this proposal and using 2 consoles, run:

in console 1: DEBUG=True PYTHONPATH=. ./bin/ubuntuone-control-panel-backend

in console 2: DEBUG=True PYTHONPATH=. ./bin/ubuntuone-control-panel-gtk

and play with it!

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

"""Transform a dbus string representation of a boolen to True/False."""

s/boolen/boolean/

Also: that converts empty strings and the string '0' to false. Does dbus represent falsy values in both of those ways?

'Below the list of folders available in this machine. '

I would add a verb to make this a clearer sentence. Or a sentence at all, really. :P "Listed below are" maybe. I don't know what 'folders available in (should be on) this machine' means. We need something clearer there.

Neither of the link buttons 'Upgrade subscription' or 'Support options' works.

I assume the banner is a placeholder.

The progress bar does not show much progress, and the spinner in the top right corner just keeps spinning.

'Devices' and 'Applications' show nothing, where there is something in the current Ubuntu One thingy. (Funny: when I opened that to compare, the new control panel duplicated all its contents vertically, so it looked like two windows on top of eachother, except in one window. Don't know if that's relevant, but it might happen if people open the panel more than once.)

I don't know which of these are known things that don't need to be working right now, so I'll mark it as needs info.

review: Needs Information
Revision history for this message
Eric Casteleijn (thisfred) wrote :

The code looks good though, outside of the textual nitpicks above

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

> """Transform a dbus string representation of a boolen to True/False."""
>
> s/boolen/boolean/

Fixed.

> Also: that converts empty strings and the string '0' to false. Does dbus
> represent falsy values in both of those ways?

The thing is that this is independent from dbus. We're passing dictionaries thru dbus, and the dicts can not have mixed types for the values, so we use only dicts with string key and values. So we need to choose a representation for booleans as strings, and this agreement is between the backend and the frontend.

The spec for this dbus backend was to have empty strings or '0' as False. We may consider adding 'False' as False as well?

> 'Below the list of folders available in this machine. '
>
> I would add a verb to make this a clearer sentence. Or a sentence at all,
> really. :P "Listed below are" maybe. I don't know what 'folders available in
> (should be on) this machine' means. We need something clearer there.

I agree. Changed to 'Listed below are the folders available in this machine. '

> Neither of the link buttons 'Upgrade subscription' or 'Support options' works.

Ack, filled bug #683391 to fix this.

> I assume the banner is a placeholder.

Yes, Asif is working on the definitive banner.

> The progress bar does not show much progress, and the spinner in the top right
> corner just keeps spinning.

The progress bar just shows how much space you have used, so no actual progress is shown (just used quota). The spinner will spin for ever until file sync status retrieval is supported.

> 'Devices' and 'Applications' show nothing, where there is something in the
> current Ubuntu One thingy. (Funny: when I opened that to compare, the new
> control panel duplicated all its contents vertically, so it looked like two
> windows on top of eachother, except in one window. Don't know if that's
> relevant, but it might happen if people open the panel more than once.)

Devices and Applications are not implemented yet.

Can you please show me a screenshot of the 2 windows? or instructions how to reproduce?

> I don't know which of these are known things that don't need to be working
> right now, so I'll mark it as needs info.

Thanks!!!

34. By Natalia Bidart

Fixing typos and titles as per review.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

> > Also: that converts empty strings and the string '0' to false. Does dbus
> > represent falsy values in both of those ways?
>
> The thing is that this is independent from dbus. We're passing dictionaries
> thru dbus, and the dicts can not have mixed types for the values, so we use
> only dicts with string key and values. So we need to choose a representation
> for booleans as strings, and this agreement is between the backend and the
> frontend.
>
> The spec for this dbus backend was to have empty strings or '0' as False. We
> may consider adding 'False' as False as well?

In my experience things get hairy very quickly with these conversions. If you're passing dictionaries I'd consider using JSON which is well defined, rather than trying to come up with our own string encoding. If we do decide we need one, pick one value and one value only, I would suggest. Which one doesn't matter, though if you ever want to test whether something representss a boolean, (probably not, I assume we're working with a narrowly defined set of typed fields here.) the empty string might be problematic, but then so is every other choice. Probably it doesn't matter in this case.

> > 'Below the list of folders available in this machine. '
> >
> > I would add a verb to make this a clearer sentence. Or a sentence at all,
> > really. :P "Listed below are" maybe. I don't know what 'folders available in
> > (should be on) this machine' means. We need something clearer there.
>
> I agree. Changed to 'Listed below are the folders available in this machine. '

I would still change that at least to 'on this machine'. Then it's English but I still have no idea what it means ;)

> Can you please show me a screenshot of the 2 windows? or instructions how to
> reproduce?

Sure. Run the test as per your instructions, then while the new window is showing, go to System | Preferences | Ubuntu One, and it should happen.

Revision history for this message
Eric Casteleijn (thisfred) :
review: Approve
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Approved with the nitpick above fixed.

35. By Natalia Bidart

Another gramatical fix.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

> > > Also: that converts empty strings and the string '0' to false. Does dbus
> > > represent falsy values in both of those ways?
> >
> > The thing is that this is independent from dbus. We're passing dictionaries
> > thru dbus, and the dicts can not have mixed types for the values, so we use
> > only dicts with string key and values. So we need to choose a representation
> > for booleans as strings, and this agreement is between the backend and the
> > frontend.
> >
> > The spec for this dbus backend was to have empty strings or '0' as False. We
> > may consider adding 'False' as False as well?
>
> In my experience things get hairy very quickly with these conversions. If
> you're passing dictionaries I'd consider using JSON which is well defined,
> rather than trying to come up with our own string encoding. If we do decide we
> need one, pick one value and one value only, I would suggest. Which one
> doesn't matter, though if you ever want to test whether something representss
> a boolean, (probably not, I assume we're working with a narrowly defined set
> of typed fields here.) the empty string might be problematic, but then so is
> every other choice. Probably it doesn't matter in this case.

I reported bug #683619 to deal with is.

> > > 'Below the list of folders available in this machine. '
> > >
> > > I would add a verb to make this a clearer sentence. Or a sentence at all,
> > > really. :P "Listed below are" maybe. I don't know what 'folders available
> in
> > > (should be on) this machine' means. We need something clearer there.
> >
> > I agree. Changed to 'Listed below are the folders available in this machine.
> '
>
> I would still change that at least to 'on this machine'. Then it's English but
> I still have no idea what it means ;)

Hum, I will trust you on this one, since you're the english native speaker (?). Changed.

> > Can you please show me a screenshot of the 2 windows? or instructions how to
> > reproduce?
>
> Sure. Run the test as per your instructions, then while the new window is
> showing, go to System | Preferences | Ubuntu One, and it should happen.

Reproduced. Woohooo! Filed bug #683649

Thanks a lot!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches