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

Timeline model #245

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Timeline model #245

merged 3 commits into from
Apr 3, 2024

Conversation

davidfurey
Copy link
Member

What does this change?

How to test

How can we measure success?

Have we considered potential risks?

Images

Accessibility

@gu-scala-library-release
Copy link
Contributor

@davidfurey has published a preview version of this PR with release workflow run #60, based on commit 17f5ef3:

23.0.0-PREVIEW.timeline-model.2024-03-26T1038.17f5ef3f

Want to make another preview release?

Click 'Run workflow' in the GitHub UI, specifying the timeline-model branch, or use the GitHub CLI command:

gh workflow run release.yml --ref timeline-model

Want to make a full release after this PR is merged?

Click 'Run workflow' in the GitHub UI, leaving the branch as the default, or use the GitHub CLI command:

gh workflow run release.yml

@davidfurey davidfurey marked this pull request as ready for review March 28, 2024 11:14
@davidfurey davidfurey requested a review from a team as a code owner March 28, 2024 11:14
Copy link
Contributor

@rhystmills rhystmills left a comment

Choose a reason for hiding this comment

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

Looks consistent with our requirements 👍

Copy link
Contributor

@jonathonherbert jonathonherbert left a comment

Choose a reason for hiding this comment

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

These changes all look reasonable. Thrift being the authority for so much of our modelling, I do feel like a lot of what's here would benefit from more description, especially when so many modelling decisions we make are quite tactical.

I've added some comments asking questions about what are likely perfectly reasonable modelling decisions, and I wonder if in answering them you could add those comments to the model for future reference.

struct TimelineEvent {
1: required list<BlockElement> body = [];

2: optional BlockElement main;
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference between a main element and the body elements?

Copy link
Member Author

Choose a reason for hiding this comment

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

Similar to the main block (used for main media) and body blocks (used for the article), we will allow a single main element and then have the rest of the content in body. This will make it easier for the platforms to render the first image differently.


4: optional string date;

5: optional string label;
Copy link
Contributor

Choose a reason for hiding this comment

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

How is this label used? We already have a title, but it looks like there's additional description required, I wonder whether we can document why here

Copy link
Member Author

Choose a reason for hiding this comment

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

In this example "Primary" is a label.
Screenshot 2024-03-28 at 15 54 21


3: optional string title;

4: optional string date;
Copy link
Contributor

Choose a reason for hiding this comment

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

Presume the reason we are not using CapiDateTime here is because this is audience facing and may be formatted in many different ways?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need to allow timelines to include events where the date is not exactly known, where it could be a range, etc. At some point in the future I'd like to explore making this machine readable (perhaps using https://www.loc.gov/standards/datetime/). But for version 1, a string seems reasonable.

@Fweddi Fweddi merged commit 3fa6ebd into main Apr 3, 2024
1 check passed
@Fweddi Fweddi deleted the timeline-model branch April 3, 2024 13:06
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.

Decide How Timeline Hierarchy Will Be Modelled
4 participants