Difference between revisions of "Features/TableView Widget"

From Sugar Labs
Jump to navigation Jump to search
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<noinclude>{{TOCright}}
 
<noinclude>{{TOCright}}
[[Category:Feature Page Incomplete]]
+
[[Category:Feature Accepted 0.88]]
[[Category:Feature|<Feature Name>]]
+
[[Category:FeatureObsoleted|TableView Widget]]
 
</noinclude>
 
</noinclude>
  
Line 15: Line 15:
 
== Current status ==
 
== Current status ==
 
* Targeted release: 0.88
 
* Targeted release: 0.88
* Last updated: Sat Nov 28 01:20:59 UTC 2009
+
* Last updated: Mon Jan 11 21:15:02 UTC 2010
* Percentage of completion: 75%
+
* Percentage of completion: 90%
  
 
== Detailed Description ==
 
== Detailed Description ==
''Expand on the summary, if appropriate. A couple of sentences suffices to explain the goal, but the more details you can provide the better.''
+
 
 +
Feature introduced two new classes - SmoothTable and TableView.
 +
 
 +
=== SmoothTable class ===
 +
 
 +
Model less implementation. The real widget consists of ''visible-columns'' * (''visible-rows'' + 2) identical widgets (constructor is passed to SmoothTable during creation) and while scrolling (by pixel); SmoothTable shifts these widgets.
 +
 
 +
=== TableView class ===
 +
 
 +
Just adds gtk.TreeModel support.
  
 
== Benefit to Sugar ==
 
== Benefit to Sugar ==
''What is the benefit to the platform?  If this is a major capability update, what has changed?  If this is a new feature, what capabilities does it bring? Why will Sugar become a better platform or project because of this feature?''
 
  
''Make sure to note here as well if this feature has been requested by a specific deployment, or if it has emerged from a bug report.''
+
Standard gtk components are not designed to be lazy. Third party widgets, I managed to find, uses scheme with renders (like gtk components), introduced component uses widgets instead (could have performance penalties, I guess, in common case but we don't have many rows in Journal view, so should be ok for us).
 +
 
 +
Benefits we have for such scheme:
 +
* coding cells is more useful by using widgets than renders, we can reuse our existing custom widgets instead of coding sugarized cell renders
 +
* in some cases it's hard to sugarize cells theme (we still have ugly progress bar for Journal entries), with new widget, we use just gtk.ProgressBar
  
 
== Scope ==
 
== Scope ==
Line 31: Line 43:
  
 
==UI Design==
 
==UI Design==
''Does the feature have a direct impact on the work flow, or does it need a UI? Link here mockups, or add detailed descriptions.''
+
 
 +
Nothing.
  
 
== How To Test ==
 
== How To Test ==
 
{{:{{PAGENAME}}/Testing}}
 
{{:{{PAGENAME}}/Testing}}
 
== User Experience ==
 
== User Experience ==
''If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice.''
+
 
 +
Nothing will be changed in case of user experience.
  
 
== Dependencies ==
 
== Dependencies ==
''What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this feature depends?  In other words, does your feature depend on completion of another feature owned by someone else or that you would need to coordinate, which might cause you to be unable to finish on time?  Other upstream projects like Python?''
+
 
 +
* regular glucose dependencies
  
 
== Contingency Plan ==
 
== Contingency Plan ==
''If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If your feature is not completed in time, we want to assure others that other parts of Sugar will not be in jeopardy.''
+
 
 +
None necessary, revert to previous release behaviour.
  
 
== Documentation ==
 
== Documentation ==

Latest revision as of 15:31, 5 November 2013


Summary

GTK widget to replace gtk.TreeView in Journal.

Owner

Current status

  • Targeted release: 0.88
  • Last updated: Mon Jan 11 21:15:02 UTC 2010
  • Percentage of completion: 90%

Detailed Description

Feature introduced two new classes - SmoothTable and TableView.

SmoothTable class

Model less implementation. The real widget consists of visible-columns * (visible-rows + 2) identical widgets (constructor is passed to SmoothTable during creation) and while scrolling (by pixel); SmoothTable shifts these widgets.

TableView class

Just adds gtk.TreeModel support.

Benefit to Sugar

Standard gtk components are not designed to be lazy. Third party widgets, I managed to find, uses scheme with renders (like gtk components), introduced component uses widgets instead (could have performance penalties, I guess, in common case but we don't have many rows in Journal view, so should be ok for us).

Benefits we have for such scheme:

  • coding cells is more useful by using widgets than renders, we can reuse our existing custom widgets instead of coding sugarized cell renders
  • in some cases it's hard to sugarize cells theme (we still have ugly progress bar for Journal entries), with new widget, we use just gtk.ProgressBar

Scope

UI Design

Nothing.

How To Test

Simple example for SmootTable widget

import gtk

from sugar.graphics.smoothtable import SmoothTable

window = gtk.Window()

scrolled = gtk.ScrolledWindow()
scrolled.set_policy(gtk.POLICY_ALWAYS, gtk.POLICY_ALWAYS)
window.add(scrolled)

class Cell(gtk.Button):
   def do_fill_in(self, table, row, column):
       self.props.label = '%s:%s' % (row, column)

table = SmoothTable(Cell, 3, 3)
table.row_count = 100
scrolled.add(table)

window.show_all()
gtk.main()

User Experience

Nothing will be changed in case of user experience.

Dependencies

  • regular glucose dependencies

Contingency Plan

None necessary, revert to previous release behaviour.

Documentation

Is there upstream documentation on this feature, or notes you have written yourself? Has this topic been discussed in the mailing list or during a meeting? Link to that material here so other interested developers can get involved.

Release Notes

The Sugar Release Notes inform end-users about what is new in the release. An Example is 0.84/Notes. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns. If there are any such changes involved in this feature, indicate them here. You can also link to upstream documentation if it satisfies this need. This information forms the basis of the release notes edited by the release team and shipped with the release.

Comments and Discussion