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 |
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.
~SunVw - can you list out the c.gov image sizes and the cdr image sizes?
This was given a medium priority by Margaret's team on 5/11/16
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
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.
~volker - 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.
~SunVw - 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!
A meeting with Margaret and Robin J. to go over the different image size options for PDQ summaries has been scheduled for tomorrow (Friday).
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.
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
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.
~volker - 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)?
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.
~bkline or ~volker, 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.
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.
~volker needs to determine up front whether this can be implemented and deployed independent of the WCMS/GK schedule.
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.
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.
I have a question for ~mbeckwit and ~juther:
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.
~volker, I think we can strip the new attribute from the vendor output - ~mbeckwit, 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.
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.
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
…
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
Versioning modified DTD:
R14559: pdq.dtd
R14559: pdqCG.dtd
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?
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!
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"
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.
Sorry for not been clear about this. I was only referring to summaries. I haven't started testing other doc types.
Verified on QA.
Elapsed: 0:00:00.001617