Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repetitive structures #6229

Merged
merged 6 commits into from
Mar 22, 2021
Merged

Repetitive structures #6229

merged 6 commits into from
Mar 22, 2021

Conversation

gestchild
Copy link
Contributor

When lots of the works were digitised, structures with multiple pages such as table of contents were created individually, rather than as a single structure with a range of pages.

This means we will often display repetitive links to the essentially the same thing.

Until we can improve the data at source, this function groups structures that have the same label attached to consecutive pages into a single structure.

Before:
before

After:
after

Base automatically changed from item-viewer-ui to master March 16, 2021 14:24
# Conflicts:
#	common/views/components/ViewerStructuresPrototype/ViewerStructuresPrototype.tsx
acc.previousLabel === structure.label &&
firstCanvasIndex === acc.previousLastCanvasIndex + 1
) {
acc.groupedArray[acc.groupedArray.length - 1].canvases.push(
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer concat to be less mutable?

@gestchild gestchild merged commit fec1514 into master Mar 22, 2021
@gestchild gestchild deleted the repetitive-structures branch March 22, 2021 11:37
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.

2 participants