GSoC Summer with Plone / Improving AMP support

I am interested in contributing to Plone this summer. I am really interested in the idea of Improving AMP support for Plone. The Idea seems interesting. I still have to go through the codebase for that. How can I start, Please mention. I will be obliged, @hvelarde.

Regards

Hi @addiittya2006! Welcome to the Plone community and thanks for thinking of us for your GSoC experience. We have a number of suggestions at the top of this post for how to get started:

Please do read them and follow them as much as you can. In the meantime, speaking to @hvelarde here is a great way to get more specific information about that particular idea.

c

welcome! I'm here to help.

where do I start and what would be our responsibilities during the period?
Do you notice any bugs, fallbacks or new features to be added?

@addiittya2006, Thanks for asking. I'm sure that @hvelarde will be able to weigh in with his ideas soon. It might help when you have specific questions to include his username (with the '@' sign in front like above) so that he is notified directly.

As for your responsibilities during the coding period, that is for you and @hvelarde to work out in your proposal. I'm certain that @hvelarde has his own ideas about what new features should be added (he's mentioned several in the outline of the idea but we have found over the years that it is far more important that you personally have an interest in the work you are doing. Students who take on projects to build something they personally wish to see have a greater success rate than those who sign on to do the work we ask of them.

Why don't you get a proposal started, in draft form, in the GSoC web site? You can let us join in in reviewing and working with you on that proposal, and the outcome will be a more solid proposal based on your interests and shaped by our needs.

c

I think @cewing already answered to you; let me know if you have any doubts after reading the outline of the idea.

Hi
I've few queries on this project "Improving AMP support"
Like the project described that this project aims to improve AMP support. So if suppose a user install this add-on on it's website he could use all the features like amp-twitter, amp-youtube etc. So this will be good on mobile viewing, fast and google search will rank this version firstly. So other users(like viewers from desktop) won't be affected by this right?
So i'm thinking how this works?is it like another domain with m.plone.org ? So when google recognise the device it send the user to this domain rather than plone.org?
Apart from this if we integrate all those desired features in collective.behavior.amp what else is benefited from this project?
@hvelarde @cewing

I understood it. Never Mind.

Hey
On looking into validations.py

Particularly on is_valid_logo(data) function
Why are we doing this we could just add container class into it it will handle the image size according to width of the device.
And it is not mentioned in invalid AMP CSS.
This way it will be painful for new customers
Any thoughts?
@hvelarde @cewing

because that's what the AMP specification states on publisher's logo guidelines:

https://developers.google.com/search/docs/data-types/articles#logo-guidelines

BTW, I have an early version of this package installed and working here:

Awesome
But I think it's not compatible with chrome on android. I'm not able to see the difference
Do we have to work with every browser? I think it's independent of chrome or android.
Have you installed the same collective.behavior.amp addon on that website? I didn't check that.
Anyway I'll look into that problem later.
On CI part I've a query
phone community work with jenkins for CI but on collective.behavior.amp I've seen .travis.yml file so will this create any issues?
I mean core products go for jenkins and addon go for travis. no issue right all will perform their own test script? Right?
@hvelarde

please read the AMP documentation and then read the README file of collective.behavior.amp to understand what and why we are doing what we are doing: as good old Abe said, sharp your axe before cutting the tree.

collective.behavior.amp uses Travis CI (as most Plone add-ons) because is simpler to setup than Jenkins and free for OS projects.

1 Like

I've one problem
$ amphtml-validator https://www.ampproject.org/
This is the validation command for amp-html tags. But what i'm supposed to write for testing in travis CI.

I'm currently reviewing the scope of this proposal as it includes too many integrations that could make it difficult to achieve in time.

what I would like to see?

  • a search form returning AMP-enabled results only
  • support for folder and collection listings in AMP format
  • full compatibility with Plone 4.3 and Plone 5.x
  • validation
  • performance enhancements
  • near 100% test coverage

from the previous list comments (amp-form) and ads (amp-ad and/or amp-sticky-ad) are on top of the list and the other features could be achieved if time permits.

so don't start implementing; first try to understand what problem we are trying to solve using AMP and how Plone could be enhanced by using it.

2 Likes

can you please elaborate these two points little more?

On performance enhancements
Are you referring to Google AMP cache mechanism? issue #17?

if we think on adding this Google AMP cache mechanism some clients may dislike this.
I just read this

Any thoughts?

@Cadhage, @kakshay21, let me explain you the scope more carefully: as mentioned before, collective.behavior.amp is a package that provides some limited support for Accelerated Mobile Pages in Plone.

Dexterity is a new content type framework that is included in Plone 4.3 as optional and is the default in Plone 5; a Dexterity-based content type can be modified through what is called a "behavior"; behaviors adapt a content type adding features like new fields or, in our case, more metadata and a new view.

so, let's say I apply the behavior to the News Item content type in Plone 5; after that I will have 2 things on instances of that content type: a meta tag in the default view (which is called view) adding metadata information about the availability of a new view for this object, and that new view which is called amp.

if you open an instance of your News Item object and you check the HTML you'll see the meta tag on top; and if you visit the instance of your object adding /@@amp at the end of the URL, you will see the AMP view of that item.

collective.behavior.amp at this moment only provides that view for Dexterity-based content types with the behavior applied.

besides implementing other tags, I would love to see some other enhancements to integrate the package better with Plone itself; why? because currently there's no way to navigate the site in AMP mode: when you arrive to the view, you'll see only the content and there's no way to view listings or to make searches.

take a look at this, for instance:

there's a menu on the AMP view but when you select any item on it you go back to the normal view.

so, what I would love to see in the beginning is 2 things: we need to image a way to display listings (even if they don't have an AMP behavior applied, in AMP view; or maybe we have applied the behavior to the Folder and Collection types also and provide a listing in AMP format.

the second thing is having a search form that returns content that is available in AMP format; let's say we want to search all content that mentions BRICS on this site:

as you can see, the results are in normal format; so I was thinking on the possibility of enable a search button on the AMP view to make that new search form available.

the other stuff I think is pretty obvious, but what I really want is you to imagine how a CMS like Plone could benefit from the ideas and current features of the AMP specification.

don't dig deep into the details, because we will have time for that later. as I said before, try to understand what problems AMP solve and what use cases can benefit for this approach.

don't hesitate to contact me in case you have further questions.

good night and good luck!

3 Likes

We've encountered few similar pattern on investigating through the issues of collective.behavior.amp.
And concluded that most of the weird issues that we are getting, can be removed just by implementing a validator for AMP.
And we agreed on using this for the task.
This thread describes the other valid options

Coming on the implementation part, well this is the activity where everyone has to come together and decide.
So we welcome @everyone for their valuable suggestion.

Can you please review the code? @hvelarde

How do we test our features?
Normally I follow this
https://docs.plone.org/develop/coredev/docs/intro.html#testing-locally
but this time I'm developing on collective.behavior.amp
So this does not download files on src folder where I can commit and test features.
So right now I've clone the repo in different folder and here I'm committing and pushing the code.
I know this is inefficient as I have to rely on Travis build to correct my mistakes.
Is there any efficient way of doing this?

Plone Foundation Code of Conduct