Skip to content
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

Component for quicklink #19905

Closed
JosefJezek opened this issue Dec 16, 2018 · 6 comments
Closed

Component for quicklink #19905

JosefJezek opened this issue Dec 16, 2018 · 6 comments

Comments

@JosefJezek
Copy link

Could you create component for quicklink?

https://github.com/GoogleChromeLabs/quicklink

@aghassemi
Copy link
Contributor

Thanks @JosefJezek. We have started designing for a holistic seamless page transition experience in AMP which would also include the logic of prefetching (and prerendering since AMP can do that).

Please follow #12981 for updates.

If it turns out that separating page transitions and prefetching into different components makes sense, you may do that as well. For now I am putting this feature request under the same category.

@westonruter
Copy link
Member

@aghassemi I think this closely relates to amp-sw's link-prefetch module. In fact, I think that Quicklink would provide a better developer and user experience than the current prefetching which is done manually by the developer adding attributes to links: ampproject/amp-sw#15.

@westonruter
Copy link
Member

Consider an amp-link-prefetch component, taking Quicklink's configuration object which we've adapted into JSON format for the wp-quicklink plugin:

<amp-link-prefetch>
    <script type=application/json>
        {
            "el": "main",
            "urls": [],
            "timeout": 2000,
            "timeoutFn": "requestIdleCallback",
            "priority": false,
            "origins": [
                "wordpress.example.com"
            ],
            "ignores": [
                "feed=",
                "/feed/",
                "^https?://[^/]+/(#.*)?$",
                "^https://wordpress.example.com/wp-admin/",
                "^https://wordpress.example.com/[^?#]+.php",
                "^https://wordpress.example.com/wp-content/"
            ]
        }
    </script>
</amp-link-prefetch>

@aghassemi
Copy link
Contributor

I think this fits the One-line PWA project fairly well. The configuration may fit better as part of whole configuration needed to auto-PWA a page, so the explicit amp-link-prefetch may not be needed and rather it may be a section in a

<amp-pwa-config>
      <script type=application/json>
        { prefech: {
            "el": "main",
            "urls": [],
            "timeout": 2000,
            "timeoutFn": "requestIdleCallback",
            "priority": false,
            "origins": [
                "wordpress.example.com"
            ],
            "ignores": [
                "feed=",
                "/feed/",
                "^https?://[^/]+/(#.*)?$",
                "^https://wordpress.example.com/wp-admin/",
                "^https://wordpress.example.com/[^?#]+.php",
                "^https://wordpress.example.com/wp-content/"
            ]
        }}
    </script>
</amp-pwa-confing>

/to @kristoferbaxter
/cc @prateekbh

@kristoferbaxter
Copy link
Contributor

We're discussing this issue here: ampproject/amp-sw#15.

Prefetching is important, but how we do so should be decided before attempting to port quicklink to an AMP component. Let's use the linked issue to figure out the best course forward.

@prateekbh prateekbh removed their assignment Aug 6, 2019
@nainar nainar closed this as completed Dec 5, 2019
@nainar nainar reopened this Dec 5, 2019
@samouri
Copy link
Member

samouri commented Feb 19, 2021

Closing since AFAIK we don't plan on staffing an effort to implement a quicklink component. Hopefully one of the two related efforts (amp-sw, or "seamless page transitions") bears fruit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants