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

Link service integration causes feed autodiscovery to accumulate generated entries #2

Open
rigelk opened this issue Apr 27, 2018 · 1 comment
Assignees
Labels
halp wanted SEND HALP

Comments

@rigelk
Copy link
Owner

rigelk commented Apr 27, 2018

Sorry for the weird title, but there really isn't any clearer way to describe the problem.

This issue covers 7914ab8

CONTEXT

I'm trying to add RSS/ATOM feed autodiscovery by adding <link> entries in the <head> part of the page on certain pages. See the standard.

What feed autodiscovery generally looks like?

rss-autodiscovery-multiple-links

How browsers implement it?

https://html.spec.whatwg.org/#rel-alternate

What certain pages?

Actually, certain views since that's what Angular understands. It means we'll get to modify the current dom to emulate page changes. Maybe that's messing with the browser implementation though, I don't know.

PROBLEM

Welp, look at the commit message.

the link removal is NOT WORKING correctly. Debug shows it finding and removing entries, but the numbers are wrong (5 entries in the DOM, and 3 in the output HTML). We are looking to keep the 3 per page. Yet, they don't get removed from the autodiscovery list in Firefox… Thus, this is more 2-3 bugs that might very well be related. Send halp.

Indeed, at each view change, the current set of <link> entries should be deleted, and new ones added so that they correspond to the new view's feeds. But instead they aggregate in the browser's RSS autodiscovery tab. It could be a bug on Firefox's side, but I have a record of pebkac…

Okay, a picture is worth a thousand words. (this is Firefox 59.0.2 btw)

peek 27-04-2018 15-40

Now, could it be that the DOM elements don't get deleted? Nope, there are always 3 entries (JSON-feed won't get displayed by Firefox but we don't really care for now).

So, how does DOM manipulation get done in LinkService, and Angular more generally?

Before digging any deeper, know that I built LinkService based on seminal work here angular/angular#15776 (comment)

It leverages Angular 2's https://angular.io/api/core/Renderer2 API, as well as https://angular.io/api/core/RendererFactory2 to instanciate it. It could be that I'm not using the proper instance in the right view, but I honestly have no idea with my knowledge.

@rigelk rigelk added the halp wanted SEND HALP label Apr 27, 2018
@rigelk rigelk self-assigned this Apr 27, 2018
@frankstrater
Copy link

Now that Firefox has abandoned the built-in feed reader and Live Bookmarks since version 64, I was wondering if you are still working on this.

The reason I ask, is that there's some issues with the implementation of RSS and Atom in PeerTube due to the default content-disposition Firefox uses for links that end with filetypes .xml and .atom. Firefox wants to download these "files" (which aren't static files) based on their file extension.

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

No branches or pull requests

2 participants