JATSParserPlugin icon indicating copy to clipboard operation
JATSParserPlugin copied to clipboard

Adjustments to settings form

Open NateWr opened this issue 5 years ago • 11 comments

Here are some suggested improvements to the settings form:

  1. Change "JATSParser plugin settings menu" to "References".
  2. Drop "force to" in the sentences. So it's just "Display references from X".
  3. What does the default do?
  4. Remove the "denotes required field" thing.
  5. For the convert to PDF setting, give it a heading that says "Create PDF".
  6. The checkbox label should say something about when the PDF is created. Is this during the XML conversion or later? Something like "Create a PDF galley when ...".

NateWr avatar Oct 26 '20 11:10 NateWr

I was using a slightly earlier version. Here are a few more:

  • For the style format selection, use the title instead of description in the {fbvFormSection}. This will make it bold and not greyed out.
  • Other citation formats: where do these formats come from? Must the journal have supplied the style XML?
  • "Import of JATS XML galleys". So this is a one-time action that they take to generate full text from all XML galleys? Can we separate this from the settings form? The plugins let you add actions to the plugin (JatsParserPlugin::getActions()). We can have a separate action there that puts a confirmation prompt up behind a big warning.

NateWr avatar Oct 26 '20 11:10 NateWr

What does the default do?

I should change it to something like remove as now it just removes the full-text from the database for this publication.

Vitaliy-1 avatar Oct 26 '20 11:10 Vitaliy-1

Other citation formats: where do these formats come from? Must the journal have supplied the style XML?

It's CSLs: https://github.com/citation-style-language/styles The plugin has a dependency from this repository

Vitaliy-1 avatar Oct 26 '20 11:10 Vitaliy-1

"Import of JATS XML galleys". So this is a one-time action that they take to generate full text from all XML galleys? Can we separate this from the settings form? The plugins let you add actions to the plugin (JatsParserPlugin::getActions()). We can have a separate action there that puts a confirmation prompt up behind a big warning.

Yes, it's a good idea, thanks!

Vitaliy-1 avatar Oct 26 '20 12:10 Vitaliy-1

The checkbox label should say something about when the PDF is created. Is this during the XML conversion or later? Something like "Create a PDF galley when ...".

PDF is still generated on the fly. I haven't thought about it yet. Do you think it should also be served statically?

Vitaliy-1 avatar Oct 26 '20 12:10 Vitaliy-1

The plugin has a dependency from this repository

Oh my! That's why the release package is 16.5 mb! Let's try to find another solution to this (not for now, but eventually -- maybe file another issue). We could retrieve the requested style when the settings form is saved or something. I don't think it's a great idea to include all 2000+ styles. It may even make sense to build this functionality into the citationStyleLanguage plugin, and then have JATSParser rely on what's configured there.

NateWr avatar Oct 26 '20 12:10 NateWr

PDF is still generated on the fly. I haven't thought about it yet. Do you think it should also be served statically?

Let's postpone this for future work. (File an issue so we don't forget?) In the meantime, let's just update the text. How does it work? Does it create a fake PDF galley or something?

NateWr avatar Oct 26 '20 12:10 NateWr

How does it work? Does it create a fake PDF galley or something?

I'm assigning a variable to the article page containing a query; this method handles requests containing that query: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/JatsParserPlugin.inc.php#L193. I'd need to make some minor changes there regarding citation styling. E.g., citation style format should come from the settings: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/JatsParserPlugin.inc.php#L215

Vitaliy-1 avatar Oct 26 '20 14:10 Vitaliy-1

But is there a galley that's created? How do you get to the pdfViewCallback unless the galley is already created?

NateWr avatar Oct 27 '20 08:10 NateWr

@NateWr, that's what needs to be refactored. In the previous release, the full-text was created on the fly on the galley page. That hook/method is actually for the XML galley page (see check for XML galley type in the method's body): XML is fetched and converter to PDF. For now, I see 2 options: either remove such conversion completely or build a handler for this operation.

Vitaliy-1 avatar Oct 30 '20 17:10 Vitaliy-1

Oh I see what you're saying. For now let's hide this. But perhaps in the future we can have an option, similar to how the full text is generated, which would create a PDF galley and generate a PDF for it.

NateWr avatar Nov 02 '20 10:11 NateWr