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

Source Detail: ensure line breaks are preserved when displaying TextFields #1087

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

jacobdgm
Copy link
Contributor

@jacobdgm jacobdgm commented Oct 3, 2023

fixes #1085

This PR fixes a bug on the Source Detail page, where the source description would all run together even if line breaks had been added while writing the description in the Source Edit page. Adding a linebreaks tag to the field in the template causes line breaks to be preserved.

While fixing this, I looked at several of the other TextFields in our models to see if they would benefit from similar treatment.

  • I chose to apply linebreaks tags to the Liturgical Occasions and Selected Bibliography fields in addition to the Description field, as they often contain extended descriptions.
  • For the Source Detail page, I chose not to apply the tag to the Summary and Indexing Notes fields, as they seem to usually contain single-line values.
  • I also chose not to apply these tags to several fields on the Chant and Sequence Detail pages. These fields include the two Full Text fields, the Volpiano field, and the Indexing Notes field.

@annamorphism, perhaps you can comment on whether there are other places I should look at for applying a similar treatment, or whether there are reasons that linebreaks should not be preserved where I just added them. I'll wait for a researcher approval from you and for a technical approval from @dchiller or @lucasmarchd01 before merging this.

@annamorphism
Copy link

This logic seems sound to me--I can't think of any other obvious fields that need it, or reasons why the ones you listed shouldn't have it.

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.

source descriptions lose formatting
3 participants