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

Add links to curation pages #1556

Merged
merged 6 commits into from
Feb 14, 2022
Merged

Conversation

carlinmack
Copy link
Collaborator

@carlinmack carlinmack commented Jul 29, 2021

2nd half of closing #1322
Close #1122

This PR adds a link to the curation page for all Q number pages.

image

This PR relies on #1552 as the curation aspect chooser is filtered based upon whether there is a useful curation page for that aspect. On this curation page, the aspect chooser is filtered of the aspects which don't have curation page templates:

image


I'm happy with this PR now, text below preserved for reference


This needs some iteration/discussion before it's ready, due to design choices etc.

The position was chosen as users are accustomed to finding edit controls in the top right of the page.

In terms of the text:

  • "Edit" would have to direct the user to Wikidata, which would be odd
  • "Curate" does make sense if you have the right mental model, but would be initially confusing to the user (especially with the current page, more on this below).
  • "Add more info" is clearer, but not ideal
  • I've gone with "Improve data" as this doesn't have the connotation of directly editing

I have no comment on what the URL of the curation pages should be, I do prefer "curation" to "missing"

In terms of the curation page itself, I think it needs some work, definitely in regards to #374. As far as I can tell, this page largely functions to provide quick access to (hopefully) fruitful Author Disambiguator pages and Wikidata pages that have missing properties. As a user I would expect this page to provide some context of where information comes from, where it can be added, what tools are available, and then links to pages on these tools.

If we take the user story "As an academic, I want to add a notable paper to an academic's page, so that the Scholia profile is more complete", there is no direction for the best way to do something like this, and what tools are available to do this.

There is currently a hardcoded list of valid aspects for curation, but if we can close #281 then we do not need this.

I will work on a prototype of this in another PR :)

PR has been created

@carlinmack carlinmack changed the title Add link to curation page Add links to curation pages Jul 30, 2021
@carlinmack carlinmack marked this pull request as ready for review July 30, 2021 12:31
@carlinmack carlinmack marked this pull request as draft July 30, 2021 12:54
@carlinmack
Copy link
Collaborator Author

Oops, still need to handle this bit of code:

// this query opens a subpage for the Wikidata item, e.g. as cito subpage
     var endpointUrl = 'https://query.wikidata.org/sparql';
     var query = `
    SELECT DISTINCT ?aspectsubpage
    WHERE {
    { [] pq:P3712 / wdt:P31 wd:Q96471816 ; ps:P2860 / wdt:P1433 wd:{{ q }} . BIND("venue-cito" AS ?aspectsubpage) }
    UNION
    { [] pq:P3712 / wdt:P31 wd:Q96471816 ; ps:P2860 wd:{{ q }} . BIND("work-cito" AS ?aspectsubpage) }
    }
    `;
     settings = {
	 headers: { Accept: 'application/sparql-results+json' },
	 data: { query: query }
     };

     $.ajax( endpointUrl, settings ).then( function ( data ) {
	 data.results.bindings.forEach(function(entry) {
	     var props = entry.aspectsubpage.value.split("-");
	     var aspect = props[0];
	     var subpage = props[1];
	     $( '#aspect-chooser' ).append(
		 `<a role="button"
		     class="btn btn-outline-dark btn-sm"
                     href="{{ url_for('app.index') }}` + aspect + '/' + '{{ q }}' + '/' + subpage + '">' + subpage + '</a> ' );
	 });
     } );

@carlinmack
Copy link
Collaborator Author

As of #1610 , I will not handle that bit of code in this PR, and instead close #741 first

@carlinmack carlinmack marked this pull request as ready for review August 18, 2021 13:11
@carlinmack carlinmack marked this pull request as draft August 18, 2021 15:48
@fnielsen
Copy link
Collaborator

fnielsen commented Nov 1, 2021

I am trying to understand what should be done with this PR. Should I review and merge it? And the work can continue from there? Currently there is no automatic testing.

@carlinmack
Copy link
Collaborator Author

Actually I think it is fine now, can't quite recall why this wasn't marked as ready for review

@carlinmack carlinmack marked this pull request as ready for review November 1, 2021 20:54
@Daniel-Mietchen Daniel-Mietchen added the needs rebasing label for pull requests that are sent back for rebasing on the latest master (by author or other) label Nov 1, 2021
@Daniel-Mietchen
Copy link
Member

This also fixes #1708

Copy link
Member

@Daniel-Mietchen Daniel-Mietchen left a comment

Choose a reason for hiding this comment

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

Looks good and works fine.

@fnielsen fnielsen merged commit c4af87c into WDscholia:master Feb 14, 2022
@Daniel-Mietchen
Copy link
Member

Adding a pointer to

which serves to keep an overview of things we worked on during the hackathon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs rebasing label for pull requests that are sent back for rebasing on the latest master (by author or other)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give links to curation pages more prominence Create some "missing" subpage for every aspect
3 participants