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 documentation s for Content Type (Edit/Create) and RDF Mapping #1049

Merged
merged 16 commits into from
Apr 10, 2019
Merged

Add documentation s for Content Type (Edit/Create) and RDF Mapping #1049

merged 16 commits into from
Apr 10, 2019

Conversation

manez
Copy link
Member

@manez manez commented Mar 7, 2019

GitHub Issue: #1040

This same page, in Google Docs

What does this Pull Request do?

Adds a new page covering creating and modifying content types, including updating an RDF
mapping. Co-written by me and @seth-shaw-unlv (fun game for the reader: guess which parts are written by a skilled committer, and which are written by a front-end-reliant neophyte 😉)

What's new?

One new .md file and a few screenshots in the assets directory.

How should this be tested?

Needs review for sense, accuracy, and to make sure I haven't formatted a mess over @seth-shaw-unlv 's great work with RDF mapping when taking this from a Google docs into markdown.

Additional Notes:

Any additional information that you think would be helpful when reviewing this PR.

Interested parties

@librarychik and @Natkeeran are signed up to review parts of this. @dannylamb as overarching shepherd of the sprint 🐑

manez added 9 commits March 6, 2019 15:58
For content type docs
Screenshot for the content type docs
To replace with better version
Screenshot for content type docs, with some arrows.
screenshot for the content type docs
screenshot for content type docs.
First round commit
finished up screenshots.
Let’s add a new field where a user can indicate if the repository item needs to be reviewed:

1. Click “Add Field”
1. Since this is a “yes/no” decision, we will use “Boolean” and give the field a name. [List of Drupal 8 FieldTypes, FieldWidgets, and FieldFormatters](https://www.drupal.org/docs/8/api/entity-api/fieldtypes-fieldwidgets-and-fieldformatters)
Copy link
Contributor

@librarychik librarychik Mar 13, 2019

Choose a reason for hiding this comment

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

Change: we will use “Boolean” and give the field a name.
To: choose "Boolean" from the dropdown menu and give the Label field a name.

At the end of this add:
Choose Save and continue

Copy link
Contributor

Choose a reason for hiding this comment

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

@manez, we still need the "Choose Save and continue" text @librarychik mentioned.


1. Click “Add Field”
1. Since this is a “yes/no” decision, we will use “Boolean” and give the field a name. [List of Drupal 8 FieldTypes, FieldWidgets, and FieldFormatters](https://www.drupal.org/docs/8/api/entity-api/fieldtypes-fieldwidgets-and-fieldformatters)
1. Now we configure how the field is stored in the Drupal database. For this field type we can select how many values will be allowed. Set this value to "1":
Copy link
Contributor

Choose a reason for hiding this comment

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

Change: Now we configure
To: Next, configure

Change: For this field type we can select how many values will be allowed. Set this value to "1"
To: For this field type you can select how many values will be allowed. Set this value to "Limited""1"

Copy link
Contributor

@seth-shaw-unlv seth-shaw-unlv Mar 13, 2019

Choose a reason for hiding this comment

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

Set this value to "Limited""1" should be Set the dropdown box value to "Limited" and enter "1" in the text box.


![a screenshot of the field settings page](/docs/assets/islandora8_fieldsettings.png)

*Save*. Now we have added our new field:
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove: Save

Change: Now we have added our new field:
To: The new field has been added:

Now let’s move our new field to a different part of the form. In the Admin menu, return to Structure > Content Types and find the Repository Item content type again. Select Manage form display.

1. All of the fields in this content type are available, in a list, with a simple drag-and-place UI. Drag the *Needs Review?* Field to the top of the form. We can also change the way the Boolean options are displayed, with radio buttons as opposed to a single checkbox. Different display options will be available depending on field type. For more information, please check out [List of Drupal 8 FieldTypes, FieldWidgets, and FieldFormatters](https://www.drupal.org/docs/8/api/entity-api/fieldtypes-fieldwidgets-and-fieldformatters)
1. Save. When creating a new Repository Item, the *Needs Review?* Field appears at the top, as a set of radio buttons.
Copy link
Contributor

Choose a reason for hiding this comment

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

line break after Save

suggest change Needs Review? to new field

Updates to follow the review by @librarychik
@manez
Copy link
Member Author

manez commented Mar 13, 2019

I've incorporated @librarychik 's suggestions and updated the PR. Thanks again!

Copy link
Contributor

@librarychik librarychik 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, I have nothing more to add.

A couple more review-based changes.
@seth-shaw-unlv
Copy link
Contributor

@dannylamb, do you want to do a final pass and merge?

Let’s add a new field where a user can indicate if the repository item needs to be reviewed:

1. Click “Add Field”
1. Since this is a “yes/no” decision, choose "Boolean" from the dropdown menu and give the Label field a name. [List of Drupal 8 FieldTypes, FieldWidgets, and FieldFormatters](https://www.drupal.org/docs/8/api/entity-api/fieldtypes-fieldwidgets-and-fieldformatters)
Copy link
Contributor

Choose a reason for hiding this comment

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

For what "yes/no" decision. It is not clear!

I guess, the user has to decide between "Add a new field" and "Re-use an existing field".

When to use what should be made clear.

Also, some background on field type would be useful.

docs/user-documentation/content_types.md Show resolved Hide resolved

To create your own custom content type from scratch, please refer to [this guide](https://www.drupal.org/docs/8/administering-drupal-8-site/managing-content-0/create-a-custom-content-type) on Drupal.org.

Custom content types are not synced to Fedora or indexed by the triple-store by default. Repository managers must add them to the "Content" ('repository_content') context before their nodes are synced to Fedora and indexed by the triple-store. Any of the custom content type's nodes that were created before updating the context will need to have the indexing action manually triggered.
Copy link
Contributor

Choose a reason for hiding this comment

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

Steps here would be helpful.

Does the Member of Collection field necessary? Danny indicated it may be necessary before.

Copy link
Contributor

Choose a reason for hiding this comment

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

@manez , do you want to add some steps for adding a content type to the relevant context? Or should I and paste it as a comment on this thread?

@Natkeeran , no, member_of is not required for indexing a node in Fedora.

Copy link
Member Author

Choose a reason for hiding this comment

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

@seth-shaw-unlv paste here or PR on my branch, I guess? I'm a bit overcommitted for the next two days and heading to a conference next week, so I'm not sure I can get these updates in quickly, alas.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh! I didn't realize I could push to your fork, @manez. I'll do that.


Custom content types are not synced to Fedora or indexed by the triple-store by default. Repository managers must add them to the "Content" ('repository_content') context before their nodes are synced to Fedora and indexed by the triple-store. Any of the custom content type's nodes that were created before updating the context will need to have the indexing action manually triggered.

## Update / Create an RDF Mapping
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include instructions to View/Review RDF mapping!

Copy link
Contributor

Choose a reason for hiding this comment

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

The doc mentions using the Configuration Synchronization export and import for getting and updating RDF maps. Is that sufficient?


Custom content types are not synced to Fedora or indexed by the triple-store by default. Repository managers must add them to the "Content" ('repository_content') context before their nodes are synced to Fedora and indexed by the triple-store. Any of the custom content type's nodes that were created before updating the context will need to have the indexing action manually triggered.

## Update / Create an RDF Mapping
Copy link
Contributor

Choose a reason for hiding this comment

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

I see why this section is folded into creating/editing content types. But, I think it can be treated separately as people are likely to edit RDF mapping even without editing content types. Also, it will aid the discoverability. However, it is fine to keep here as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was originally thinking it would be on a separate page, but I think the original docs structure had it included on this page. It doesn't matter to me either way. I'll let @manez decide to either keep it here or split it onto a separate page.


An RDF mapping configuration file has two main areas, the mapping's metadata and the mapping itself. Most of the mapping's metadata should be left alone unless you are creating a brand new mapping for a new Content Type or Taxonomy Vocabulary.

The required mapping metadata fields when creating a brand-new mapping include the `id`, `status`, `targetEntityType`, and `bundle`. (`uuid` and `_core` will be added by Drupal automatically.) `bundle` should be the machine name for the Content Type or Taxonomy Vocabulary you are creating the mapping for. `targetEntityType` will be `node` if the bundle is a Content Types or `taxonomy_term` if the bundle is a Taxonomy Vocabulary. The `id` configuration is a concatenation of target entity type and bundle. The `id` is also included in the configuration file name: e.g. `rdf.mapping.node.islandora_object.yml` is `rdf.mapping.` plus the id and then `.yml`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Easy to show with an example structure! Easier to create a new one by copying and editing an existing one as well.

docs/user-documentation/content_types.md Show resolved Hide resolved
@seth-shaw-unlv
Copy link
Contributor

@Natkeeran and @manez, I made a number of edits to (hopefully) address some of Nat's comments. Let me know if there is anything else that needs updating.

@manez
Copy link
Member Author

manez commented Apr 5, 2019

Looks good to me! 👍

@dannylamb
Copy link
Contributor

@Natkeeran If you're good with the changes, feel free to merge.

@dannylamb
Copy link
Contributor

@Natkeeran You good on this or is there more you need addressed?

@Natkeeran Natkeeran merged commit 6e40714 into Islandora:master Apr 10, 2019
@Natkeeran
Copy link
Contributor

@dannylamb you are good to go.

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.

5 participants