Conversation
|
@malberts in which ways is this still draft? I'd be good to have an MVP version of the type soon. UIs and validation can be skipped for now, and ideally we do not block on figuring out the TS topic and do that via another task. |
|
It is draft, because the UI part is still hardcoded in NeoWiki, not RedHerb. However, since the plan was to eventually move this back into core anyway, I'll rebase this to unblock. It just means we're skipping #678 (comment). |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove trailing commas and fix self-closing HTML void elements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Compare timestamps instead of raw strings for min/max validation, making comparison robust across different ISO 8601 formats. Display dates in UTC to match the UTC storage convention. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d0ad125 to
c40fc0b
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without this, the clock icon for the DateTime property type was not loaded by MediaWiki's ResourceLoader, showing no icon in the dropdown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The critical issues are blockers. All the rest can be done in a follow-up. CriticalTimezone handling is silently broken
function toLocalInputValue( isoString ) { return isoString.replace( /Z$/, '' ).slice( 0, 16 ); }
function fromLocalInputValue( localValue ) { return localValue ? localValue + ':00Z' : undefined; }A user in Berlin entering "2025-06-15 14:00" has it stored as Pick one story — UTC-throughout (with a visible "UTC" label) or user-local-with-UTC-storage — and apply it consistently across Input/Display/AttributesEditor. Add a test that runs under a non-UTC
|
|
All of that can be done in follow-ups |




For #678
Summary
DateTimeTypeandDateTimePropertyto RedHerb test extension (PHP backend), proving the plugin system works for non-trivial property types with constraintsDateTimeTypewith ISO 8601 validation and min/max constraint checkingDateTimeDisplay,DateTimeInput(nativedatetime-local),DateTimeAttributesEditorDateTimePropertyserializationStill to do
Neo.ts,NeoWikiExtension.ts) rather than via RedHerb's plugin system. A frontend extension mechanism (mw.hook-based registration) is needed so external extensions can register property type components without rebuilding NeoWiki. This will be addressed in a follow-up.Test plan
DateTimePropertyTest)NeoWikiRegistrationHookTest— skipped when RedHerb not loaded)DateTime.spec.ts— 11 tests)make tscipasses (test + build + lint)🤖 Generated with Claude Code