janeway icon indicating copy to clipboard operation
janeway copied to clipboard

Allow italics in a variety of content fields

Open joemull opened this issue 10 months ago • 1 comments

This branch adds support for italics in a variety of content fields, especially those that might include journal titles or other titles of works that need italicization.

We can do this more easily and safely now thanks to safer storage of HTML in the database introduced in 1.5.1.

Screenshot from 2024-05-01 16-01-25 Screenshot from 2024-05-01 15-59-57 Screenshot from 2024-05-01 15-59-30 Screenshot from 2024-05-01 15-58-55 Screenshot from 2024-05-01 15-58-44

For the copyright text, I have opted to avoid putting the journal name altogether. This will require a retranslation of that string but I believe it is worth it because the existing translation is not ideal, because it's a partial sentence (excludes the journal name) and does not include punctuation as part of the translated string (the colon). image

joemull avatar May 01 '24 15:05 joemull

Oh. Not quite ready. Problem with migrations.

joemull avatar May 01 '24 15:05 joemull

@ajrbyers I just wanted to make sure you saw this one is ready for review now.

joemull avatar May 24 '24 10:05 joemull

I've just given this a once over and before I test it out I wondered if there was a reason why the Frozen Author records had all been convered to bleach fields?

Ah, yes it's because they get used in the carousel subtitle. We said we wanted to support italics in carousel text.

joemull avatar May 24 '24 11:05 joemull

@joemull just FYI this PR now has a conflict.

ajrbyers avatar Jun 04 '24 09:06 ajrbyers

@ajrbyers After rebasing I ran tests and picked up several things that needed to be addressed:

  1. Utilities like importers trying to save None to affected fields on FrozenAuthor and IssueType
  2. Fields from the Account model that allow null=True being directly saved to FrozenAuthor

I think this calls for standardizing the corresponding Account model fields, so I've done that. What do you think? Re-requesting review since it's a significant enough change.

joemull avatar Jun 05 '24 04:06 joemull

@mauromsl assigning this to you for a second review as the changes are significant.

ajrbyers avatar Jun 05 '24 08:06 ajrbyers

Rebased to resolve conflict in migration_utils.

joemull avatar Aug 08 '24 11:08 joemull