-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix IsLocalDateTime and use it in FilterJsonConverter
- Loading branch information
1 parent
eab66f3
commit 68914f6
Showing
3 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68914f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time Machine 2.0
Since the last three months there have been a series of changes, mainly done by @JafarMirzaie, that can be group together in the "Time Machine 2.0" theme.
The main focus of this change is to make the Time Machine more approachable for the end user.
1. Clien Side Diffs
This change improves performance of the Diff algorithm and, more important, moves the computation from the server to the client browser.
Already mentioned here.
2. New Time Machine UI
There have been many changes in the Time Machine UI:
UI Differences
The new
TimeMachineIcons
is a small circle in the upper left corner/left side and indicates changes of the value by taking one of the following colors:The icon is now supported by all the controls:
ValueLine
,EntityLine
,EntityCombo
,EntityDetail
,EntityStrip
,EntityTable
,EntityTabRepeater
,EntityRepeater
,EntityCheckboxList
,EnumCheckboxList
,... Thanks @JafarMirzaie!Internally it works by adding a new field
previousVersion
toTypeContext
, so for a typical user interface using all the previously mentioned controls should work without any code changes!!.Search Control
Also
SearchControl
,SearchValue
andSearchValueLine
are compatible with the time machine.The TimeMachine writes the value
SystemValidFrom
of the selected version and the previous version into two new fields of theEntityFrame
(part of the TypeContext) calledcurrentDate
andpreviousDate
.Thanks to this information
SearchValue
/SearchValueLine
can executed the query at the begining of the selected interval (AS OF
). Also it can show a YellowTimeMachineIcon
if there have been any differences between the two versions (BETWEEN
).On the other side, the
SearchControl
shows only the changes between this two versions using (BETWEEN
) and some new icons to express if this version has been created (green +) or removed (red -) in this interval. Obsolete versions have also opacity 0.5.Note: If you want to enjoy TimeMachine functionality in your embedded
SearchControl
/SearchValue
remember to set the optionalctx
attribute. ForSearchValueLine
is mandatory anyway.UCT/Local columns.
Finally I made some internal changes in the
Schema
class and LINQ provider to support changingUTC
/Local
mode not only globally, but for particular columns.You can define it like this:
This will correctly set the Kind property of the
DateTime
when retrieved from the database (SQL has not kind property) and will validate the Kind property when saving or even when comparing in LINQ queries.This is necessary because
SystemValidFrom
andSystemValidTo
are always UTC. Before this change it was hacked together usingDateTimeOffset
but this produced other problems.This change was challenging because it required adding some additional information to any expression tree, including the ones created by Microsoft.
Thanks to some magic in
ExpressionMetadataStore
usingConditionalWeakTable
andThreadStatic
was possible.Finally
Go use the time machine if you are not doing it yet, it is easy!:
https://github.com/signumsoftware/southwind/blob/182c3c08655a8cdf35fd55b85b1e9ce732f8c3e4/Southwind.Logic/Starter.cs#L350
https://github.com/signumsoftware/southwind/blob/182c3c08655a8cdf35fd55b85b1e9ce732f8c3e4/Southwind.React/App/MainAdmin.tsx#L80
And remember to synchronize!
68914f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.