CDR Tickets

Issue Number 4113
Summary Ability for CDR to control the size of PDQ images when on Cancer.gov
Created 2016-03-08 11:21:20
Issue Type Improvement
Submitted By henryec
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2017-02-14 14:44:25
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.180340
Description

I was in a meeting with Margaret Beckwith on 3/3/2016, and she asked if it would be possible to allow CDR to send PDQ image sizing information to Cancer.gov for display. For example, 25% or 50% of the content area.

I indicated that this would need to be brought up at the CGCG meeting for discussion. Opening this ticket so it gets on the CGCG agenda.

For cancer.gov, the image choices are:

  • Left and Right Article Image Medium Template: Width of 40%

  • Left and Right Article Image Small Template: Width of 25%

  • Article Image Centered: Width of 75%

  • Article Image Centered Full: Width of 100%

In CDR, the image choices are:

  • as-is

  • full

  • three-quarters

  • half

  • third

  • quarter

  • fifth

  • sixth

Update: For this story, we will remove the current image choices in CDR, and instead provide CDR users with the same 6 choices that cancer.gov has.

Comment entered 2016-04-12 13:19:36 by kims27

- can you list out the c.gov image sizes and the cdr image sizes?

Comment entered 2016-05-12 07:38:20 by Sun, Victoria (NIH/NCI) [C] [X]

This was given a medium priority by Margaret's team on 5/11/16

Comment entered 2016-05-24 13:35:45 by kims27

Old CDR image choices will go away. The c.gov image choices will be used instead. This will require GK and CDR changes.

Victoria - discuss this with the CDR team

Comment entered 2016-05-26 14:04:04 by Sun, Victoria (NIH/NCI) [C] [X]

We could add a centered 40% for PDQ images (which would map to half size in CDR), but not add this as a template option for images on cancer.gov - this would be a possible future enhancement pending on Volker's prototype.

- Could you please sit down with the CDR team and using the FEQ code, prototype what left/right alignment of images in PDQ summaries would look like?

This would not display side-by-side images if two templates were chosen for images.

Images in tables should work the same way they do now.

Comment entered 2016-06-01 06:22:14 by kims27

- can you move this out of the O&M sprint? I can't close this sprint out since I am not an admin on this project and I can't edit the sprint on this ticket.
Thanks!

Comment entered 2016-06-02 17:01:25 by Englisch, Volker (NIH/NCI) [C]

A meeting with Margaret and Robin J. to go over the different image size options for PDQ summaries has been scheduled for tomorrow (Friday).

Comment entered 2016-06-03 16:17:19 by Englisch, Volker (NIH/NCI) [C]

I met with Margaret and Robin and both like the options available for the rest of the site a lot:

  • Left and Right Article Image Medium Template: Width of 40%

  • Left and Right Article Image Small Template: Width of 25%

  • Article Image Centered: Width of 75%

  • Article Image Centered Full: Width of 100%

Bryan had mentioned it might be possible to also make an option "40%, centered" (i.e. image-center-medium?) available and the users would very much like this as an additional option.

Comment entered 2016-06-03 16:22:44 by Englisch, Volker (NIH/NCI) [C]

These are the class names in NVCG.css that would be used to control the image size:

  • image-center

  • image-center-full

  • image-left-small

  • image-right-small

  • image-left-medium

  • image-right-medium

and possibly

  • image-center-medium

Comment entered 2016-11-09 15:22:17 by Kline, Bob (NIH/NCI) [C]

I'm just assigning story points for the CDR work. Not clear whether this would be eligible for inclusion in the Einstein release, as there may be timing dependencies on WCMS schedules.

Comment entered 2016-11-10 07:24:00 by Sun, Victoria (NIH/NCI) [C] [X]

- Once these changes are made in CDR, would it just require a FEQ release to sync up the images with the new templates? Or does this affect other parts of the system (i.e. GK, Percussion)?

Comment entered 2016-11-15 18:08:22 by Englisch, Volker (NIH/NCI) [C]

Currently, the GK code assigns the class name image-center to all Figure elements. Therefore, the GK code will need to be modified to honor the supplied MediaLink class names coming from the CDR.

Comment entered 2016-12-12 10:29:08 by henryec

or , can you put together a proposed technical approach that can be reviewed with the WCMS team? Since there are dependencies, it would be important to understand the impacts of proposed changes in the CDR, as well as brainstorm alternatives if needed. Let me know approximately when you think you could be ready for a discussion, and I'll setup a meeting. I'll move this into Iteration 2.

Comment entered 2016-12-14 10:47:10 by Englisch, Volker (NIH/NCI) [C]

I will come up with some documentation once we're starting E-IT2. However, the change to the WCMS-GK team should be minimal because the CDR will be adopting the image sizes currently available for the non-PDQ portion of the Cancer.gov site.

Comment entered 2017-01-19 13:58:31 by Juthe, Robin (NIH/NCI) [E]

needs to determine up front whether this can be implemented and deployed independent of the WCMS/GK schedule.

Comment entered 2017-01-20 14:34:39 by Englisch, Volker (NIH/NCI) [C]

Looking through the comments it appears that we had already identified that the GK code will ignore anything passed in the @size attribute of the MediaLink element.

However, as I said at yesterday's meeting, I have control over the XSL filters processing the summaries and I've done a little test decoding some of our size values to the NVCG CSS values:

  • full --> image-center

  • half --> image-left-medium

  • quarter --> image-right-medium
    Everything else is displayed as is, i.e. the attribute value becomes the class value for the figure element.

The work involved would be to update/replace a single file on the production server. This can be a manual task that's part of our Einstein release.

Comment entered 2017-01-26 17:34:16 by Englisch, Volker (NIH/NCI) [C]

I've updated the following schema:

  • CdrCommonBase.xml

The changes are the new attribute placement with the following valid values:

Value

Size

Position

image-center

75%

center (default)

image-center-full

100%

center

image-center-medium

40%

center

image-left-small

25%

floating left

image-right-small

25%

floating right

image-left-medium

40%

floating left

image-right-medium

40%

floating right

Please note: the value image-center-medium does not exist yet and will be added with a FEQ ticket.

Comment entered 2017-01-26 18:14:40 by Englisch, Volker (NIH/NCI) [C]

I have a question for and :
Since this new placement attribute is specific to the display on Cancer.gov and won't have any value for our PDQ partners I'm assuming we want to remove the attribute from the vendor output.

In addition, the attributes inline, size, MinWidth, and thumb are not used by Cancer.gov. I'm assuming we want to leave these values in the vendor XML output since we don't know if they are actually used by our partners.

Comment entered 2017-01-30 17:50:16 by Juthe, Robin (NIH/NCI) [E]

, I think we can strip the new attribute from the vendor output - , do you agree?

As for the other attributes, are any of these actually used? I just looked at a few images in summaries and glossary terms and none of those attributes are populated. So we might be able to remove them from the vendor output as well.

Comment entered 2017-01-30 18:09:18 by Englisch, Volker (NIH/NCI) [C]

As for the other attributes, are any of these actually used?

The MinWidth and inline attributes don't seem to be used at all. The size attribute is used, of course, and the thumb attribute is automatically populated by the filter. There is some comment indicating that Gatekeeper needed to know the size of an image in relation to a specified size in order to prevent adding the Enlarge button to an image already displayed at full size. However, as far as I can tell this attribute isn't used anymore in the current Gatekeeper code.

Since these attributes are optional in the DTD it should be OK to drop them from the vendor output.

Comment entered 2017-01-31 10:54:12 by Englisch, Volker (NIH/NCI) [C]

I prepared sample image size/location documents on Gatekeeper BLUE for review.

CDR62825
http://www-blue-dev.cancer.gov/types/lung/patient/lung-prevention-pdq
Section 2,

  • image-right-medium,

  • image-left-medium

CDR62834
http://www-blue-dev.cancer.gov/about-cancer/treatment/side-effects/constipation/GI-complications-pdq
Section 1

  • image-center

Section 2

  • image-right-small

  • image-right-small

Section 3

  • image-right-small

Section 4

  • image-center-medium (does not exist yet)

CDR62954
http://www-blue-dev.cancer.gov/types/colorectal/patient/colon-treatment-pdq
Section 1

  • image-right-medium

  • image-center (default)

  • image-right-small

  • image-right-small

  • image-right-small

  • image-right-small

Section 2

  • image-center

  • Image-left-medium

Section 4

  • Image-left-small

  • Image-left-small

CDR62955
http://www-blue-dev.cancer.gov/types/breast/patient/breast-treatment-pdq
Section 1

  • Image-center

  • Image-right-medium

Section 2

  • Image-right-small

  • Image-left-small

  • Image-center

  • Image-center

  • Image-center

  • Image-center

  • Image-center-full

  • Image-right-medium

  • Image-center

Section 3

  • Image-left-small

Section 5

  • Image-left-medium

  • Image-right-medium

  • Image-left-small

CDR62970
http://www-blue-dev.cancer.gov/types/breast/patient/pregnancy-breast-treatment-pdq
Section 1

  • Image-center-full

  • Image-center

  • Image-left-small

  • Image-left-small

  • Image-center

Comment entered 2017-01-31 11:09:01 by Englisch, Volker (NIH/NCI) [C]

The following filters have been updated (CDR) with the following changes:

  • R14557: CDR271370.xml - Module: Vendor Filter Templates

    • moving template getSummaryURL out into separate module

    • setting empty placement attribute to default value

  • R14557: CDR609947.xml - Vendor Filter: Convert CG to Public Data

    • removing unused MediaLink attributes (thumb, size, inline, MinWidth) from vendor output

  • R14557: CDR786432.xml - Module: URL Conversion

    • Created new module for URL Conversion

Comment entered 2017-01-31 11:20:21 by Englisch, Volker (NIH/NCI) [C]

Versioning modified DTD:

  • R14559: pdq.dtd

  • R14559: pdqCG.dtd

Comment entered 2017-02-02 11:26:14 by Osei-Poku, William (NIH/NCI) [C]

I reviewed the samples above and they look good to me. You made it really easy to test these :-). Did you make changes in the CDR at all or you want us to test in the CDR and use PP to review?

Comment entered 2017-02-02 11:55:22 by Englisch, Volker (NIH/NCI) [C]

Bryan wanted other people to take a look, too, and those people don't know anything about PP. That's why I had to make changes to the documents in the CDR and publish them and that's why you benefited from the results. :-)

It's up to you if you'd like to double-check PP as well.

One thing to keep in mind is that the placement image-center-medium does not exist yet. That's a new class that will be available after the next front-end release.
Another thing you've probably noticed based on the samples: Stay away from left/right positioning within lists and don't choose smaller image sizes when you have long captions!

Comment entered 2017-02-24 18:56:22 by Osei-Poku, William (NIH/NCI) [C]

I am unable to retrieve PP for any document with an image in it. I am getting the following error message:

"CDRPreview web service error: Xml data validation error,The 'size' attribute is not declared.Validation error occurred when validating the instance document.,891,110"

Comment entered 2017-02-27 10:17:43 by Englisch, Volker (NIH/NCI) [C]

When you're saying "any document" does that mean "any document of any document type" or just a specific document type?
The size attribute should be stripped out of the vendor output by the filters. I'll take a look of what's missing here. It's possible the filters have been installed but not made publishable.

Comment entered 2017-02-27 10:30:24 by Osei-Poku, William (NIH/NCI) [C]

Sorry for not been clear about this. I was only referring to summaries. I haven't started testing other doc types.

Comment entered 2017-03-03 11:37:44 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA.

Elapsed: 0:00:00.001617