adobe / acc-js-sdk

A JavaScript SDK for Adobe Campaign Classic
Apache License 2.0
21 stars 20 forks source link

Adding class name to uploader frame for unique identification #99

Closed kvikram1988 closed 9 months ago

kvikram1988 commented 9 months ago

Description

IFrame is an inline element. Giving just height and width without the display won't work. So, adding display property and also adding a unique className for identification.

Related Issue

Motivation and Context

Multiple iframes are rendered on UI for uploads and these iframes are taking up empty space provided by default by the browser.

How Has This Been Tested?

Tested it on ACC UI to see if IFrame is no more taking up empty space. Also classname can be seen.

Screenshots (if appropriate):

Types of changes

Checklist:

kvikram1988 commented 9 months ago

Shouldn't the class name use a random number to make it really unique?

Made it configurable, taking it through the options. classNames need not be unique as it is only used for styling

gauravmakkar commented 9 months ago

@kvikram1988 if we want the iframe to be unique, why don't we use id instead?

kvikram1988 commented 9 months ago

@kvikram1988 if we want the iframe to be unique, why don't we use id instead?

@gauravmakkar We don't want iframe to be unique within same types, we want it to be unique from other iframes. Like upon 3 uploads, 3 iframes will be rendered by acc-js-sdk. We want to handle those by common classname but we can't do the same with unique ids.