#2143 closed enhancement (fixed)
add spiral to home view
Reported by: | walter | Owned by: | tomeu |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | Unspecified |
Severity: | Unspecified | Keywords: | r! |
Cc: | garycmartin | Distribution/OS: | Unspecified |
Bug Status: | Unconfirmed |
Description
There has been discussion about the need to support more activities on the Home View. I've implemented an enhancement to the standard ring view that morphs it into a spiral when it get so large as to no longer fit on the screen with standard icon sizes. Once the spiral fills the screen, the icon size is decreased.
A more detailed discussion can be fund here:
http://lists.sugarlabs.org/archive/sugar-devel/2010-August/025874.html
A patch is attached to this ticket.
A screen shot is available here:
http://wiki.sugarlabs.org/go/File:Spiral-home-view.png
Attachments (11)
Change History (32)
Changed 13 years ago by walter
comment:1 Changed 13 years ago by walter
comment:2 Changed 13 years ago by walter
I've attached an alternative patch which spirals from the outside to the inside, making the visual transition from the Ring to the Spiral less abrupt (See http://wiki.sugarlabs.org/go/Features/Spiral_Home_View#Detailed_Description), I have also introduced an intermediate icon size between STANDARD_ICON_SIZE and SMALL_ICON_SIZE.
One disadvantage of going from the outside in is that you cannot fill in the corners of the screen as the spiral grows from radius MAXIMUM (half the screen height) to a radius == to half the length of the screen diagonal. This would allow more icons on the screen, but it is visually quite messy and it becomes hard to follow the sequence of the spiral.
comment:3 Changed 13 years ago by walter
As per Gary's suggestion, the latest patch includes MEDIUM size icons in the Ring. It transitions to the STANDARD size icons before transitioning to the Spiral. This version grows the spiral from the outside inward.
comment:4 Changed 13 years ago by walter
As per Christian's feedback, I added more intermediate steps and loosened up the spiral somewhat.
comment:5 Changed 13 years ago by walter
The latest version has spacing more aligned with the feedback from Gary and Christian.
comment:6 Changed 13 years ago by walter
- Keywords r? added
Other than a fine-tuning the parameters defining the shape of the spiral, I think we are all set on this patch. Could it please be reviewed?
comment:7 Changed 13 years ago by tomeu
- Keywords r! added; r? removed
Have you considered having separate layouts for the circle and the spiral? I suspect the code would end up simpler.
+ self._orientation = math.pi
This seems to be the radius of the icon currently being laid out. Would be better if we didn't stored in the object intermediate values used in the layout algorithm because any exception raised (broken icon file?) during layout would mean it remains broken.
Please consider calculating the radius of an item from its position in the list, or propagating these values in the functions that intervene in the layout, probably in a separate class.
comment:8 Changed 13 years ago by walter
Have you considered having separate layouts for the circle and the spiral?
We discussed a stand-alone spiral with the design team, but opted to make the ring morph into a spiral in order to keep the user experience more consistent.
+ self._orientation = math.pi
This seems to be the radius of the icon currently being laid out.
Actually no. We calculate two parameters in generating the spiral, the orientation (relative to the top of the screen) and the radius.
Would be better if we didn't stored in the object intermediate values used in the layout
algorithm because any exception raised (broken icon file?) during layout would mean it
remains broken.
Please consider calculating the radius of an item from its position in the list, or
propagating these values in the functions that intervene in the layout, probably in
a separate class.
I'll look into this.
comment:9 Changed 13 years ago by walter
- Keywords r? added; r! removed
http://bugs.sugarlabs.org/attachment/ticket/2143/0001-adding-spiral-extension-to-Ring-View.patch
While I didn't split the code into two classes: one for spiral and one for ring, this version is much less complex and does not not rely on any state maintained in the class except for one flag.
comment:10 Changed 13 years ago by tomeu
- Keywords r+ added; r? removed
r+, but please move the top level functions inside the only class that uses them, for higher cohesion http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29
Note that before pushing you need to get an exception from the release team: http://wiki.sugarlabs.org/go/Development_Team/Release#Feature_freeze
comment:11 Changed 13 years ago by walter
I addressed the cohesion issue and did a little more tightening up of the code.
comment:12 Changed 13 years ago by erikos
Walter, please push today as we do tarballs today (you have been added as a committer to sugar in gitorious).
The Feature request has been accepted as well.
comment:13 Changed 13 years ago by walter
- Resolution set to fixed
- Status changed from new to closed
Pushed.http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/20316bccb697f144d823a735f0fe96aabb8cdbb7
comment:14 Changed 13 years ago by walter
- Cc garycmartin added
- Keywords r? added; r+ removed
- Resolution fixed deleted
- Status changed from closed to reopened
As per Gary's feedback (See http://lists.sugarlabs.org/archive/sugar-devel/2010-August/026300.html) I have created two patches, attached. Please review.
comment:15 Changed 13 years ago by walter
Two more patches as per IRC discussion.
<garycmartin> walterbender: re: box and triangle, yea their icons suddenly drop. A continuous patch there would be nice [SNIP]
<garycmartin> walterbender: nitpick, when the spiral fills and starts to down size icons, can that step be a little smaller?
comment:16 Changed 13 years ago by walter
Design signoff...
<garycmartin> walterbender: Results, looks great all the way up to 140 icons :) obviously quite small by that stage, but still easily recognisable.
<garycmartin> walterbender, erikos: tested the triangle and box with walterbender's 3rd patch, they scale much better as well now.
walterbender> garycmartin: did you notice any change in the icon scaling with Patch 4?
<garycmartin> walterbender, erikos: Just there, yes, looking fab :)
Requesting code review of these 4 patches:
(1) http://bugs.sugarlabs.org/attachment/ticket/2143/0001-only-enable-spiral-for-Ring-layout.patch
(4) http://bugs.sugarlabs.org/attachment/ticket/2143/0001-more-icon-size-steps-in-spiral.patch
comment:17 Changed 13 years ago by walter
- Milestone changed from Unspecified by Release Team to 0.90
As this feature has been accepted for 0.90, I am setting the proper milestone.
comment:18 Changed 13 years ago by tomeu
- Keywords r! added; r? removed
if self.key == 'ring-layout':
This has a very bad smell (http://en.wikipedia.org/wiki/Code_smell). The inheritance hierarchy should take care of this, I see two ways to fix this properly:
- Have a SpiralRingLayout that inherits from RingLayout,
- Have a SpiralRingLayout that delegates the actual icon placing to RingLayout or SpiralLayout based on the number of icons and the available space.
Kudos for splitting the patch, but would have been better to leave this ticket closed and open a new one instead.
Also, I don't think the UI freeze really affects these patches.
comment:19 Changed 13 years ago by erikos
I think Tomeu is right regarding the Ui Freeze.
These are minor UI tweaks that most users won't noticed in normal circumstances. The UI freeze is a lot about documentation efforts as well and that people focus on fixes at this point in time [1].
So, as this is rather a fix, i guess this is fine like that and can go in this week after addressing the review comments. Better to fix it right than rush...
[1] http://wiki.sugarlabs.org/go/Development_Team/Release#UI_Freeze
comment:20 Changed 13 years ago by walter
- Resolution set to fixed
- Status changed from reopened to closed
Closing this ticket and creating a new ticket (#2235) for the design suggestions.
adding spiral morph to ring view