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 RDF mapping of field_weight as co:index (Issue 1262) #9

Merged
merged 12 commits into from
Sep 20, 2019
Merged

Add RDF mapping of field_weight as co:index (Issue 1262) #9

merged 12 commits into from
Sep 20, 2019

Conversation

seth-shaw-unlv
Copy link
Contributor

@seth-shaw-unlv seth-shaw-unlv commented Sep 16, 2019

GitHub Issue: Islandora/documentation/issues/1262

Replaces #6

What does this Pull Request do?

Creates a "Reorder Children" view/tab using the integer_weight_selector provided by the accompanying PR.

Adds an RDF mapping of field_weight as co:index. ('cause everything else in this PR is moving to core: Islandora/documentation/pull/171)

What's new?

  • Added the RDF mapping for field_weight
  • Does this change require documentation to be updated? We should add some documentation.
  • Does this change add any new dependencies? No.
  • Does this change require any other modifications to be made to the repository
    (ie. Regeneration activity, etc.)? Re-index for weight values to appear.
  • Could this change impact execution of existing code? No.

How should this be tested?

  • Apply the PR
  • Clear cache
  • View the jsonld of a node with a field_weight value and see the co:index predicate with the appropriate value.

Additional Notes:

Although we talked about replacing the 'purl.org/co/index' with 'schema:position', integers are serialized with the type http://www.w3.org/2001/XMLSchema#int; which Google's structured data tester did not like. So, at least for now, we should keep the 'co:index' property until we decide if trying to rewrite Drupal integer types as 'schema:Integer'.

Interested parties

@dannylamb, @Islandora-CLAW/committers

@dannylamb
Copy link
Contributor

Testing now

@dannylamb
Copy link
Contributor

Any reason why we can't bring the code over into the main islandora module? The view would have to stay because it references the weight field, but everything else could just hop on over.

And also... it works. I should mention that.

@seth-shaw-unlv
Copy link
Contributor Author

We could, but the code is pointless without the weight field to make use of it....

Let me know if you would prefer I bring it over to islandora and I will whip-up a PR.

@dannylamb
Copy link
Contributor

My understanding is that this would work with anything that uses an integer field for sorting and wants to make a view. If the code lives in islandora with the field storage definition, then folks can do that without enabling islandora_defaults.

Also, I'm missing something. Where does the submit button on the view come from? I see the submit function in the code, but can't find where the button comes from.

@seth-shaw-unlv
Copy link
Contributor Author

Okay, I make the PR on the islandora module this morning.

If I understand it correctly (which I may not), the save button comes gratis with drupal_attach_tabledrag.

@seth-shaw-unlv seth-shaw-unlv changed the title Integer-based weight drag-n-drop (Issue 1262) Add RDF mapping of field_weight as co:index (Issue 1262) Sep 20, 2019
Copy link
Contributor

@dannylamb dannylamb left a comment

Choose a reason for hiding this comment

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

👍

@dannylamb dannylamb merged commit b8c4d51 into Islandora:8.x-1.x Sep 20, 2019
@seth-shaw-unlv seth-shaw-unlv deleted the issue-1262-integer branch September 20, 2019 20:28
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.

3 participants