ARC-3815 Timeline component - #386
Conversation
https://meemoo.atlassian.net/browse/ARC-3815 Adjusts spacing, padding, and text colors within the `BlockTimeline` component for improved visual appearance and readability. Repositions image captions for better structural hierarchy. Introduces `AudioOrVideoPlayerProps` and registers a placeholder player in `AdminConfig` to facilitate media integration within the timeline for Het Archief. Updates button configurations in the local test app to align with Het Archief button styles.
…g and generic player Optimizes performance by fetching all timeline IE objects in a single batched request. Integrates the generic `AudioOrVideoPlayer` component for media playback, replacing the `FlowPlayerWrapper`. Includes minor styling updates for the year display and UI improvements for the editor's content picker. https://meemoo.atlassian.net/browse/ARC-3815
Separates the media display and metadata/CTA logic for timeline objects into dedicated components (`BlockTimelineObject` and `BlockTimelineObjectMeta`). This improves modularity and maintainability of the `BlockTimeline`. Updates styling for responsive year column widths and refines the object metadata layout for a clearer visual presentation. https://meemoo.atlassian.net/browse/ARC-3815
…edia styling Refines the responsive design of timeline nodes, particularly for items with images and objects. Addresses object title truncation issues on smaller screens and introduces distinct mobile spacing and CTA. Repositions object metadata within the content area to facilitate the new responsive layout. https://meemoo.atlassian.net/browse/ARC-3815
| <Spacer margin="top-large" style={{ color: contentColor }}> | ||
| {isString(textBelowButtons) && <Html content={textBelowButtons} type="p"></Html>} | ||
| {isString(textBelowButtons) && <Html content={textBelowButtons} type="p" />} | ||
| {!isString(textBelowButtons) && textBelowButtons} |
There was a problem hiding this comment.
| {!isString(textBelowButtons) && textBelowButtons} | |
| {isString(textBelowButtons) ? <Html content={textBelowButtons} type="p" /> : textBelowButtons} |
| export enum IeObjectType { | ||
| VIDEO = 'video', | ||
| VIDEO_FRAGMENT = 'videofragment', | ||
| AUDIO = 'audio', | ||
| AUDIO_FRAGMENT = 'audiofragment', | ||
| FILM = 'film', | ||
| NEWSPAPER = 'newspaper', | ||
| NEWSPAPER_PAGE = 'newspaperpage', // Should never be used, but does seem to pop up some times | ||
| IMAGE = 'image', // Should never be used, but does seem to pop up some times | ||
| } |
There was a problem hiding this comment.
Hebben we dit niet ook al ergens in een andere PR en trekken we het hier niet beter gelijk daarmee?
| allowFullScreen?: boolean; | ||
| paused: boolean; | ||
| onPlay: () => void; | ||
| onPause: () => void; |
There was a problem hiding this comment.
Ik denk dat we hier ook nog best een onEnd gaan toevoegen 😅
| imageCaptionCopyright: TEXT_FIELD({ | ||
| label: tText( | ||
| 'react-admin/modules/content-page/components/blocks/block-timeline/block-timeline___bijschrift-copyright', | ||
| {}, | ||
| [HET_ARCHIEF] | ||
| ), | ||
| validator: undefined, | ||
| isVisible: visualTypeIsImage, | ||
| }), | ||
| imageCaptionCopyrightIconVisible: { | ||
| editorType: ContentBlockEditor.Checkbox, | ||
| editorProps: { | ||
| label: tText( | ||
| 'react-admin/modules/content-page/components/blocks/block-timeline/block-timeline___copyright-icoon-toevoegen', | ||
| {}, | ||
| [HET_ARCHIEF] | ||
| ), | ||
| } as CheckboxProps, | ||
| isVisible: visualTypeIsImage, | ||
| }, | ||
| imageCaptionDescription: TEXT_FIELD({ | ||
| label: tText( | ||
| 'react-admin/modules/content-page/components/blocks/block-timeline/block-timeline___bijschrift-beschrijving', | ||
| {}, | ||
| [HET_ARCHIEF] | ||
| ), | ||
| validator: undefined, | ||
| isVisible: visualTypeIsImage, | ||
| }), |
There was a problem hiding this comment.
Gebruik hier liever COPYRIGHT_FIELDS van de defaults voor. Dat is consistenter
| {(node.imageCaptionCopyright || node.imageCaptionDescription) && ( | ||
| <div className="c-block-timeline__node-image-caption"> | ||
| {node.imageCaptionCopyright && ( | ||
| <p className="c-block-timeline__node-image-copyright"> | ||
| {node.imageCaptionCopyrightIconVisible !== false && ( | ||
| <span aria-hidden="true">© </span> | ||
| )} | ||
| {node.imageCaptionCopyright} | ||
| </p> | ||
| )} | ||
| {node.imageCaptionDescription && ( | ||
| <p className="c-block-timeline__node-image-description"> | ||
| {node.imageCaptionDescription} | ||
| </p> | ||
| )} | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
Dan kan je hier gewoon CopyrightAttribution gebruiken die alle rendering hiervoor doet. Dan is het consistent op elke plek
| const formatDate = (date: string): string => | ||
| isValidDate(date) | ||
| ? new Intl.DateTimeFormat(locale, { | ||
| day: 'numeric', | ||
| month: 'long', | ||
| year: 'numeric', | ||
| }).format(new Date(date)) | ||
| : ''; |
There was a problem hiding this comment.
| const ieObject = | ||
| node.visualType === 'OBJECT' && node.mediaItem?.value | ||
| ? ieObjectsByPid?.[String(node.mediaItem.value)] | ||
| : undefined; |
There was a problem hiding this comment.
Verhuis je dat niet beter onder hasObject en dan kan je hasObject gebruiken voor de check zelf?
There was a problem hiding this comment.
Deze gaan we misschien beter naar de shared verhuizen voor hergebruik zoals ook in de hero carousel?
| {tText( | ||
| 'react-admin/modules/content-page/components/blocks/block-timeline/block-timeline___bekijk-volledig-fragment', | ||
| {}, | ||
| [HET_ARCHIEF] | ||
| )} |
There was a problem hiding this comment.
Gaan we deze label niet beter afhankelijk maken van het object type? Zodat het niet "Fragment" noemt voor kranten? Lijkt me namelijk een vreemde beschrijving
| <SmartLink | ||
| action={{ | ||
| type: AvoCoreContentPickerType.INTERNAL_LINK, | ||
| value: `/pid/${ieObject.schemaIdentifier}`, | ||
| }} | ||
| ariaLabel={tText( | ||
| 'react-admin/modules/content-page/components/blocks/block-timeline/block-timeline___bekijk-volledig-fragment', | ||
| {}, | ||
| [HET_ARCHIEF] | ||
| )} | ||
| className="c-block-timeline__node-object-cta--mobile" | ||
| > | ||
| <Button variants={['block', 'black', 'sm']}> | ||
| <Icon name={'arrow-down-right' as IconName} /> | ||
| </Button> | ||
| </SmartLink> |
There was a problem hiding this comment.
2x dezelfde component met dezelfde settings etc?
https://meemoo.atlassian.net/browse/ARC-3815
Still todo:
te bespreken waar we de logica zetten om kranten in high quality thumbnail op te halen
zodat we dit maar 1 keer bouwen