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

Adjustments to settings form #31

Open
NateWr opened this issue Oct 26, 2020 · 11 comments
Open

Adjustments to settings form #31

NateWr opened this issue Oct 26, 2020 · 11 comments

Comments

@NateWr
Copy link

NateWr commented Oct 26, 2020

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
Copy link
Author

NateWr commented Oct 26, 2020

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.

@Vitaliy-1
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

"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
Copy link
Owner

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?

@NateWr
Copy link
Author

NateWr commented Oct 26, 2020

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
Copy link
Author

NateWr commented Oct 26, 2020

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?

@Vitaliy-1
Copy link
Owner

Vitaliy-1 commented Oct 26, 2020

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

@NateWr
Copy link
Author

NateWr commented Oct 27, 2020

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

@Vitaliy-1
Copy link
Owner

@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.

@NateWr
Copy link
Author

NateWr commented Nov 2, 2020

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.

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

No branches or pull requests

2 participants