Skip to content

feat(ARC-3813): add the driekeuzespeler content block - #436

Open
RobbeBierebeeck wants to merge 45 commits into
release/v6.0.0from
feature/ARC-3813_driekeuzespeler
Open

feat(ARC-3813): add the driekeuzespeler content block#436
RobbeBierebeeck wants to merge 45 commits into
release/v6.0.0from
feature/ARC-3813_driekeuzespeler

Conversation

@RobbeBierebeeck

Copy link
Copy Markdown
Contributor

https://meemoo.atlassian.net/browse/ARC-3813

Adds the driekeuzespeler: three random interests as tiles, each opening its
object in a modal.

IE_OBJECT_WITH_SNIPPET_TIME_FIELDS held the object picker inline, so a block
that points at an object without a snippet could not reuse it. Moves the field
to defaults.ts next to the other field helpers and has the snippet helper call
it, with the fields it resets on change as a parameter.

No behaviour change: the timeline and video blocks get the same field they had.
A new HET_ARCHIEF content block that offers three curated interests at random,
each a tile with its object's thumbnail and a coloured pill. Clicking a tile
opens the object in a modal; the shuffle CTA deals three more.

Config holds a title, one colour pair per tile position, the shuffle label and
3 to 200 interests. The colours belong to the position rather than the interest,
because a shuffle decides which interest lands where.

Also adds a ThemeSelect editor type for picking the one theme an interest links
to, and a config slot for the host's IIIF viewer so a newspaper opens in the
real viewer rather than a flat still.

Two parts of the FA are not in here: the secondary CTA needs a theme search
filter that does not exist yet, and the hover animation still awaits the example
the FA lists as an open question.

@reunefe reunefe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voor ik er verder in detail doorga, lijkt het me beter om de bestaande zaken reeds op te pikken.
Vooral de roundtrips via meerdere API calls lijkt me niet ideaal. Doel van de playable data was net om dat te vermijden.

Comment thread ui/src/react-admin/modules/shared/hooks/useGetAllThemes.ts Outdated
Comment thread ui/src/react-admin/modules/shared/styles/mixins/_typography.scss
Comment thread ui/src/react-admin/modules/shared/components/ThemeSelect/ThemeSelect.tsx Outdated
Comment thread ui/src/react-admin/modules/content-page/types/content-block.types.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/components/blocks/defaults.ts Outdated
…-3813_driekeuzespeler

# Conflicts:
#	ui/src/react-admin/core/config/config.types.ts
#	ui/src/react-admin/modules/content-page/components/blocks/BlockTitleWithParallax/BlockTitleWithParallax.scss
…open

The tile objects were already prefetched, but the theme behind the modal's
secondary CTA was still fetched when a tile was opened. Resolve all three with
the selection instead, deduplicated and sorted so a shuffle back to a selection
already seen is served from the cache.
Comment thread ui/src/react-admin/modules/shared/services/ie-objects-service/ie-objects.types.ts Outdated
Comment thread ui/src/react-admin/modules/shared/types/index.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/types/content-block.types.ts Outdated
Comment thread ui/src/react-admin/core/config/config.types.ts
Comment thread ui/src/react-admin/modules/content-page/types/content-block.types.ts Outdated
…dpoints

The block uses the shared playable-data hook instead of its own, so the
narrowing param and the newspaper page list come off playable-display-data
again. The IIIF viewer is handed a whole ie-object from the general
ie-objects endpoint. The shuffle CTA moves to the shared button.
…block

The helper takes a label and an isRequired flag, which is what the objects
grid needed to stop declaring its own copy of the same picker.
Rendering both variants and letting CSS pick one means keeping two buttons in
sync, which the width branch was chosen over. The divider moves out of the
shared component to the one block that needs it.
The shapes layer drops from five boxes to two, the shapes are masked so they
take the block's WCAG colour, and the interest pill scales with the stage so
it no longer overflows its tile between 700px and the design's 1440.
…-3813_driekeuzespeler

# Conflicts:
#	ui/src/react-admin/modules/content-page/components/IeObjectMetadata/IeObjectMetadata.tsx
The block resolves its three objects through the general ie-objects endpoint
and tickets a file only when a tile is opened, so the playable media endpoint
on the proxy needs no change at all.
Comment thread ui/src/react-admin/modules/content-page/components/blocks/defaults.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/components/blocks/defaults.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/components/blocks/defaults.ts Outdated
Comment thread ui/src/react-admin/modules/shared/services/ie-objects-service/ie-objects.types.ts Outdated
Comment thread ui/src/react-admin/modules/shared/services/ie-objects-service/ie-objects.types.ts Outdated
Comment thread ui/src/react-admin/modules/shared/helpers/map-format-to-type.ts Outdated
Comment thread ui/src/react-admin/modules/shared/helpers/is-audio-video-format.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/hooks/useGetPlayableFileForIeObjects.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/components/blocks/defaults.ts Outdated
Removes the local re-exports of IeObject(File/Page)/IeObjectType/SimpleIeObjectType
and updates every consumer to import them straight from @viaa/avo2-types.
Moves theme-search url building out of BlockDriekeuzespelerModal into
ThemesService.getThemeSearchPath, mirroring IeObjectsService.getObjectDetailPath.
The host app can now supply its own url via config; unconfigured falls back to
the plain search page instead of the previous hardcoded, ignored query param.
…-3813_driekeuzespeler

# Conflicts:
#	ui/src/react-admin/modules/content-page/components/IeObjectMetadata/IeObjectMetadata.tsx
#	ui/src/react-admin/modules/content-page/components/blocks/BlockThemeReels/BlockThemeReelSection.tsx
Comment thread ui/src/react-admin/core/config/config.types.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants