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

Configurable order of properties in Concept pages #554

Closed
tfrancart opened this issue Sep 30, 2016 · 8 comments · Fixed by #992 or #1010
Closed

Configurable order of properties in Concept pages #554

tfrancart opened this issue Sep 30, 2016 · 8 comments · Fixed by #992 or #1010
Assignees
Milestone

Comments

@tfrancart
Copy link
Contributor

Some thesaurus managers would like to have the ordering of properties in the Concept page according to what ISO-25964 recommends, which I am copy-pasting below :

12.2.2 Single record display
When the record for a concept or a preferred term is viewed individually the preferred term should normally be displayed first and the other fields are customarily presented after it in the following sequence:
a) CC concept code or notation, locating the term/concept in a hierarchical sequence;
b) SN scope note;
c) UF references to non-preferred equivalent term(s);
d) TT references to top terms;
e) BT references to broader terms;
f) NT references to narrower terms;
g) RT references to related terms;
h) DEF definition of the preferred term (see 6.2.3);
i) HN history note (see 6.2.4);
j) SC subject category or other concept group to which the concept has been assigned.
In this arrangement, the SN and UF are given near the beginning of the list because they clarify the scope of the concept. They are followed by relationships with other terms. DEF and HN are given last because they are viewed as administrative fields, used more by the thesaurus editor than the indexer or searcher. As an option, these last fields may be shown after the scope note, bringing all text fields together. However, it is important to ensure that SN and DEF are not confused when both are present.

It is not complicated to reorder the properties of the concept by editing line 62 in Concept.php :

$this->order = array("rdf:type", "dc:isReplacedBy", "skos:definition", "skos:broader", "skos:narrower", "skos:related", "skos:altLabel", "skosmos:memberOf", "skos:note", "skos:scopeNote", "skos:historyNote", "rdfs:comment", "dc11:source", "dc:source", "skos:prefLabel");

However this doesn't allow to control the order of the synonyms and the group information. Having the possibility to easily configure this - without tempering with the HTML template - would be nice. A configuration option, maybe, like "UseIso25964PropertyOrder", or something similar ?

Cheers

@osma
Copy link
Member

osma commented Oct 3, 2016

I guess we didn't look at ISO 25964 back in the days the order was set. Before adding yet another configuration option, we could at least consider just adopting the ISO 25964 order as the default.

@osma osma added this to the Next Tasks milestone Oct 3, 2016
@tfrancart
Copy link
Contributor Author

I uderstood you did some usability testing when designing the screen, which is also a good argument for the order as it is today, that's why I was proposing this as an option.

@osma
Copy link
Member

osma commented Jan 31, 2020

Alternative would be to make the order entirely configurable (perhaps defaulting to ISO order)

@osma
Copy link
Member

osma commented Feb 26, 2020

Alternative would be to make the order entirely configurable (perhaps defaulting to ISO order)

More specifically:

In the global section in config.ttl, there could be zero or more definitions of property orders (expressed as RDF lists). Then each vocabulary could be set to follow one of these orders. If no property order would be set for some vocabulary, it would use a default order (similar to the current hardcoded order, perhaps with some tweaks to better follow ISO 25964).

@osma osma changed the title ISO-25964-compatible order of properties in Concept pages Configurable order of properties in Concept pages Jun 5, 2020
@osma osma added the size-medium 2 hours to 2 days label Jun 5, 2020
@osma osma self-assigned this Jun 5, 2020
@osma
Copy link
Member

osma commented Jun 8, 2020

This is how the configuration could look.

ISO 25964 order:

:myvoc skosmos:propertyOrder skosmos:iso25964PropertyOrder .

Default Skosmos order:

:myvoc skosmos:propertyOrder skosmos:defaultPropertyOrder .

Custom order:

:myvoc skosmos:propertyOrder [a skosmos:PropertyOrder; rdf:value ( rdf:type dc:isReplacedBy skos:definition skos:broader skos:narrower skos:related skos:altLabel skosmos:memberOf skos:note skos:scopeNote skos:historyNote rdfs:comment dc11:source dc:source skos:prefLabel) ].

(edited, since I realized that some indirection is necessary - done here using rdf:value - so order definitions can be reused)

@osma
Copy link
Member

osma commented Jun 15, 2020

PR #992 caused a regression on the search result page:

kuva

(from: http://dev.finto.fi/yso/fi/search?clang=fi&q=kissa )

The group information is now duplicated (with the second line badly spaced) and the foreign labels are shown as "Array, Array, Array".

(thanks @kouralex for spotting this!)

@osma osma reopened this Jun 15, 2020
@osma
Copy link
Member

osma commented Jun 15, 2020

@osma
Copy link
Member

osma commented Jun 18, 2020

The group information is now duplicated (with the second line badly spaced)

This was fixed in PR #1010

and the foreign labels are shown as "Array, Array, Array".

This was fixed in commit 161b0cb directly to master

tfrancart added a commit to tfrancart/Skosmos that referenced this issue Jan 4, 2021
* PhpStorm: declare variable

* PhpStorm: improve jquery efficiency, by avoiding locating elements multiple times

* PhpStorm: remove duplicate keys in .jshintrc (same value too)

* PhpStorm: typos

* enhancement for passing plugin parameters from config.ttl

* Initial implementation of shortening property value lists

* Added a missing line

* Fix shortening property value lists after ajax page load and other special cases

* Translations for "show all # values" message + fix msgid for similar paths message

* Added tests, simplified array handing in twig

* updated translations

* Increase property value cutoff limit from 10 to 15

* optimize jQuery expressions

* Add Danish translation by Sebastian Esp Nielsen and A I

* Updated translations

* Avoid displaying empty type field in search result list. Fixes NatLibFi#942

* Add indexLetters REST method, with test. Part of NatLibFi#599

* Add Portuguese translation by Bruno Almeida and Laureano Macedo

* Add indexConcepts REST method, with test. Part of NatLibFi#599

* Updated Portuguese translation after revision by @kinow

* Implement limit and offset parameters for REST index method. Part of NatLibFi#599

* simplify limit determination (and don't default to 250)

* avoid unnecessary repeated calls to getQueryParam

* Add Brazilian Portuguese translation

* Add Swagger documentation for index/ REST method (indexLetters)

* Add Swagger documentation for index/<letter> REST method (indexConcepts)

* more specific definition of indexConcepts return type

* Move modified date related methods to Controller

* Move skosmos:useModifiedDate to global configuration, instead of per vocabulary

* Simplify signature of GlobalConfiguration::getUseModifiedDate

* Add helper method notModified in Controller class

* Add 304 for global and vocabulary methods

* Add 304 for global and concept methods

* Update tests for the new code

* Make Vocabulary and Concept Modifiables

* Use vocabulary modified date

* Move flag for enabling 304 back to VocabularyConfig, and make it available to Modifiables

* Updating tests for latest changes

* Fix scrutinizer errors

* fix unit test that broke during merge conflict resolution

* Use timestamp of default concept scheme as modified date for Vocabulary + tests

* Fall back to Vocabulary->getModified if concept doesn't have a modified date

* Remove unused method getConceptModifiedDate and corresponding tests (snif!)

* attempt to fix some errors reported by Scrutinizer

* Annotate the $modifiedResource as a possible DateTime literal, and check for its type using instanceof

* Use Literal\Date (its getValue() returns a PHP DateTime too) and replace deprecated @ExpectedException annotation

* Add swagger information for 304 response in REST methods

* Add swagger information for the vocid/mappings REST endpoint (includes 304 not modified information)

* Enhancement for listing altLabels and hiddenLabels for a REST API method

* Added tests for GenericSparql

* generate the label list with a single sparql query instead of two

* Refactored code, no change in overall functionality

* Simplified the way labels are passed by queryAllConceptLabels to RestController from GenericSparql

* Differentiate between nonexistent concept and concept without prefLabel

* Initial implementation of global REST label method. Fixes NatLibFi#952

* Add swagger spec for global labels method (and fix up some descriptions)

* Proper HTTP date format (RFC 1123); read If-Modified-Since header using filter_input

* initial draft for the REST API methods returning new and modified concepts for a vocabulary

* Separated the functionality of WebController and RestController when forming the change list

* Amended tests to reflect the change in functionality

* Timestamps passed from vocabulary as native PHP dateTimes, then processed by each controller to the format they need

* Added handling of malformed date strings and tests

* Fixed a method argument

* Fixed a method argument

* using a PHP 7.1 compatible way for formating DateTime object

* Numerous style tweaks. Added a limit parameter to parameterize the size of the list of changed concepts.

* Additional documentation for mappings-method

* fixed a parameter name

* fix typo in test name

* foreign language/explicit language detection improved;fixes NatLibFi#903

* initial draft for the REST API methods returning new and modified concepts for a vocabulary

* Separated the functionality of WebController and RestController when forming the change list

* Amended tests to reflect the change in functionality

* Timestamps passed from vocabulary as native PHP dateTimes, then processed by each controller to the format they need

* Added handling of malformed date strings and tests

* Fixed a method argument

* Fixed a method argument

* using a PHP 7.1 compatible way for formating DateTime object

* Numerous style tweaks. Added a limit parameter to parameterize the size of the list of changed concepts.

* Refactored methods, added swagger documentation

* implement language-aware sorting for altLabels; fixes NatLibFi#835

* add tests; fix mergeing arrays

* initial test data for NatLibFi#554 configurable property order feature

* initial support for ISO 25964 property order

* initial support for defining a custom property order

* Render concept groups and arrays using the same template used for other properties

* fix sorting of concept properties in unknown URI namespaces

* handle case when concept vocab is unknown; switch to class constants for order definitions

* Fix and test for bad/unknown property order case

* Ensure ISO 25964 order definition contains all common concept properties even though not all are mentioned in the ISO standard

* Fix the font definitions for timestamps and linked vocabulary names, mentioned in NatLibFi#974

* update the testing assertions to address issues related to updating the test vocab

* cleaning up the code

* Show tooltips (rdfs:comment or skos:definition) for custom properties. Fixes NatLibFi#824

* Add missing variable declaration & change variable name to tooltip

* Add unit test for custom property tooltip/description

* Added tests. Fixed abiguity between the namespace prefixes dc, dct, dc11.

* created & modified properties moved to the correct namespace

* Add unit test for custom property missing a description

* add missing phpdoc parameter declarations

* simplify template a little bit by cutting an else expression

* Handling and tests for malformed dates

* Minor library dependency updates

* fix accidental merge conflict resolve bug

* fixes NatLibFi#990 via introducting new global js variable

* Fixed PHPDoc comments

* search result listing now correctly shows foreign labels (fix regression introduced by NatLibFi#993

* introduce a space between notation and prefLabel in mappings

* Fix loading spinner that broke in refactoring commit 4fbfdce

* Declare required PHP extensions using Composer

* Fix double display of concept group on result page (caused by PR NatLibFi#992)

* mappings: fix issue with explicitLanguageTags set to true and label is just shortened property; fix property text help

* Upgrade bootstrap-multiselect and uri.js to versions that are actually available

* rollback few libraries that require more testing

* mark the start of 2.8 development

* fix NatLibFi#1018 by explicitly declaring the UI locale in getDate()

* Fixes NatLibFi#1027 by commenting out css file path

* Fix error in swagger spec for search method return value

The `results` field, which contains the search results, was incorrectly called `vocabularies` in the swagger spec - looks like a copy-paste error.

* Add HTML classes for properties so they can be targeted in JS and CSS. Fixes NatLibFi#1034

* Focus should not be forced in the search field through js

* Set the skip to main element link to cover both the page's main content and the side bar

* Add property-specific classes also for mapping properties

* remove dead code: the renderPropertyMappingValues function is never used

* translations and tweaks

* restored an id attribute

* update twig; references NatLibFi#918

* Moved the main element deeper in the DOM tree

* add screen reader class

* changed concept and vocab info to flex boxes from the old table implementation

* element closing order fixed

* tweaks to the property divider on vocab info page

* tweaked paddings for the dynamic layout of concept and vocabulary info

* layout tweaks to concept page and vocabulary info page

* Don't hide outlines of active links, which cause accessibility problems

* Make it possible to use the Help link using keyboard only

* reenable outlines to make it possible to do keyboard only tab navigation

* Show the skip to content link when it receives keyboard focus

* Add an outline offset to make the outlines look a bit nicer

* Set an explicit outline, to ensure similar rendering across browsers

* changed concept and vocab info to flex boxes from the old table implementation

* tweaks to the property divider on vocab info page

* tweaked paddings for the dynamic layout of concept and vocabulary info

* layout tweaks to concept page and vocabulary info page

* adjust position of skip to content link

* replicating the vocab info spacer bar position of the old layout

* Add an outline also to the content language selection when active

* Add outline to multi-vocabulary selection on front page

* Give the search button an outline when active; adjust background active color as well

* Make outline visible on vocabulary headline (display: block prevented it)

* Add tabindex=-1 to the main content element, to benefit eg screen readers

* WCAG: fix front page heading structure

* fix issue with focus (tested with Edge + Windows Narrator

* fix focus outline issues on front page

* fixes focus z-index; fixes topbar focus on ontology page

* add screen reader only heading to search

* incorporating headings into vocabulary info page; started implementing headings to sidebar

* Changed a class name that caused conflicts between bootstrap and Skosmos css

* Added a missing class attribute

* main sidebar + alphabetical listing now support heading navigation; yet missing translations

* fix color and border issues in sidebar buttons

* changes subpage now support headings

* add support for headings in groupings

* add headings to vocab.twig

* relocated .sidebar-grey heading so that jstree does not interfere with it

* fix regressions encountered on vocabulary search page

* fix css problem with '!*' in alphabetical listing spanning over two lines

* add accessibility headings to search result page; addresses NatLibFi#1039

* fix regressions in vocabulary page; fix a bug introduced by using headings in alphabetical listing

* concept info page to use headings; addresses NatLibFi#1038

* fix screen reader explanation for changes tab

* minor adjustments to about page

* remove unused code

* adjust about page layout + css a bit

* revert topbar #service-name height settings set by NatLibFi#1060

* somewhat working front page

* intermediate testing phase for topbar layout

* similar functionality in headerbar in both vocabulary and front page

* fix responsivity issues with header-float

* fix topbar margin/padding issue when under 1260px width; positional uiLanguageDropdown instead of fixed

* New translation strings for screen reader helper texts in fi, en, sv

* Assort replaced with list

* Adjust focus CSS styles: dotted outline, which is not shown for main content block

* CSS fix: Make sure concept info area extends to the full available width

* Fix position of concept spinner, which was broken by a -moz-fit-width rule.

* tweaked header font size

* fixed translation template names

* criteria -> criterion

* Fixed event listener for alphabetical concept listing

* fix focused pagination letter background color

* Show short name of vocabulary for property values from another vocab

* Fix typo in swagger.json offset description

* Use GRAPH, not FROM in alphabetical letters query - much faster on Fuseki

* use GRAPH, not FROM in single alphabetical letter query - much faster on Fuseki

Co-authored-by: Bruno P. Kinoshita <kinow@users.noreply.github.com>
Co-authored-by: Osma Suominen <osma.suominen@helsinki.fi>
Co-authored-by: Joeli Takala <joeli.takala@helsinki.fi>
Co-authored-by: joelit <joeli.takala@gmail.com>
Co-authored-by: Bruno Almeida <brunoalmeida@fcsh.unl.pt>
Co-authored-by: kouralex <1723419+kouralex@users.noreply.github.com>
Co-authored-by: Ahonen Mika J <mika.ahonen@helsinki.fi>
Co-authored-by: Vainonen <okko.vainonen@helsinki.fi>
Co-authored-by: Minttu Hurme <ammsalme@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants