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

Abstract title handling #532

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fred-atherden
Copy link
Contributor

@fred-atherden fred-atherden commented Mar 31, 2023

Some preprints have an alternative title for the abstract. In these cases I suggest we retain fidelity with the original.

This issue wasn't apparent until this change in encoda - https://github.com/elifesciences/enhanced-preprints-issues/issues/505 - which introduced these extra headings into the json.

The abstract component currently adds an h1 Abstract to everything. Because contentToJsx will still iterate over all the content provided, both titles are rendered on EPP with the same level which looks a little odd. e.g.:
https://prod--epp.elifesciences.org/preview/10.1101/2020.01.28.922773

Screenshot 2023-03-31 at 08 38 54

This is an attempt to ensure that the default Abstract heading is only included when there's not one provided in the original data. Same abstract locally with this change:
Screenshot 2023-03-31 at 08 34 46

@fred-atherden fred-atherden marked this pull request as draft March 31, 2023 08:36
@fred-atherden fred-atherden changed the title Update abstract test Abstract title handling Mar 31, 2023
@fred-atherden fred-atherden marked this pull request as ready for review March 31, 2023 10:27
@fred-atherden fred-atherden requested a review from a team March 31, 2023 10:27
@nlisgo
Copy link
Member

nlisgo commented Mar 31, 2023

@fred-atherden thanks for this. PR is valuable would be great to create a ticket too and link to this PR in ticket so that it is on @QueenKraken's radar.

@fred-atherden
Copy link
Contributor Author

Thanks @nlisgo. @QueenKraken we've recently published some RPs affected by this (https://elifesciences.org/reviewed-preprints/87039, https://elifesciences.org/reviewed-preprints/86507, https://elifesciences.org/reviewed-preprints/86700), so would be good to get this in the backlog and picked up at some point.

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