Skip to main content

Change the behavior of the open/zoom function of the preview component to responsive, instead of opening images scaled to 100%.

See the example below. End users experience this as annoying.

 

 

Hi ​@Harm Horstman,

This feature is meant for cases in which the preview won't work due to CORS, not for zooming in specifically.
We only open the URL of the preview in a new browser tab, the rest is handled by the browser.
If we would instead handle this ourselves to achieve responsiveness, we again run into CORS disallowing us from viewing the URL.
For example, in our internal TCP Support Tickets screen, some tickets have an Azure DevOps workitem in the Preview component. We can't whitelist URLs for CORS in Azure DevOps so it can't be previewed, in this case the “Open preview in a new tab” functionality comes in handy:


Release notes for this feature:


Kind regards,
Leroy Witteveen


@Harm Horstman,

As an alternative, you could let the preview component point to a HTML expression field in which you include the image URL inside of an <img src=”URL_HERE” /> tag and include an image zoom JavaScript library.

Kind regards,
Leroy Witteveen


Hi ​@Leroy Witteveen ,

Thanks for the explanation, I understand it more or less. 

In the meantime we have made a alternative solution that opens the URL, by means of a process flow, which results in the wanted behavior, without any CORS issues, for as far I see.

 

 

If this works, would it not be possible for you than to achieve the same with the showPreviewOpenButton option?


@Harm Horstman,

You're using the “Open link” process flow action in that case, right?
I would expect it to work exactly the same as the showPreviewOpenButton.
Which browser and operating system are you testing this on? And are you sure you don't have a browser zoom applied in one scenario and don't have that in the other?



Kind regards,
Leroy Witteveen


@Leroy Witteveen ,

Correct, that is the action we use.

It works fine in all browsers and devices, also on an iPhone.

To be complete, this is the link we open...

https://………./indicium/sf/stt/document('7576A28E-40ED-436F-83A9-98E92FA1BAA7')/STT.download_doc_original_url_image_preview

This is a workable solution, but I would prefer making use of generic built-in functionality

 


Hi ​@Leroy Witteveen ,

I did some more research and see in the console that my solution does indeed give some error messages, which is not desirable.

Your idea to include the image URL inside, could work, but if this works, then I wonder why it is not possible for you to display images that are in a file storage fitting within the window in a new tab without errors with the ShowPreview button?

The picture below makes the whole problem clear: