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

Enhance timeline elements with ids #27055

Merged
merged 4 commits into from
Apr 22, 2024
Merged

Enhance timeline elements with ids #27055

merged 4 commits into from
Apr 22, 2024

Conversation

abeddow91
Copy link
Contributor

@abeddow91 abeddow91 commented Apr 17, 2024

What does this change?

Enhances the timeline element so that each child element has an element id. This is required for the DCR to correctly match the elements with its schema.

It also refactors the ElementsEnhancer using pattern matching and adds comments to help improve readability.

It also renames enhanceObjectWithElementsAtDepth1 => enhanceObjectsWithElements as we are no longer limiting the function to only going to a depth of 1.

Screenshots

Data Structure

Before After
before after

Article

Before After
before-1 after-1

Checklist

@abeddow91 abeddow91 force-pushed the ab/enhance-timeline branch from 85a9d49 to 8aa5ec8 Compare April 18, 2024 10:16
@abeddow91 abeddow91 marked this pull request as ready for review April 18, 2024 10:35
@abeddow91 abeddow91 requested a review from a team as a code owner April 18, 2024 10:35
@abeddow91 abeddow91 requested a review from alinaboghiu April 18, 2024 10:49
@abeddow91 abeddow91 force-pushed the ab/enhance-timeline branch from 0acc43f to 876c631 Compare April 18, 2024 11:02
Copy link
Contributor

@mxdvl mxdvl left a comment

Choose a reason for hiding this comment

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

Nice – bar the fact that elementId does not bring much value

@prout-bot
Copy link
Collaborator

Seen on FRONTS-PROD, ADMIN-PROD (merged by @abeddow91 11 minutes and 7 seconds ago)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance Timeline elements with an element Id
3 participants