-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add OPDS/Atom Feed link in HTML head #882
Conversation
Codecov ReportBase: 71.95% // Head: 71.95% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #882 +/- ##
=======================================
Coverage 71.95% 71.95%
=======================================
Files 54 54
Lines 3748 3748
Branches 2100 2100
=======================================
Hits 2697 2697
Misses 1049 1049
Partials 2 2 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@juuz0 Thank you, I will give a try |
@juuz0 What you have done looks good to me from a user perspective. That is what I was expecting. |
@kelson42 Awesome! I don't why the CI is failing though, is it a common problem to current-libkiwix or just this PR? (As a sidenote, how did you check the RSS feed? Is there an inbuilt feature in firefox/other browser?) |
Yes, a problem with the package building. Nothing related to your PR.
I checked the HTML and know how this feature should work. I have also a proper browser which displays an icon in the searchbar. |
Added image @kelson42 I also did a rebase so please remember that while pulling :> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code seems good to me.
(Edit: But I have missed the wrong usage of the api, I agree with @veloman-yunkan here, better using /catalog/v2/entries
)
However, I think the icon is a bit to lower, I would have put it at the top-right of the top bar.
But I will not block for that if there is a consensus against me.
Yes, top-right corner would be better IMO too. |
Done. Unrelated to this issue but https://github.com/kiwix/libkiwix/blob/main/static/skin/index.js#L22 is also using the old API, should that be changed too? |
yes please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works fine but few changes necessary to be polished
6012dd0
to
01a9f07
Compare
Rebased on main |
document.querySelector('#feed_link').href = `${root}/catalog/v2/entries?${filteredParams.toString()}`; | ||
const feedLink = `${root}/catalog/v2/entries?${filteredParams.toString()}`; | ||
document.querySelector('#feed_link').href = feedLink; | ||
document.querySelector('#feedLink').href = feedLink; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see in the current naming of the OPDS feed link ids a risk that any future links will be named feedlink
, FeedLink
, etc :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was worried about it too :P but kelson's recommendation so I let it pass.
What do you think is a better name?
@kelson42 @veloman-yunkan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep only version of feedLink
or feed_link
to have the naming consistant.
But we should have a id for the link in the head as head_feed_link
(or headFeedLink
) and feed_link
(or FeedLink
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
headFeedLink
then :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are good on my side.
You could have set the head id to headFeedLink
in the first commit to avoid the change in the second commit. But I will not block for that.
@juuz0 Please rebase on master so we can merge. |
This change adds a <link> element in the head node of welcome page. Browsers with extensions for RSS will show a sign to navigate to the feed. The link changes based on current set filters.
Added an image of rss logo on the welcome page which links to the RSS feed with current filters
@mgautierfr Done. |
Fixes #832