emory-libraries / dlp-lux

Discovery for the DLP Cor Repository
2 stars 0 forks source link

Refactor views to use fewer presenters #569

Closed maxkadel closed 4 years ago

maxkadel commented 4 years ago

The appearance of the views has not changed, but I think this change results in more manageable code by "dry"ing it significantly, which will hopefully make it easier to add / remove fields from the application in the future.

Single configurable yaml file, rather than one for each section of page.

MetadataPresenter takes a "section" variable, for which section of the page is be presented, and finds the correct part of the yaml file for that section of the page.

As views have changed from the default metadata_block, they have resulted in both the "block" views and the "render" views, which were getting a bit redundant. Consolidated the "render" views into the metadata_column views.

image

image