Deprecation of cssClass in sections and repeaters #1086

Merged
merged 1 commit into from Apr 14, 2014

Conversation

Projects
None yet
2 participants
Collaborator

flongo commented Apr 7, 2014

cssClass property in section and repeater configuration is now deprecated. It has to be replaced by attributes.classList.

In the specific case of the childSections configuration for the repeater, the cssClass could be a function like any other property, with the peculiarity that the function was called every time a change occurred in the bound map/array. This allowed to implement pyjama tables.
With this commit, this feature is replaced and enhanced: if the attributes property in the childSections configuration is a function, it is called every time there is a data change and its returned value is used to update the section attributes of each entry.

@flongo flongo added a commit to flongo/ariatemplates that referenced this pull request Apr 7, 2014

@flongo flongo feat #1086 Deprecation of cssClass in sections and repeaters
`cssClass` property in section and repeater configuration is now deprecated. It has to be replaced by `attributes.classList`.

In the specific case of the `childSections` configuration for the repeater, the `cssClass` could be a function like any other property, with the peculiarity that the function was called every time a change occurred in the bound map/array. This allowed to implement pyjama tables.
With this commit, this feature is replaced and enhanced: if the `attributes` property in the `childSections` configuration is a function, it is called every time there is a data change and its returned value is used to update the section attributes of each entry.

Close #1086
da9ab84

flongo added this to the 1.5.2 milestone Apr 7, 2014

benouat was assigned by flongo Apr 7, 2014

Owner

benouat commented Apr 14, 2014

da9ab84 is fine for me to be integrated.

In the tests, for all the commented sections saying that it is not yet supported, what are they referring to ?

Collaborator

flongo commented Apr 14, 2014

When the repeater was first introduced, the implemented loopType were array and map, but the idea was to also allow filteredView, sortedView and pagedView. Tests were already written for these types, but the code never was.

Anyway in my commit I am only splitting an existing test (which was long and cumbersome) into smaller tests.

That being said, those commented tests could be removed. What do you think?

Owner

benouat commented Apr 14, 2014

Yes I would say so, as it might be confusing (as myself, i did not get what they were supposed to do in the first place)

Collaborator

flongo commented Apr 14, 2014

I will then remove them

@flongo flongo feat #1086 Deprecation of cssClass in sections and repeaters
`cssClass` property in section and repeater configuration is now deprecated. It has to be replaced by `attributes.classList`.

In the specific case of the `childSections` configuration for the repeater, the `cssClass` could be a function like any other property, with the peculiarity that the function was called every time a change occurred in the bound map/array. This allowed to implement pyjama tables.
With this commit, this feature is replaced and enhanced: if the `attributes` property in the `childSections` configuration is a function, it is called every time there is a data change and its returned value is used to update the section attributes of each entry.

Close #1086
6259bee

@flongo flongo merged commit 6259bee into ariatemplates:master Apr 14, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

flongo deleted the flongo:cssclass-section-repeat branch Jun 19, 2014

@jakub-g jakub-g added a commit to jakub-g/ariatemplates that referenced this pull request Dec 10, 2014

@jakub-g jakub-g remove compat: `cssClass` in sections and repeaters
This removes backward compat for cssClass property in sections
and repeaters. Please use `attributes.classList` instead.

(deprecated in 1.5.2 via GH-1086)
8b95d9d

@jakub-g jakub-g added a commit to jakub-g/ariatemplates that referenced this pull request Dec 10, 2014

@jakub-g jakub-g remove compat: `cssClass` in sections and repeaters
This removes backward compat for cssClass property in sections
and repeaters. Please use `attributes.classList` instead.

(deprecated in 1.5.2 via GH-1086)
f78abc5

@jakub-g jakub-g added a commit to jakub-g/ariatemplates that referenced this pull request Dec 12, 2014

@jakub-g jakub-g remove compat: `cssClass` in sections and repeaters
Removed backward compat for `cssClass` property in sections
and repeaters. Please use `attributes.classList` instead.

(deprecated in 1.5.2 via GH-1086)
60eadbc

@jakub-g jakub-g added a commit that referenced this pull request Jan 8, 2015

@jakub-g jakub-g remove compat: `cssClass` in sections and repeaters
Removed backward compat for `cssClass` property in sections
and repeaters. Please use `attributes.classList` instead.

(deprecated in 1.5.2 via GH-1086)
d2512c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment