Skip to content

Improved: Feed config: title, website url, feed url#4258

Merged
Alkarex merged 13 commits intoFreshRSS:edgefrom
math-GH:fix-empty-website-url
May 30, 2022
Merged

Improved: Feed config: title, website url, feed url#4258
Alkarex merged 13 commits intoFreshRSS:edgefrom
math-GH:fix-empty-website-url

Conversation

@math-GH
Copy link
Copy Markdown
Contributor

@math-GH math-GH commented Mar 4, 2022

empty website URL

If the website URL input is empty:
grafik

Before:
grafik

After:
grafik

title + feed URL required

After:
grafik

Before: the fields were not required

Changes proposed in this pull request:

  • Javascript: do not show "See website"
  • feed update template: required fileds + input type=url

How to test the feature manually:

  1. Go to subscription management and edit a feed
  2. delete content of title, website URL, Feed URL

Pull request checklist:

  • clear commit messages
  • code manually tested

@Alkarex Alkarex added this to the 1.20.0 milestone Mar 5, 2022
<li class="item"><a href="<?= _url('stats', 'repartition', 'id', '------') ?>"><?= _t('index.menu.stats') ?></a></li>
<?php } ?>
<li class="item"><a target="_blank" rel="noreferrer" href="http://example.net/"><?= _t('gen.action.see_website') ?></a></li>
<li class="item" id="websiteURL"><a target="_blank" rel="noreferrer" href="http://example.net/"><?= _t('gen.action.see_website') ?></a></li>
Copy link
Copy Markdown
Member

@Alkarex Alkarex Mar 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not good, as we end up with multiple elements with the same ID in the DOM. Could be changed to a class instead, but see my alternative proposition below.

@Alkarex
Copy link
Copy Markdown
Member

Alkarex commented Mar 8, 2022

Instead of removing the Website link, we could consider falling back on feed URL when the Website is empty. Easier logic and I would find it more consistent:

<a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a>

@math-GH
Copy link
Copy Markdown
Contributor Author

math-GH commented Mar 8, 2022

Instead of removing the Website link, we could consider falling back on feed URL when the Website is empty. Easier logic and I would find it more consistent:

I am not happy with this idea (or I do not understand it correctly).

On my device (Firefox on Windows), an RSS link would open an download prompt. I would be irritated, when I clicked on "Website" and would expect an opened website of the feed.

@math-GH
Copy link
Copy Markdown
Contributor Author

math-GH commented May 20, 2022

Improved. Now it is changed from ID to class

a.href = '#dropdown-' + id;
div.querySelector('.dropdown-target').id = 'dropdown-' + id;
div.insertAdjacentHTML('beforeend', template);
if (feed_web.length < 1) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, wrong comment. It is in a template, so all good

@Alkarex Alkarex added the UI 🎨 User Interfaces label May 30, 2022
@Alkarex Alkarex merged commit 98f9409 into FreshRSS:edge May 30, 2022
@math-GH math-GH deleted the fix-empty-website-url branch June 8, 2022 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI 🎨 User Interfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants