-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feature/bibl visualization #238
Conversation
@Input() data: BibliographicEntry | BibliographicStructEntry; | ||
@Input() style: string = AppConfig.evtSettings.ui.defaultBibliographicStyle; | ||
|
||
public biblEntry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please declare type of variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be tricky to change, as I'm using a dynamic assignment to make biblEntry either be a BibliographicEntry or BibliographicStructEntry, but if it's needed to understand the code I'll refactor it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a suggestion you can declare as public biblEntry: BibliographicEntry | BibliographicStructEntry;
if it doesn't work decalare as any
src/app/components/bibliography-info/biblio-styled/biblio-styled.component.ts
Outdated
Show resolved
Hide resolved
src/app/components/bibliography-info/biblio-styled/biblio-styled.component.ts
Show resolved
Hide resolved
@@ -15,5 +15,14 @@ export class BibliographicEntriesParserService { | |||
.map((bib) => bibliographicParser.parse(bib)); | |||
} | |||
|
|||
parseBibliographicEntries(xml: XMLElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please declare type of return variable
protected attributeParser = createParser(AttributeParser, this.genericParse); | ||
protected elementParser = createParser(GenericElemParser, parse); | ||
|
||
protected getTrimmedText = function(s): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what type of variable is s?
@@ -49,7 +49,8 @@ export class ModalComponent implements OnInit { | |||
@HostListener('click', ['$event']) | |||
clickout(event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please specify type of event (at least any)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't create the function, but I'll look into more details when I have time to spare
src/assets/config/ui_config.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it your configuration or is valid for any project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's supposed to be valid for any project, I've added some keywords but their naming is still open to feedback
… to titleDetails & publication
5920443
to
c7789d8
Compare
This feature adds the 'Bibliography' visualization panel in the project info modal.
The panel features a list of all bibliographic entries in the TEI edition, styled with a specific bibliographic style (for example, the Chicago Author-Date, which is the default style).
The visualization component (
StyledBiblioEntryComponent
) is generic, and depends on the configuration that represents a bibliographic style inui_config.json
. This can prove useful for future extension of the bibliographic style allowed, and to enable the user to add their own customized bibliographic style.The panel has been tested with a mock-up that includes edge cases such as unstructured
BibliographicEntry
andBibliographicStructEntry
with multiplemonogr
. For the former, styling is not possible thus the plain text content is visualized, and for the latter a proposal of styling reprints has been made, since there was no clear documentation on how to handle multiplemonogr
.The modified edition for testing is available here