Giter Club home page Giter Club logo

Comments (17)

sagarnasit avatar sagarnasit commented on September 27, 2024 1

@pradeep910 we should give an attribute option to user for sticky ad where he can specify other attributes as well.

example

AMP_AdManger::get_ads( [
    sticky => true,
    mobile_sizes   => '.....',
    tablet_sizes     => '.....'
    desktop_sizes => '.....'
] );

or
Use separate function for sticky ad when user just have to pass other attributes.

AMP_AdManger::get_sticky_ad( [
    mobile_sizes   => '.....',
    tablet_sizes     => '.....'
    desktop_sizes => '.....'
] );

from amp-admanager.

sagarnasit avatar sagarnasit commented on September 27, 2024 1

@deepaklalwani97 Settings remain same. Please do not add sticky ad in footer, instead user will config sticky ad like normal ad by passing required attributes. What is different for sticky ad is that we will use separate function get_amp_sticky_ad. This function will call get_amp_ad internally in which we will pass dynamic attributes passed by developer, in addition to that we will pass sticky ad required attributes with them. For end developer configs remain same but have to call different function for different ad type.

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@pradeep910 Can you share more details on what needs to be done in this issue.

from amp-admanager.

pradeep910 avatar pradeep910 commented on September 27, 2024

@deepaklalwani97 Added description pls let me know if you still have questions.

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@pradeep910 Should I add fields for height and width to the options page or are we going to use a fixed height and width for the sticky ad. We cannot use multiple breakpoints for the sticky ad as only one sticky ad is allowed per page otherwise it will not show sticky if there are multiple.

from amp-admanager.

pradeep910 avatar pradeep910 commented on September 27, 2024

@deepaklalwani97 Width and height can be passed through function, but ideally it only should show banner / horizontal ads.
The function will set width and height using this sizes attribute or whatever we give in breakpoints like desktop-sizes, tablet-sizes, etc.

$ad_attr = [
						'ad-unit'       => 'GK_Header',
						'desktop-sizes' => '600x90,728x90',
						'tablet-sizes'  => '320x50,468x60',
						'mobile-sizes'  => '320x50,468x60',
						'sizes' => '320x50,728x90',
						'layout'        => 'fixed',
					];

Default should be 320x50

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@pradeep910 Yes I know my question is we want to pass these sizes as hardcoded in function or provide a setting for the user to add.

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

I have added different sizes according to the devices. Let me know if we want a setting for that. This PR is ready for review #62.

from amp-admanager.

pradeep910 avatar pradeep910 commented on September 27, 2024

@sagarnasit @deepaklalwani97
I think separate function will be good idea.
Please go ahead with this -

AMP_AdManger::get_sticky_ad( [
    mobile_sizes   => '.....',
    tablet_sizes     => '.....'
    desktop_sizes => '.....'
] );

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@pradeep910 @sagarnasit I don't think the separate function would make any difference it would just create the redundancy as the code in both the functions would almost be the same. Still, let me know your thoughts and if we want to go ahead with this.

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@pradeep910 About the size of ads do we want to keep a specific static size for all devices or dynamically passed by the user from settings?

from amp-admanager.

sagarnasit avatar sagarnasit commented on September 27, 2024

I don't think the separate function would make any difference it would just create the redundancy as the code in both the functions would almost be the same.

@deepaklalwani97 Whole purpose of making a separate function is to make it developer friendly and easy to understand the functionality. Under the hood it will call the get_ads function with required sticky ads attributes so there should not be any redundancy.

About the size of ads do we want to keep a specific static size for all devices or dynamically passed by the user from settings?

We will also need to allow dynamic passing of attributes like we are doing it for normal amp ad.

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@sagarnasit Should I add three settings for different device sizes( i.e mobile, tablet, desktop ) for a user to add?

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@sagarnasit @pradeep910 The suggested changes are addressed in #62. Can you please re-review again and approve. so I can get this tested by QA and merge it.

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

@pradeep910 We cannot have multiple breakpoints for the amp sticky ad. Because it will throw validation error in reader mode and remove other amp-sticky-ad markup in transitional and standard mode if there are multiple sticky ads on a page and we can use only one amp-ad inside the amp-sticky-ad. Can we have one fixed-size sticky amp ad or let the user select the size for the sticky ad from the settings?

from amp-admanager.

pradeep910 avatar pradeep910 commented on September 27, 2024

@deepaklalwani97 Lets use fixed size for sticky ad.

from amp-admanager.

deepaklalwani97 avatar deepaklalwani97 commented on September 27, 2024

I have updated the PR to add setting fields for height and width to be applied to the sticky ad.

from amp-admanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.