apigee / apigee-devportal-kickstart-drupal

A fast demo and starting point for Apigee Developer Portals for Drupal
https://www.drupal.org/project/apigee_devportal_kickstart
GNU General Public License v2.0
26 stars 34 forks source link

Document steps for upgrading to apigee_api_catalog 2.x #391

Closed shadcn closed 4 years ago

shadcn commented 4 years ago

Related:

363 and #390

kscheirer commented 4 years ago

I just went through this, there's a few more steps I needed to take:

Changes to the apidoc content type:

  1. Note the values of the Image and Categories fields for each apidoc node, we'll need them below.
  2. Delete the existing Categories and Image fields.
  3. Add new Image field, must be named "Image" so the machine name is field_image.
  4. Add new Taxonomy term reference field, must be named "Categories" so the machine name is field_categories.
  5. Edit the Manage form display tab, and add those 2 new fields to the form display.
  6. Edit the Manage display tab. The only field that should be displayed in the Default view mode is OpenAPI spec
  7. Open the fieldset at the bottom, check the box for a custom display for "Card" view mode.
  8. Edit the Card view mode
  9. The only fields in this view mode should be Image as rendered entity using Card (small) and Description with default settings.
  10. Edit all existing apidoc nodes, restore Image and Categories values, since we deleted the fields above.

Docs for updating the Home landing page links are provided here https://github.com/apigee/apigee-api-catalog-drupal/issues/106#issuecomment-696242978. Docs for updating the view's exposed filter are provided by arshad here https://github.com/apigee/apigee-devportal-kickstart-drupal/pull/390#pullrequestreview-447845910. Added steps for the exposed filter if you lost the checkboxes styling:

  1. While editing the API Catalog view, open the "Advanced" fieldset, and make sure the "Exposed form style" is set to "Better Exposed Filters"
  2. Click "settings" next to Better Exposed Filters.
  3. Open the fieldset at the bottom labeled EXPOSED FILTER "CATEGORIES" WITH LABEL "CATEGORIES"
  4. Change exposed filter widget to "Checkboxes/Radio Buttons".

The field names is important to allow the theme to recognize those fields and render the cards properly.

With all those steps my API Catalog is looking good again. @jbennett13 I didn't see this documented anywhere else, sorry if I missed it.

shadcn commented 4 years ago

@kscheirer Thanks for the notes. I implemented two hooks to do the above. See https://github.com/apigee/apigee-devportal-kickstart-drupal/pull/426