Files
deckcraft/crates/engine
Hamza 370b38e69a A date with no field to keep takes the deck's remembered format
My previous commit withheld the format from `set_date` whenever the caller had
not named one, so a field the slide already had would not be rewritten. That is
right where there is a field. A placeholder showing a fixed date holds plain
text and no date field at all, so there was no format to preserve and the
withheld format left `date_kind("")` to build a `datetime1`: a slide taken from
`datetime11` to fixed text and back came away on the short date (noted in
review).

The deck's format now always reaches `set_date`, and `format_given` is what
decides whether it may rewrite an existing field. With no field, there is
nothing to preserve and the remembered format is what a new one takes.

`a_fixed_date_turned_automatic_again_comes_back_on_the_remembered_format` walks
that transition with no `dateFormat` in the call, which is what the dialog
sends, and goes on to assert the guard still holds where a field does exist. It
is a test of its own rather than more of `the_automatic_date_takes_the_format_it_is_given`,
because setting a format for one slide also moves the deck's global one, which
that test's later assertions depend on.
2026-11-02 15:57:14 +05:00
..
…