diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2022-08-16 12:36:08 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2022-09-03 08:50:19 +0200 |
commit | 1d44c11483e3d00611c0beed9afc8f2c9facc3a8 (patch) | |
tree | 6a38fecd4acca16fb8c6d1b4322b2e10fbe0d5ad /gnome-contacts.doap | |
parent | 4d0710b8a6c7a3cd2ee0311b62f5e2707c34c305 (diff) | |
download | gnome-contacts-1d44c11483e3d00611c0beed9afc8f2c9facc3a8.tar.gz |
Introduce the concept of Contacts.Chunk
This commit introduces a new class `Contacts.Chunk`. Just like libfolks,
we see a contact as a collection of data, or to word it differently: a
collection built up from "chunks" of information.
The net result of adding this concept adds quite a bit of lines of code,
but it does have some major benefits:
* Rather than stuffing new properties into yet another if-else spread
out over multiple places in contacts-utils (and quite a bit of other
files), we can create a new subclass of `Contacts.Chunk`
* This also goes for property-specific logic, which we can consolidate
within their appropriate classes/files.
* All of our logic is now unit-testable
In the future, this would allow for more cleanups/features:
* We can put the serialization code for each property inside the
`Contacts.Chunk`
* We can extend ContactSheet to show a vCard's information, before
actually importing it into a Folks.Individual.
* We can write unit tests on the set of chunks, rather than regularly
having to deal with yet another regression in e.g. the birthday
editor.
Diffstat (limited to 'gnome-contacts.doap')
0 files changed, 0 insertions, 0 deletions