92776[TASK] Add datetime web component and backend date format service
Commit message
Review
-
Code review CR +2 Done
- Benjamin Kott +2
- Benjamin Franzke +1
- Oli Bartsch +1
-
Verified V +2 Done
- Benjamin Kott +2
- Benjamin Franzke +1
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 19
- Build/Sources/TypeScript/backend/element/datetime-element.ts4new+272 −0
- Build/Sources/TypeScript/backend/type/date-configuration.tsnew+29 −0
- Build/Sources/TypeScript/backend/date-time-picker.ts+5 −4
- Build/Sources/TypeScript/backend/drag-uploader.ts+7 −6
- Build/Sources/TypeScript/filelist/file-list-replace-handler.ts+3 −3
- Build/types/TYPO3/index.d.ts+1 −0
- typo3/sysext/backend/Classes/Controller/BackendController.php+4 −7
- typo3/sysext/backend/Classes/Date/DateConfiguration.phpnew+40 −0
- typo3/sysext/backend/Classes/Date/DateConfigurationFactory.phpnew+59 −0
- typo3/sysext/backend/Classes/Date/DateFormats.phpnew+40 −0
- typo3/sysext/backend/Classes/Form/FormResultCompiler.php+3 −7
- typo3/sysext/backend/Resources/Public/JavaScript/element/datetime-element.jsnew+13 −0
- typo3/sysext/backend/Resources/Public/JavaScript/date-time-picker.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/drag-uploader.js+5 −5
- typo3/sysext/core/Classes/Page/PageRenderer.php4+2 −2
- typo3/sysext/filelist/Resources/Public/JavaScript/file-list-replace-handler.js+1 −1
- typo3/sysext/styleguide/Classes/Controller/ComponentsController.php+66 −1
- typo3/sysext/styleguide/Resources/Private/Language/locallang.xlf+138 −0
- typo3/sysext/styleguide/Resources/Private/Templates/Backend/Components/Datetime.fluid.htmlnew+255 −0
Review log 3042
Show 1217 earlier messages
-
Benjamin Kott uploaded patch set 1 02/10/26, 11:59
-
core-ci voted on patch set 1 V -1 02/10/26, 12:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95538
-
Benjamin Kott uploaded patch set 2
V -102/10/26, 13:29 -
Benjamin Kott updated the commit message in patch set 3 02/10/26, 13:32
-
core-ci voted on patch set 2 V -1 02/10/26, 13:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95546
-
core-ci voted on patch set 3 V -1 02/10/26, 13:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95547
-
Benjamin Kott uploaded patch set 4
V -102/10/26, 13:58 -
core-ci voted on patch set 4 V +1 02/10/26, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95551
-
Georg Ringer commented on patch set 4 02/10/26, 17:13
do we trap into NIH? can't we use https://www.webcomponents.org/element/time-elements ? -
Garvin Hicking commented on patch set 4 02/10/26, 18:28
Reply
I would argue due to the "live updating" it's worthwhile to have? Also I think this referred time element is missing the arria attributions plus tooltip output of absolute date in relative mode? -
Benjamin Kott commented on patch set 4 02/10/26, 18:29
Reply
it does something different, this one is adapting to our date formats, handles our wrong locales for zh (ch), has refresh if needed and is only a simple wrapper around luxon that we already use in other places. -
Benjamin Kott commented on patch set 4 02/10/26, 18:35
Reply
in addition i would really like to avoid collecting elements from here and there, we should cover them ourselfs if there is nothing in the native browser spec and we should try to remove again what we can and only preserve slim wrappers -
Georg Ringer commented on patch set 4 02/10/26, 19:56
Reply
just asking questions, using something which is maintained by github and got 4k stars is not a "here-and-there" component. -
Benjamin Kott rebased onto patch set 5
V +102/11/26, 13:48 -
core-ci voted on patch set 5 V +1 02/11/26, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95620
-
Oliver Hader commented on patch set 5 02/12/26, 09:08
Reply
There are also a bunch of aspects that have not been addressed by Google (https://github.com/github/relative-time-element/issues). Having our own `<typo3-backend-datetime>` element gives us more flexibility here (updates, centralized datetime formats, styling & aria, ...) -
Georg Ringer voted on patch set 5 CR +1 V +1 02/12/26, 11:15
-
Benjamin Kott commented on patch set 5 CR -1 02/12/26, 13:20
on it -
Benjamin Kott uploaded patch set 6
CR +1V +102/12/26, 13:43 -
Benjamin Kott uploaded patch set 7 02/12/26, 13:44
-
Benjamin Kott uploaded patch set 8 02/12/26, 13:59
-
core-ci voted on patch set 8 V +1 02/12/26, 14:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95742
-
core-ci voted on patch set 6 V -1 02/12/26, 14:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95736
-
core-ci voted on patch set 7 V +1 02/12/26, 14:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95737
-
Oli Bartsch commented on patch set 8 02/12/26, 16:32
DateFormatConfigurationService.php:29This reads more like a factory then a service?DateFormats.php:25Why is this plural?PageRenderer.php:983This looks like a hack. I would like to avoid this. It's a public method in a non @internal class. Side effects can not be ruled out here. -
Benjamin Kott commented on patch set 8 02/12/26, 21:14
PageRenderer.php:983Replythe behavior was present before but with empty string, just made it clear and used null instead -
Benjamin Kott uploaded patch set 9
V +102/12/26, 22:59 -
Benjamin Kott commented on patch set 9 02/12/26, 23:02
DateFormatConfigurationService.php:29Replyi agree here, but i also renamed it to DateConfigurationFactory, with the DateConfiguration Matching now. this made more sense the more i looked at it. it's simply more than just format configurationDateFormats.php:25ReplyIt´s a collection of formats, its never a single format. its a wrapper that holds more than one format. -
Benjamin Kott commented on patch set 9 02/12/26, 23:04
PageRenderer.php:983ReplyI can change it back, but having the empty string assigned as first parameter looked wired, and the function is still not strictly typed, it just felt better... 😅 -
core-ci voted on patch set 9 V +1 02/12/26, 23:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95789
-
Benjamin Franzke commented on patch set 9 02/16/26, 10:55
PageRenderer.php:983ReplyThe only change is that the namespace '"0"' is not omitted, which makes no difference for any realworld namespace usage. I think this is ok as a drive by. I think it would be better to use a namespace, but since this method allows non-namespaces usage, it's also fine to skip it and `null` is better as `""` then. -
Benjamin Kott uploaded patch set 10
V +102/16/26, 12:08 -
core-ci voted on patch set 10 V +1 02/16/26, 12:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95963
-
Benjamin Kott updated the commit message in patch set 11
V +102/16/26, 13:51 -
core-ci voted on patch set 11 V +1 02/16/26, 14:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95964
-
Benjamin Franzke commented on patch set 11 CR -1 02/16/26, 14:44
on itdatetime-element.ts:78Derived values should be implemented in `willUpdate`, see https://lit.dev/docs/components/properties/#accessors-custom > To compute values from existing properties, we recommend using the willUpdate callback, which allows you to set values during the update cycle without triggering an additional update.datetime-element.ts:82This will also be true on initial render. That means the timer will be started twice (once in connectedCallback and once here). It can be removed in `connectedCallback()`, otherwise this could would need to be `if (changedProperties.has('mode') && changedProperties.get('mode') !== undefined)`, but removing it in connected callback is better. -
Benjamin Franzke uploaded patch set 12
CR -1V +102/16/26, 15:04 -
Benjamin Franzke commented on patch set 12 02/16/26, 15:04
datetime-element.ts:78ReplyDonedatetime-element.ts:82ReplyDone -
core-ci voted on patch set 12 V +1 02/16/26, 15:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95972
-
Oli Bartsch voted on patch set 12 CR +1 V +1 02/16/26, 15:52
-
Benjamin Kott voted on patch set 12 CR +2 V +2 02/16/26, 17:00
-
Benjamin Kott merged patch set 13 02/16/26, 17:00