-
Notifications
You must be signed in to change notification settings - Fork 71
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
Conversation
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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": |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
I've incorporated @librarychik 's suggestions and updated the PR. Thanks again! |
There was a problem hiding this 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.
@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) |
There was a problem hiding this comment.
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.
|
||
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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.
@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. |
Looks good to me! 👍 |
@Natkeeran If you're good with the changes, feel free to merge. |
@Natkeeran You good on this or is there more you need addressed? |
@dannylamb you are good to go. |
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 🐑