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

Sidebar: Show a hidden label for an empty value; attribute-specific empty value #13

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

janiemi
Copy link

@janiemi janiemi commented Mar 10, 2025

Make two minor enhancements to displaying empty values in the sidebar:

  1. Show a label for an empty value even if the label is usually hidden. This is relevant primarily for links where the label is the link text: previously, they would be shown simply as “[empty]”, with no label and thus no indication of what is empty; now they are shown as “label: [empty]”.
  2. Support property emptyValue in attribute configurations to specify a value which is shown as “[empty]“, in addition to a completely empty value. This can be used if e.g. the underscore is used to denote an empty value.

The first feature is in use in the Korp test instance for Achemenet and BALT, but the second one is not currently used.

app/scripts/components/sidebar.js:
- Support attribute property "emptyValue" to specify an
  attribute-specific value to be represented as "[empty]".
app/scripts/components/sidebar.js:
- Show the attribute label for an empty value even if it is otherwise
  hidden with property sidebarHideLabel, so that the user can see what
  is empty.
@janiemi janiemi requested a review from Traubert March 10, 2025 09:02
@janiemi
Copy link
Author

janiemi commented Mar 10, 2025

@Traubert, the forthcoming Achemenet and BALT corpora use a feature added in this pull request, so I’d be grateful if you could review (and merge) this relatively soon.

Copy link
Collaborator

@mmatthiesencsc mmatthiesencsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Traubert I hope it is ok that I review. @janiemi :

It took me a while to find examples, the fix is definitely an improvement! And the code clear enough. E.G.: Balt:
date: [empty]
date BCE: [empty]
provenance: [empty]
archive: [empty]
genre: [empty]
subgenre: [empty]

@mmatthiesencsc mmatthiesencsc merged commit 74223eb into master Mar 14, 2025
1 of 2 checks passed
@mmatthiesencsc mmatthiesencsc deleted the sidebar-mod-empty-values branch March 14, 2025 16:55
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

Successfully merging this pull request may close these issues.

2 participants