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

DSRC-62: Document block #1638

Merged
merged 29 commits into from
Jul 10, 2024
Merged

DSRC-62: Document block #1638

merged 29 commits into from
Jul 10, 2024

Conversation

jamesbiggs
Copy link
Collaborator

@jamesbiggs jamesbiggs commented Jun 5, 2024

Ticket URL: DSRC-62

About these changes

Adds a DocumentBlock to the ArticlePageStreamBlock so that you can add a link to a document with your desired text.

How to check these changes

In the CMS:

Page view:

image

Document view:

image

In the API:

image

Before assigning to reviewer, please make sure you have

  • Checked things thoroughly before handing over to reviewer
  • Checked PR title starts with ticket number as per project conventions to help us keep track of changes
  • Ensured that PR includes only commits relevant to the ticket
  • Waited for all CI jobs to pass before requesting a review
  • Added/updated tests and documentation where relevant

Merging PR guidance

Follow docs\developer-guide\contributing.md

Deployment guidance

Follow docs\infra\environments.md

@jamesbiggs jamesbiggs requested a review from ahosgood June 13, 2024 09:52
@ahosgood
Copy link
Member

There is a DocumentSerializer: https://github.com/wagtail/wagtail/blob/5a1ba5abe2511aad29d927cef85e5a73916f2375/wagtail/documents/api/v2/serializers.py

I can't remember where the design is but I think we need the file name, mime type and file size. The model looks like it has a few of these fields ready to go: https://github.com/wagtail/wagtail/blob/5a1ba5abe2511aad29d927cef85e5a73916f2375/wagtail/documents/models.py#L40

I think there was a requirement to allow a list of downloads - was this your understanding as well?

@ahosgood
Copy link
Member

Another thought - are these going into article pages or the yet-to-be-defined "standard page"?

@jamesbiggs
Copy link
Collaborator Author

There is a DocumentSerializer: https://github.com/wagtail/wagtail/blob/5a1ba5abe2511aad29d927cef85e5a73916f2375/wagtail/documents/api/v2/serializers.py

I can't remember where the design is but I think we need the file name, mime type and file size. The model looks like it has a few of these fields ready to go: https://github.com/wagtail/wagtail/blob/5a1ba5abe2511aad29d927cef85e5a73916f2375/wagtail/documents/models.py#L40

Perfect 😎

I think there was a requirement to allow a list of downloads - was this your understanding as well?

I haven't seen that anywhere on any of the tickets, just the ability to add one file... Was it in a discussion somewhere?
image

@ahosgood
Copy link
Member

We have too many tickets per component! 😅

The design one mentions one or more:
https://national-archives.atlassian.net/jira/software/projects/DES/boards/138?selectedIssue=DES-5

There is a design somewhere that shows a list as well but I've only seen it on other's screens.

Co-authored-by: Andrew Hosgood <andrew.hosgood@nationalarchives.gov.uk>
@jamesbiggs jamesbiggs requested a review from ahosgood July 10, 2024 12:26
@jamesbiggs jamesbiggs merged commit 445c236 into develop Jul 10, 2024
8 checks passed
@jamesbiggs jamesbiggs deleted the feature/DSRC-62-documents branch July 10, 2024 14:09
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