fix(project-editor): close redo-staleness window, dedupe footer URL check
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Independent review pass over the Configuration Engine sprint (M1-M6). - Facade: a fresh edit burst now clears the redo (future) stack immediately, not just once its debounced commit lands ~300ms later. Previously, editing right after an undo left canRedo() true for that window; clicking Redo during it would have silently discarded the new edit and jumped back to the stale future snapshot. Reordered two interspersed imports/interface for readability while in the file. - footer-section: removed a local HTTP_URL regex + duplicate isValidUrl logic (its "shared/ui can't import features" justification didn't apply - this file already lives in features/project-editor/sections/, the same feature as schema/validators/). Now calls isValidHttpUrl from schema/validators/primitives, closing a validator duplication the sprint's "no duplicated validators" requirement was meant to catch. Gate: tsc --noEmit, npm test (33/33), arch:check, build all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,7 @@ import { KeyValueEditorComponent } from '../../../shared/ui/key-value-editor/key
|
||||
import { MediaPickerComponent } from '../../../shared/media/media-picker/media-picker.component';
|
||||
import { MediaAsset } from '../../../core/media/models/media-asset.model';
|
||||
import { FooterPaymentIconConfig, FooterSocialLinkConfig } from '../../../shared/models/config';
|
||||
|
||||
/** Mirrors the HTTP_URL check in project-validator.service.ts (kept as a local duplicate: shared/ui must not import from features). */
|
||||
const HTTP_URL = /^https?:\/\/\S+$/;
|
||||
import { isValidHttpUrl } from '../schema/validators/primitives';
|
||||
|
||||
type FooterMediaTarget = 'logo' | { type: 'paymentIcon'; index: number };
|
||||
|
||||
@@ -118,6 +116,6 @@ export class ProjectEditorFooterSectionComponent {
|
||||
}
|
||||
|
||||
isValidUrl(url: string): boolean {
|
||||
return !url || HTTP_URL.test(url);
|
||||
return !url || isValidHttpUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user