Skip to content

Releases: dojo/dojo1-dgrid

0.3.19

30 Jun 16:27
Compare
Choose a tag to compare

Bug Fixes

  • Revert use of requestIdleCallback in OnDemandList#pagingMethod implementations. (#1383).

1.2.0

08 Jun 20:16
Compare
Choose a tag to compare

Enhancements

  • Updated the scroll handling in OnDemandList to prune the children of expanded Tree parent rows as the grid scrolls. (#877)
  • Added configuration options to List (the base class for all of the list and grid classes) to allow resizing
    based on window resize events to be throttled to improve performance. (#1306 thanks @msssk and @adamdport)
  • Warn developers when they try to mix OnDemandList with Pagination because the two are incompatible. (#1367 thanks @msssk)
  • Updated Keyboard#_ensureScroll to support scrolling to a row as well as a cell. (#1379 thanks @maier49)

Bug Fixes

  • Updated the Pagination extension to make the PagingTextBox respond to Enter key presses in Internet Explorer. (#1294 thanks @agubler)
  • Updated _StoreMixin to pass the proper parameters to Node.insertBefore to fix problems in Internet Explorer. (#1301 thanks @msssk)
  • Fixed an issue with Editor#refresh not returning the value from the base class methods. (#1299)
  • Fixed an issue with the Pagination extension's loading message being removed improperly.
  • Fixed a scrolling performance issue in OnDemandList by using requestIdleCallback (#1351 thanks @msssk)
  • Fixed an issue with the ColumnHider extensions icon being too wide when the browser renders a narrow scrollbar. (#1293 thanks @msssk)
  • Fixed an issue with managing the no data message that could cause the message to appear twice.
    (#1370)
  • Fixed an issue in the DnD extension that could cause rows to disappear after they are dropped. (#1365)
  • Fixed an issue in the DnD extension that could cause the drag avatar to be empty. (#1362 thanks @bryanforbes)
  • Fixed an issue with using getElementsByClassName that Internet Explorer 8 does not support. (#1344 thanks @dylans)

Clean Up

  • Removed the "dom-contains" has test because it is no longer used. (#1308 thanks @msssk)
  • Removed the preserveMomentum option from OnDemandList because it was obsolete. (#1312 thanks @msssk)
  • Made small documentation updates. (thanks @msssk)
  • Updated a module ID in SingleQuery to be relative. (#1340 thanks @steveoh)
  • Updated some of the unit tests to properly clean up after themselves to stop random test failures.

0.4.3

08 Jun 19:44
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a scrolling performance issue in OnDemandList by using requestIdleCallback (#1351 thanks @msssk)
  • Fixed an issue with using getElementsByClassName that Internet Explorer 8 does not support. (#1344 thanks @dylans)

0.3.18

08 Jun 21:08
Compare
Choose a tag to compare

Bug Fixes

  • Added logic to the Keyboard mixin to ensure that the entire column for the currently-focused cell is within view. (#1086)
  • Updated the documentation to indicate List and Grid do not support stores. (thanks @jdonaghue)
  • Updated Editor documentation to better describe the dgrid-datachange event. (#1142)
  • Fixed a scrolling performance issue in OnDemandList by using requestIdleCallback (#1351 thanks @msssk)
  • Allow empty stores to be observed. (#1359 thanks @mwistrand)

1.1.0

13 May 14:52
Compare
Choose a tag to compare

This release includes the same fixes as the 0.4.2 release, along with the following additional features and fixes:

  • Addition of the SingleQuery extension, a more complete version of the mixin originally demonstrated in one of the dgrid tutorials. (Related to #1271)
  • Fixed several issues with refreshCell pertaining to mixins with custom renderCell logic. (#1260, thanks @msssk for help with discovering, debugging, and testing the issues)
  • Fixed Tree indentation when used with SingleQuery. (#1275)
  • Fixed an obscure OnDemandList rendering bug. (#1277, thanks @msssk for narrowing down the issue)

(Note that the xstyle dependency update in 0.4.2 is not applicable, as dgrid 1.x no longer depends on xstyle.)

0.4.2

13 May 14:51
Compare
Choose a tag to compare

This is a bugfix release addressing a few issues discovered in 0.4.1.

  • Fixed a regression where OnDemandList would end up never requesting beyond the first page of results if the grid had startup called while not in document flow, as opposed to 0.4.0 where it would request all results in this case. Now it will function properly as long as resize is called once the grid is in flow. (#1251)
  • Fixed a regression in Tree involving event handlers not being re-registered when column structure is reset with the same tree column. (#1255, thanks @edhager)
  • Fixed a couple of Keyboard focus edge cases, involving grids that are sometimes empty (#1259) and focusing a grid after a removal on the same turn (#1266).
  • Fixed remnants of an old Keyboard issue regarding home and end key behavior with particularly large data sets in OnDemandList. (#1278, thanks @maier49)

This release also updates the xstyle dependency's version requirement to 0.3.2, which contains a fix for an issue affecting some versions of IE11 as well as new versions of Chrome.

v1.0.0

11 Jan 17:20
Compare
Choose a tag to compare

dgrid 1.0 includes all of the fixes included in 0.4.1. Note that this means it requires a minimum of Dojo 1.8.2 and dstore 1.0.3 or 1.1.1 as well.

It also includes the following major changes:

Removal of put-selector and xstyle dependencies

Users upgrading to 1.0 will need to manually import dgrid/css/dgrid.css (preferably before any dgrid skin) due to this change. It should have no other adverse effects.

dgrid 0.x relied upon put-selector for DOM manipulation and xstyle for its css AMD plugin to automatically load structural CSS resources expressed as module dependencies.

In 1.0, put-selector usage has been replaced with dojo/dom-construct, for several reasons:

  • While its APIs may be less terse, they are also generally easier to read and thus maintain
  • The majority of dgrid users are already loading it anyway, making it effectively a smaller footprint than adding another DOM library
  • dgrid and its users have occasionally suffered issues ultimately due to put-selector, while dom-construct has remained stable for years

The xstyle dependency has also been removed, since some of its modules also depend on put-selector (although the specific modules that dgrid used do not), which would have required builds including dgrid to still include put-selector in order for the build to run successfully.

Removing xstyle should also ultimately simplify some aspects of development:

  • Avoids potentially confusing behavior in cases where structural CSS loads after other custom CSS, when loaded dynamically via the css AMD plugin
  • Removes a level of complexity from the build process, since it is no longer necessary to worry about configuring the xstyle build plugin or otherwise optimizing all of the structural CSS files that would normally load dynamically

dgrid.css now includes structural styles for all dgrid components, but as it turns out, there is a pretty even trade-off between this and the bandwidth necessary to load xstyle's CSS plugin anyway.

Refactoring of CSS to Stylus

Complementing the removal of xstyle, dgrid's CSS has been rewritten and reorganized using the Stylus preprocessor. This offers the following benefits:

  • Projects consuming dgrid that also use Stylus can specifically import structural styles for only the components they need, starting with dgrid/css/base.styl and adding more as appropriate
  • Creation of custom skins with Stylus is now largely facilitated by setting variables and importing dgrid/css/skins/skin.styl. For more information, see the documentation on Customizing Skins.

Migration to Intern 3 and end of IE8 support

dgrid 1.0 now uses Intern 3 for automated testing. As Microsoft has ended support for IE8, and Intern 3 no longer maintains a geezer version supporting it, we do not intend to expend effort on IE8 from this point onward.

Note that IE8 is still unofficially supported insofar as any logic that existed in dgrid 0.4 to specifically accommodate it still exists in 1.0.

Additional APIs

  • Grid#hasNeutralSort - boolean property indicating whether clicking a header cell toggles between just ascending/descending, or ascending/descending/none. Default is false (ascending/descending only, like previous versions)
  • _StoreMixin#refreshCell(cell) - re-renders an individual grid cell from the collection or dirty state. (Thanks @msssk)

Removed APIs

  • Column definition objects no longer support the init and destroy functions, which were deprecated as of 0.4 along with the transition from column plugins to mixins. See _configColumns (or optionally _configColumn) and _destroyColumns in Grid for prototype-level equivalents.
  • The TouchScroll module has been removed, as it generally outlived its usefulness once modern mobile browsers effectively supported proper touch scrolling, and this module was only designed for WebKit environments.
  • The util/misc.contains function has been removed, as only one of its code paths was ever being used. Use Node#contains instead.

v0.4.1

11 Jan 17:19
Compare
Choose a tag to compare

Significant changes

  • dgrid now requires Dojo 1.8.2 or higher, due to its dependence on a feature test added to the dojo/dom module. Users of 1.8.0 or 1.8.1 are highly encouraged to update.
  • dgrid now requires dstore 1.0.3 or 1.1.1 at minimum, due to fixes to API issues found and addressed while simplifying dgrid code to always expect promises from dstore APIs.
  • Exposed the prefix used for auto-generated IDs via List.autoIdPrefix, allowing it to be overridden. (#1047)
  • The promise returned by _StoreMixin#save now resolves to an object with a key for each ID saved, mapping to the value returned by the put call for each ID. This change should be backwards-compatible, since previously the promise resolved to undefined and was only useful for timing. (#655, thanks @josch1710)
  • The Tree mixin now adds a dgrid-row-expandable class to rows of parent items. (#1144)
  • The Tree mixin no longer throws an error if an instance is created with no collection immediately assigned. (#614, thanks @edhager)
  • The DijitRegistry extension now supports placeAt the same way that any Dijit widget does. (#1135)
  • The util/misc.contains function has been deprecated, as only one of its code paths was ever being used. Use Node#contains instead.

Additional fixes

General/Core

  • Fixed a regression involving missing focus rectangles in Firefox.
  • Fixed an issue with List not passing options through to removeRow from insertRow, which primarily affected Tree. (#510, thanks @maier49)
  • Fixed an issue with _StoreMixin unnecessarily reacting to collection notifications before startup. (#1199, thanks @edhager)
  • Fixed an issue with OnDemandList causing it to load and render rows for all store items if it computes their row height to be 0, such as if an OnDemandGrid has no columns. (#965)
  • Fixed an issue with OnDemandList's store tracking logic which caused off-by-one errors, leading to incorrect re-rendering. (#1156, thanks @dmartinzar)
  • Fixed issues with some of the store unit tests so that they pass for the right reasons and don't fail when run against dstore 1.1.0. dgrid itself is functioning as it should with dstore 1.1.0 in our testing.
  • Various documentation improvements

Mixins

  • Fixed a regression with the ColumnSet mixin in IE8 where its horizontal scrollbars would not be displayed, and tweaked a selector to avoid acme causing IE8 to crash.
  • Fixed an issue with the ColumnSet mixin which would cause errors if scroll wheel or touch events occurred over empty space in the grid's body. (#1179, thanks @msssk)
  • Fixed an interoperability issue between the ColumnSet and Tree mixins involving scroll positions of column sets falling out of sync. (#1137, thanks @jdonaghue)
  • Fixed an interoperability issue involving ColumnSet not properly passing along options in createRowCells. (Discovered via #1232; thanks @edhager)
  • Fixed an issue in the Editor mixin in IE when the grid is refreshed while an editOn editor widget is active. (#1100, thanks @maier49)
  • Fixed an issue with Editor unintentionally carrying validation state between activations of a shared editor. (#1193, thanks @msssk)
  • Fixed issues with Editor listeners not being cleaned up at the appropriate time. (#1211, thanks @maier49)
  • Added logic to the Keyboard mixin to ensure that the entire column for the currently-focused cell is within view. (#1086)
  • Fixed an Edge-specific issue in the Selection mixin regarding preventing text selection. (#1203)
  • Fixed an issue with the Selector mixin which caused double-triggering of selector checkboxes via space keypress when a checkbox is focused. (#731, thanks @msssk and @maier49)
  • The Tree mixin now resets the expanded state of items when they are deleted from the collection. (#997, thanks @maier49)
  • Fixed an issue with the Tree mixin which, in combination with a bug in dstore, could lead to incorrect sorting of child items. (#1130, thanks @msssk)
  • Fixed an issue with the Tree mixin's transitionend event handling, which could cause grandchild containers to expand to the wrong height. (#1069, thanks @jbomer, @bogool, @kriszyp)
  • Fixed an issue in how the Tree mixin wraps renderCell, which would cause duplicate expando nodes if the column structure is re-processed (e.g. when columns are reordered with ColumnReorder). (#1157, thanks @dmartinzar)
  • Additionally, fixed Tree binding duplicate handlers. (#1215, thanks @edhager)
  • Fixed a regression involving styles for the Keyboard mixin in Firefox, where focus rectangles would not be displayed.

Extensions

  • Fixed ColumnHider#toggleColumnHiddenState to not throw an error if it is called for a column with unhidable set to true. (#1124)
  • Fixed ColumnResizer to avoid toggling sort when a column is resized down. (#1147)
  • Fixed ColumnResizer to account for hidden columns when performing initial calculations, to avoid errors. (#1187, thanks @maier49)
  • Improved behavior of the DnD extension when store requests fail, so that moving items between grids will not remove the item from the source if the put on the destination fails, and errors will be reported via the dgrid-error event. (#806 / #949, thanks @mercmobily)
  • Added logic to the DnD extension to automatically set allowNested: true if Tree is used, to allow children to be dragged/dropped. (#1241, thanks @edhager)
  • Fixed an issue with Pagination's status bar when the last item in the grid is removed. (#1192, thanks @maier49)
  • Fixed an off-by-one error in Pagination with regard to updating page navigation links relative to the collection's totalLength.

This release also incorporates improvements included in 0.3.17 that were not already present in 0.4.0.

A number of fixes/enhancements to the dgrid Laboratory are also included:

  • Column properties are now pruned when their applicable features are disabled (thanks @edhager)
  • Fixed an issue with the Tree mixin where the first column would not always properly default to showing the expand/collapse controls (thanks @edhager)
  • You can now select textarea some basic Dijit form widgets for the editor column definition property (#1236, thanks @maier49)
  • Added a README oriented towards developers looking to understand the way the Laboratory code is structured (thanks @msssk)

v0.3.17

23 Jan 22:54
Compare
Choose a tag to compare

dgrid 0.3.17 is a maintenance release incorporating fixes to bugs we found after 0.3.16 was released, primarily during 0.4 development. It made sense to backport these fixes to 0.3 to provide a stable release for anyone not ready to make the full jump to 0.4.

This will be the last 0.3 release in the foreseeable future, as we intend to focus on improving 0.4 and planning for future versions. However, if critical issues are found that affect both 0.3 and 0.4, and can be trivially backported, we may plan for another release.

Commercial support is also an option if you encounter problems with 0.3 and are not in a position to upgrade to 0.4.

Significant changes

General/Core

  • Updated put-selector dependency to 0.3.6 to take advantage of proper unicode support in CSS identifiers in put calls.
  • Added shouldObserveStore flag (which defaults to true, the previous behavior) to allow opting out of dgrid's automatic updates based on store notifications.

Mixins

  • Fixed a regression in ColumnSet where column sets' horizontal scrollbars no longer appeared in IE8 and old versions of Firefox.

Extensions

  • Added Slovenian translations for ColumnHider and Pagination. (#996, thanks @peterkokot)

Other changes and fixes

General/Core

  • OnDemandList now properly cancels the timeout responsible for firing the dgrid-refresh-complete event if the grid is destroyed on the same turn as it is refreshed. (#1030 / #1031, thanks @dwolverton)
  • Fixed an issue in OnDemandList involving empty asynchronous stores and noDataNode. (#1065)
  • Added a guard in _StoreMixin against superfluous refreshes due to store or query being set after creation but before startup.

Mixins

  • Fixed a scroll desynchronization issue in ColumnSet when rows are dynamically inserted e.g. due to observed changes. (h/t @brandonpayton for prompting discovery of this bug)
  • Updated mouse wheel event detection logic in ColumnSet to no longer require try/catch. (#1079)
  • Added logic to Keyboard to correct scroll position to ensure an entire row is visible in complex structures with sub-rows. (#1043, thanks @allencblee for the issue report and initial proposed fix)
  • Fixed an infinite recursion issue in Selection when selection event handlers further modify the selection. (#1036, thanks @nicknisi)

Extensions

  • Instituted a more reliable fix in ColumnReorder.css for overriding Dijit theme DnD styles. (#843)

v0.4.0

14 Nov 23:08
Compare
Choose a tag to compare

dgrid 0.4 brings several significant changes and improvements from 0.3. However, several of these changes are not backwards-compatible. Briefly, the most notable changes are as follows:

  • Dojo 1.8+ required
  • IE < 8, Presto-based Opera, and quirks mode no longer supported
  • Interacts with dstore instead of dojo/store
  • Column plugins are now mixins
  • APIs previously marked as deprecated have been removed
  • Various APIs have been modified to be more straightforward
  • Added Bower support
  • Tests upgraded to use Intern 2 and Leadfoot

Details on each of these points are provided below. Further details and examples on updating code to migrate from dgrid 0.3 to 0.4 are available in the 0.4 Migration Guide.

Breaking Changes

General

Changes to browser and Dojo version support

dgrid 0.4 no longer supports IE 6 and 7, quirks mode, and Presto-based Opera. Any previously-existing support for these platforms/modes has been removed to reduce code size.

Given that dgrid 0.4 depends on dstore, and dstore requires Dojo 1.8 or higher, dgrid now requires Dojo 1.8 or higher as well (as opposed to previous versions which also supported 1.7).

Full information on supported platforms and Dojo versions is listed in the README.

dojo/store replaced with dstore

dgrid 0.4 interfaces with the dstore API, the next evolution in Dojo store APIs. dstore's APIs solve various problems that were encountered in dojo/store, especially around observable stores.

dstore provides an adapter in order to allow dstore consumers to interface with dojo/store stores.

Column plugins are now mixins

Each of the three column plugins (editor, selector, and tree) have been converted to mixins, to make them easier to extend and less prone to user error.

  • The converted mixins now begin with uppercase letters to represent that they are mixins to be used with declare, not functions which modify a column definition object
  • Each mixin's functionality is still controlled on a per-column basis:
    • Editor looks for presence of the editor property
    • Selector looks for the selector property (which replaces selectorType)
    • Tree looks for the renderExpando property (which can be a function or true for the default rendering)
      • Note that Tree assumes that only one column will contain this property
      • Several column definition properties have been moved to instance-level: collapseOnRefresh, treeIndentWidth (formerly indentWidth), shouldExpand, and enableTreeTransitions (formerly enableTransitions)

See the 0.4 Migration Guide for usage examples.

APIs

List#renderArray no longer handles stores

List#renderArray no longer contains logic dealing with store query results; its logic now strictly concerns rendering arrays of data. Query result logic is located in _StoreMixin#renderQueryResults, which eventually calls renderArray.

This separation simplifies the process of extending renderArray, as it never needs to deal with a promise. It also makes the base List component significantly more lightweight.

List#newRow replaced by List#highlightRow

Previously, List#newRow would call insertRow then highlight the inserted row for a period of time. That logic has been refactored into a highlightRow method, which can be used to highlight a row at any time. (Rows are still highlighted when changes are observed in a store, just as before.)

Grid.defaultRenderCell moved to prototype

The default renderCell implementation is now exposed as Grid#_defaultRenderCell, which allows it to be more easily reused and extended. Note that it is still called in the context of a column, not the grid itself. (#375)

TouchScroll no longer loaded automatically

In dgrid 0.3, the dgrid/TouchScroll module would be loaded for any device supporting touch events. As touch scrolling support in mobile browsers has improved, this became less necessary, and in some cases, actually problematic.

As a result, in dgrid 0.4, the TouchScroll module is no longer loaded automatically. If you still wish to use it, you must load it and mix it in explicitly.

Removed APIs

  • All previously-deprecated setFoo-style methods have been removed in favor of set('foo', ...)
  • dgrid-refresh-complete event's results property has been removed, due to changes made for dstore integration
  • dgrid-error event's error.grid nested property removed; obsoleted by grid property directly on event
  • dgrid-datachange event's rowId property has been removed, after being deprecated in 0.3; use event.cell.row.id instead
  • Grid#_configColumn is no longer passed a columnId argument, as it is already available via column.id (via the first argument)
  • Selector: disabled column definition property removed; use Selection#allowSelect instead
  • Selector: dgrid-select-all class has been removed, as nothing depended on it and it was not applied consistently (#842)
  • Tree: allowDuplicates property removed, as support for this was superficial at best and more complete support would require adding undesirable complexity to core APIs like List#row. Instead, ensure your store items possess unique IDs, or ensure get and getIdentity can handle items accordingly.
  • dgrid/util/mouse removed; use event delegation with dojo/mouse events in Dojo 1.8+ instead
  • The dgrid-cell-padding CSS class has been removed as it was only meaningful for IE6 and IE7; use dgrid-cell instead

New APIs and Features

  • _StoreMixin now supports a shouldTrackCollection property which indicates whether the grid should react to changes to trackable stores; the default is true
  • Editor now supports autoSelect column definition property for text field or TextBox-based widgets, to select the text in the field when an editor is activated
  • Tree now adds a dgrid-row-expanded class to rows that have been expanded to show their children
  • Pagination#refresh: Added keepCurrentPage option to refresh without resetting to the first page

Bower Support

dgrid 0.4 now contains a bower.json, so it can automatically install its dependencies when installed via bower. Further information is available in the README.

Tests Upgraded to Intern 2

The tests in dgrid 0.4 have been updated to work with Intern 2 and Leadfoot, and are now expected to be run with Intern installed under the dgrid directory rather than outside it. The testing directions in the README have been updated accordingly.