-
-
Notifications
You must be signed in to change notification settings - Fork 121
Custom embedded mimeType support and custom css #31
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
Conversation
* add support for custom mimeType attachment * add support custom css
coverall if/else
|
Hi @yoghi Tnx for the PR, I just released a new version, can you please first merge that one into this PR? Tnx! |
|
@wswebcreation merge done. |
|
Thx, will look at it this week |
wswebcreation
left a comment
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.
Awesome addition, tnx!!
Can you also update the readme in the same structure it is now and explain what a user needs to do to get this report.
I also like adding the custom CSS, but maybe we also need to think about a way to make it more easy for people to add custom CSS buy changing some values instead of adding a complete stylesheet. What do you think about that?
templates/components/scenarios.tmpl
Outdated
| <% if (!_.isEmpty(step.attachments)) { %> | ||
| <% _.each(step.attachments, function(attachment, attachmentIndex) { %> | ||
| <div id="info<%= scenarioIndex %><%= stepIndex %>-attachment<%= attachmentIndex %>" class="scenario-step-collapse collapse"> | ||
| <object class="attachment" style="height:100%;width:100%;" type="<%= attachment.type %>" id="my_attachments_<%= attachmentIndex %>" data="<%= attachment.data %>"> |
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.
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.
Yes, with chrome is a problem, with firefox removing style (copy and paste from image, sorry) appeare better, but is not a real solution. I try to search around internet if someone have a solution.
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.
Removing style we have
chrome:

With embedding data the only solution acceptable seem to be this.
Seem to work well with audio too.
I have try to use iframe instead of object/embed but chrome doesn't like.
I have evaluated as solution use PDF.js but the view increase his complexity and is specific for pdf.
|
I have splitted css between "custom" and "override". Custom is append, override is full replace. |
update readme
|
I haven't add an explain for "multiple attachment" because user no need to do nothing, it's a passive features. |
dependency update
|
I have update some dependency. |
|
@wswebcreation missing something? |
|
Yeah, time, sorry 😢 Hope to do it this weekend and make a release |
remove style inline
| <% if (step.image) { %> | ||
| <div id="info<%= scenarioIndex %><%= stepIndex %>-image" class="scenario-step-collapse collapse"> | ||
| <a class="screenshot" href="<%= step.image %>" target="_blank"> | ||
| <img class="screenshot" style="height:100%;width:100%;" id="my_images" src="<%= step.image %>"/> |
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.
Removal was not needed because now big images exceed the width of the window. But this triggers me that id="my_images" needs to be replaced with a class because we can have multiple screenshots in a feature
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.
we can add on style.css
.screenshot { width: 100%; height: 100%; }
for multiple screenshot must be change step.image into an array.
|
I'll merge the changes tomorrow and add some changes / extra info to the readme. Tnx for the PR and your patience!! |


Now it possible embedded attachment with custom mimeType (ogg, video, pdf, ecc... )