Closed benloh closed 5 months ago
Heh, sorry I didn't realize setting the assignee would send this to you right away...there are some interacting issues that I'm still working out. I'll update later tonight or tomorrow.
Ok - I thought that was code for “tell me what you want” 😂
We need to work out a couple of disconnects related to created
, updated
, and revision
.
In our transition from the 1.0 UI to the current 1.5 UI, the Created, Updated, and Revision values were not fully implemented. As a result there might be missing values or "Invalid Dates" on some project and export files.
There was a disconnect with the way we were handling these fields. The created
, updated
, and revision
fields are all generated and updated automatically by loki with every database operation. These fields are saved as meta
fields (e.g. node.meta.created
, and edge.meta.created
). In our UI overhaul, we had flattened the fields and removed the use of the meta
subproperties. This conflicted with the way the loki database was handling those updates, resulting in mixed up times and revisions. This should now be resovled.
revision
Revision behavior is now slightly different.
Note that -1
is no longer used.
See also #125.
created
and updated
When exporting data, we export created
and updated
fields as human-readable text. e.g.
1/25/2024, 4:22:06 PM
This can be useful for browsing the exported CSV file.
The internal data format used in the db is actually an integer representing the number of milliseconds elapsed since the epoch, which is defined as the midnight at the beginning of January 1, 1970, UTC. The importer/exporter automatically does this conversion.
The overall import and export behavior has been refined.
created
in exports if template's hidden
value is falseupdated
in exports if template's hidden
value is falserevision
in exports if template's hidden
value is falsecreated
and updated
will export UTC milliseconds to localeString, e.g. 1/25/2024, 4:22:06 PM
revision
is defined, use the imported value to override the db valuerevision
is not defined, default to 0
created
and updated
will convert localeString 1/25/2024, 4:22:06 PM
to internal UTC millisecondscreated
is missing, the import time will be used for created
AND updated
time (because writing to the db triggers setting updated
, and if created
is missing but updated
is not, updated
will still be overwritten with the import created
time).updated
is missing, the import time will be used. We'll probably want to bump the version number to 1.6.0 to reflect the change in data format.
This should be more robust in case anyone uses updated for a filter?
@jdanish We do not currently support filtering based on the meta date data. Do we need to add support for filtering based on created
and updated
fields? revision
too? Adding filters for dates is a little complicated -- we'd probably have to add a date picker.
OK, great. I think let's stop there. I'm tempted to add 3 issues that we revisit later: 1) Adding date fields (would be generally nice, and also needed for 3, but not urgent) 2) Making provenance elements visible in the node / edge tables (nice but not urgent) 3) filtering by updated / created (nice, and no clue who would use, so definitely not urgent)
One of the things we'll be discussing with the teachers who just used Net.Create as well as our advisory board is what design priorities they felt would help students most next, etc. With those discussions coming, and then the comment fields being developed among other things, I think we are far enough on provenance to leave it be for the moment and see how things come together. Does that work? Otherwise, this fix seems good, but I'll test locally a bit more before officially reviewing and I'd say let's tag then because it impacts import / export.
Flagging for @kalanicraig to sign off
Yeah, punting on date fields and filtering on created/updated sounds good. I'll add that as an issue.
Adding provenance to tables is easy, but I think we hadn't because I had expected us to make changes to it. But this is a 5 minute change, so I'll go ahead and add it.
Is it possible to put provenance all in one cell / column for space purposes on display?
Is it possible to put provenance all in one cell / column for space purposes on display?
I'm not sure I understand. You want it on one line?
This is what it currently looks like:
I'd rather not introduce horizontal scrolling because it becomes really hard to manage.
No, that’s fine. I was thinking of adding update and revisions into those cells but that’s too much. Go with that thanks!
If we have time we probably need to do an overhaul of the tables anyway to better handle column widths.
Yeah that’s part of why I suggested it for the comment list - having better column setup and adjustment would be nice!
My pitch is:
If that revision to the schema doesn't make sense, using revision count for the save function is fine by me, but I think this might do similar work and keep some things up to date / easier to interpret?
@benloh @kalanicraig does this work?