Commit Graph

1405 Commits

Author SHA1 Message Date
Rasmus
814d8ccdb3 Fix greader JSON encoding on malformed UTF-8 (#8697)
### Motivation
- The GReader API enabled `JSON_THROW_ON_ERROR` globally and streams items with `json_encode()` without catching `JsonException`, so malformed UTF-8 in feed-derived fields could trigger an uncaught exception and abort streaming responses (resulting in 500/partial responses). 

### Description
- Add `JSON_INVALID_UTF8_SUBSTITUTE` to `JSON_OPTIONS` in `p/api/greader.php` so `json_encode()` substitutes invalid UTF-8 bytes instead of failing while keeping `JSON_THROW_ON_ERROR` and other flags unchanged. 

### Testing
- Ran a syntax check with `php -l p/api/greader.php`, which completed successfully.

------
[Codex Task](https://chatgpt.com/codex/cloud/tasks/task_e_69b8831ec0c48324810ea9ec05c16493)
2026-04-16 16:03:39 +02:00
Inverle
cc64991c16 Implement setting for iframe referrer allowlist (#8672)
* Implement setting for iframe referrer allowlist

* Improve config label
2026-04-07 18:29:27 +02:00
Inverle
57471eda19 Don't mark as read if middle click is outside of article link (#8553)
* Don't mark as read if middle click is outside of article link

Closes https://github.com/FreshRSS/FreshRSS/issues/6451

https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event

> The auxclick event is fired at an [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) when a non-primary pointing device button (any mouse button other than the primary—usually leftmost—button) has been pressed and released both within the same element.

> auxclick is fired after the [mousedown](https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_event) and [mouseup](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event) events have been fired, in that order.

* Split up `onmouseup` and `onauxclick` logic

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

---------

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2026-04-03 22:32:19 +02:00
Bowen
ae2d0d7fe8 feat(favicon): Use feed-provided icon URL (<image><url>, Atom icon/logo, JSON Feed icon) (#8633)
* prefer feed.icon
Closes #5518

Changes proposed in this pull request:

- When a feed provides an icon URL (<image><url> in RSS 2.0/1.0, <atom:icon>/<atom:logo> in Atom, icon/favicon fields in JSON Feed), that URL is stored as a feedIconUrl attribute on the feed and used as the primary source for favicon downloads, instead of scraping the feed's website for <link rel="icon"> tags.
- If the feed-provided icon URL fails to return a valid image, the existing fallback chain (website HTML favicon search → /favicon.ico) is preserved.
Custom favicons uploaded by users always take priority and are never overridden.

How to test the feature manually:

1. Add an RSS feed that includes a <image><url> element (e.g. an RSSHub feed: `https://rsshub.app/youtube/channel/UC2cRwTuSWxxEtrRnT4lrlQA`). After actualization, confirm the feed's favicon matches the avatar image from the feed, not the Bilibili site favicon.
2. Add an Atom feed containing <atom:icon> or <atom:logo> Confirm the feed icon is used.
3. Add a JSON Feed (spec: icon field). Confirm icon is preferred over favicon when both are present.
4. Temporarily point a feed's <image><url> to a broken URL. Confirm FreshRSS falls back to the website favicon silently.
5. Upload a custom favicon for a feed, then actualize it. Confirm the custom favicon is not replaced.

<img width="470" height="317" alt="image" src="https://github.com/user-attachments/assets/17445154-d94c-44d6-b7e7-019bf24c5767" />

* fix(favicon): use htmlspecialchars_decode for feed image URL

* Decode quotes as well

* New function in our SimplePie fork
https://github.com/FreshRSS/simplepie/pull/73

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-03-31 09:57:06 +02:00
Michael
61f3151f7f Convert feed view into grid where appropriate (#8631)
* Convert feed view into grid where appropriate
This makes the feed view prettier on mobile, if thumbnails and summary are shown, as discussed in https://github.com/FreshRSS/FreshRSS/discussions/8629

**Changes proposed in this pull request:**

- Converts Feed Item list into multiple lines
- But only if both thumbnails and summaries are shown

The code is quite different from what I had done in my own hack: There I had used `display: flex` and then counted items, but that only works for my own hack: here we don't know how many items a given user may have, so we use `display:grid` instead with name grid areas.

**How to test the feature manually:**

1. Ensure you enable both thumbnails and summaries
2. Check out the feed view on mobile
3. Play around with enabling and disabling bookmarks, share button, etc.

**Pull request checklist:**

- [x] clear commit messages
- [x] code manually tested
- [ ] unit tests written (optional if too hard)
- [ ] documentation updated

**Screenshots:**

<img width="458" height="1173" alt="SCR-20260324-jnte" src="https://github.com/user-attachments/assets/1d5c1615-961a-4953-8157-f9f8a5470545" />
<img width="459" height="1172" alt="SCR-20260324-jnwf" src="https://github.com/user-attachments/assets/96ffcea3-384f-4de9-9c50-3366022713d8" />


* remove gap

* fix lint errors

* fix style errors

* remove whitespaces

* Reduce use of slow `:has()` CSS selector

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-03-31 09:53:09 +02:00
Alexandre Alapetite
0257ba9051 Fix CSS padding of .content pre code (#8620)
fix https://github.com/FreshRSS/FreshRSS/discussions/8618
And also duplicated `.box .box-content .item.feed`
2026-03-20 23:04:20 +01:00
Inverle
815b97017b Improve consistency of slider behavior after submitting form (#8612)
Closes https://github.com/FreshRSS/FreshRSS/issues/8529

* Preserve `error` parameter after submitting form in subscription management
2026-03-18 00:10:53 +01:00
Alexandre Alapetite
aeb55693e4 SQL improve PHP syntax uniformity (#8604)
* New SQL wrapper function `fetchInt()`
* Favour use of `fetchAssoc()`, `fetchInt()`, `fetchColumn()`
* Favour Nowdoc / Heredoc syntax for SQL
    * Update indenting to PHP 8.1+ convention
* Favour `bindValue()` instead of position `?` when possible
* Favour `bindValue()` over `bindParam()`
* More uniform and robust syntax when using `bindValue()`, checking return code
2026-03-15 14:44:39 +01:00
Inverle
a05546526d Fix wrong navigation buttons layout on Chromium (#8606)
* Fix wrong navigation buttons layout on Chromium

* Replace another `display: table`

* `justify-content` not needed

* Replace hardcoded width with `flex: 1`
2026-03-15 13:26:03 +01:00
Alexandre Alapetite
36e1c59d8d More robust JS (#8595)
Avoid JS errors:
* Following an SQL / paging issue
* When using a limited view such as `&ajax=1`
2026-03-14 11:08:29 +01:00
Inverle
a4bcdf1a80 Create dynamic favicons from SVG instead of PNG canvas (#8577) 2026-03-08 10:46:38 +01:00
rid3r45
3e4d5bb041 Add option to hide sidebar by default (#8515) (#8528)
* Add option to hide sidebar by default (#8515)

Closes https://github.com/FreshRSS/FreshRSS/issues/8515

Changes proposed in this pull request:

- Add `sidebar_hidden_by_default` user preference (default: `false`)
- Add a checkbox in the Display settings page to toggle this preference
- Hide the sidebar on page load in `normal` and `reader` views when the preference is enabled and no session state exists
- Add English translation key; mark all other languages as `TODO` for translators

How to test the feature manually:

1. Go to Settings → Display, tick "Hide sidebar by default", save
2. Go back to the main view (normal or reader): the sidebar should be hidden on load
3. Toggle the sidebar manually — it should open/stay open for the rest of the session
4. Open a new tab: the sidebar should be hidden again
5. Go to Settings → Display, untick the option, save: the sidebar should now be visible on load as usual
6. Check that the sidebar is always visible on Settings pages regardless of the preference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: PR comment

* Update app/i18n/pl/conf.php

* i18n: fr

* make fix-all

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Inverle <inverle@proton.me>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-03-02 13:32:10 +01:00
Alexandre Alapetite
cf631b6f87 Implement filter on last modified date by server (#8131)
* Implement filter on last modified date by server
Especially relevant for API, to get the modified changes: the API will now return the articles that are new or which content has been modified since `ot`:

fix https://github.com/FreshRSS/FreshRSS/issues/7304
fix https://github.com/FreshRSS/FreshRSS/issues/2566
https://github.com/jocmp/capyreader/discussions/533#discussioncomment-11341808

New corresponding search operator `mdate:` and new UI:

<img width="650" height="627" alt="image" src="https://github.com/user-attachments/assets/8ba02937-abc7-44bf-b718-cf269cc37caf" />

* Migration from existing id column

* Fix auto-update

* Index after update for performance

* Minor comment

* Minor whitespace

* Fix regex

* Minor .gitignore

* Changelog and warning

* Update app/i18n/pl/gen.php

Co-authored-by: Inverle <inverle@proton.me>

* make fix-all

* Optimise SQL auto-update
For speed and resilience

* Minor SQLite change of sequence

* Changelog

* Speed optimisation: No DEFAULT 0

* Better migration

* Revert small bug

* Prepare filtering on multiple dates for API

* make fix-all

* Update tests

* Remaining manual merge

* Update versions

* Remove warnings no longer relevant in changelog

* Implement in API, and COALESCE

* No lastModified when adding new article

* Rework logic

* Sort IS NOT NULL

* Remove forgotten lastModified

---------

Co-authored-by: Inverle <inverle@proton.me>
2026-03-01 21:43:03 +01:00
Inverle
9f0a8deb6f Only display scrollbar everywhere if there's an overflow (#8542)
Replaces all instances of `overflow-{x,y}: scroll` with `overflow-{x,y}: auto`

Empty scrollbars may appear due to usage of `scroll` instead of `auto` on Chromium, even when there is no overflow. As far as I know this does not happen with Firefox.

<img width="1461" height="405" alt="2026-03-01_14-29" src="https://github.com/user-attachments/assets/0a246823-8ea5-4d50-a1e8-aac33e73df0e" />
<img width="753" height="806" alt="2026-03-01_14-30" src="https://github.com/user-attachments/assets/631b06a5-5008-4ede-a216-bccac4898f85" />
2026-03-01 21:25:16 +01:00
Inverle
b98aa6b00c Improve pagination styling in logs page (#8541)
Before:

<img width="819" height="82" alt="2026-03-01_13-47" src="https://github.com/user-attachments/assets/96262bd2-25de-42b2-a19a-275b81f300cb" />

After:

<img width="842" height="77" alt="2026-03-01_13-48" src="https://github.com/user-attachments/assets/895f2db8-74ef-4aa6-ade4-b8b0794fc287" />

---


* Made button text actually centered
* Removed italic font
* Added `overflow-x: auto` so page doesn't overflow if there's too many pagination buttons displayed on a small screen
2026-03-01 21:08:41 +01:00
Inverle
8497524ac0 Fix only the title being highlighted after hovering a bit on an article (#8538)
Before:

![before](https://github.com/user-attachments/assets/cafbbe8d-bad9-40fc-bb85-f825a2c16003)

After:

![after](https://github.com/user-attachments/assets/ca5f8736-66e0-4634-bf97-fe03e9633a63)

Affected themes were:

* Alternative Dark
* Origine
* Pafat
2026-02-28 15:06:36 +01:00
Inverle
b249b9d026 Fix JS error when Navigation API is not present (#8524)
Closes https://github.com/FreshRSS/FreshRSS/issues/8511
2026-02-22 23:30:39 +01:00
Inverle
6b5304b825 Fix slider behavior when using navigate back button (#8496)
Closes https://github.com/FreshRSS/FreshRSS/issues/8488

* Ensure leave confirmation is shown by preventing navigation using the [Navigation API](https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API)
* Prevent scroll lock by removing it on `hashchange` instead of `onclick` on the close buttons
2026-02-08 20:42:20 +01:00
rupak
b59a2101b4 Add option to enable notifications (#8458)
Closes https://github.com/FreshRSS/FreshRSS/issues/7330

- Default behavior is same
- Added FreshRSS_Context::userConf()->html5_disable_notif so that, it determines weather user wants notification. (will not show any even it has permission) (i want default false so disable, so old configs get proper default values)
- Added button such that checking it makes it request permission too 
<img width="707" height="119" alt="image" src="https://github.com/user-attachments/assets/a0fdbc4d-9f15-4644-8753-f0e6c979677f" />

- test notification actually happening (how can i trigger it, do i have to wait it), this code fixes permissions.
2026-01-29 21:34:35 +01:00
Alexandre Alapetite
0df3a3c51c Rewrite setcookie using new syntax (#8447)
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2630 now that we have PHP 7.3+ (even PHP 8.1+).
* The new syntax natively supports `samesite`, and also avoids the need of re-setting all parameters.
* Use automatic path instead of own function `getCookieDir()`.

Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8446
* Sanitize lifetime of session cookies from PHP ini to avoid likely invalid/misunderstood values
2026-01-28 08:21:25 +01:00
Alexandre Alapetite
ac0bf3c170 Fix shortcut next unread article (#8466)
fix https://github.com/FreshRSS/FreshRSS/issues/8426
regression from https://github.com/FreshRSS/FreshRSS/pull/8057
2026-01-25 13:57:20 +01:00
Tsung-Han Yu
84604e0c64 fix validator url update (#8436)
Closes https://github.com/FreshRSS/FreshRSS/issues/8435

Changes proposed in this pull request:
- update validator links to use the same open-url handler with prefix + encoding
- ensure the validator link reflects the current #url field value before opening
- keep existing open-url behavior for other links unchanged

How to test the feature manually:
1. Open feed edit (or add feed) form.
2. Change the feed URL in the URL field.
3. Click “Check the validity of the feed” and verify it opens the validator with the updated URL.
2026-01-20 20:00:39 +01:00
Thomas Hufschmidt
2cbb5f8db1 Update documentation in regards to CSP warnings (#8439)
* Add a reference to the check where the warning is triggered

Note:
This is the place where the admin sees the browser pointing to.
Adding this information here allows the admin to find the matching
documentation entry.

* Update Content-Security-Policy section of english ServerConfig documentation

Note:
This fixes some minor formating/typping issues and adds some clarity to
the fact that this warning is also triggered on correctly configured
hosts, simply due to the nature of how correctness of CSP rules are checked.

* Move CSP infor source-code comment into console.info

Note:
Improve visibility of why this is happening.

* Point towards static website documentation instead of git

This URL should also remain more fixed even accross new branches/releases.

Co-authored-by: Inverle <inverle@proton.me>

* Minor fixes

* Remove overwrite part

---------

Co-authored-by: Inverle <inverle@proton.me>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-01-17 22:28:56 +01:00
Alexandre Alapetite
15814cfd35 Add remote user in Apache logs, also for API (#8392)
* API: add remote user in Apache logs
fix https://github.com/FreshRSS/FreshRSS/discussions/8385

Example:
```
2026-01-01T18:38:28.645486326Z 0.0.0.0 - alex [01/Jan/2026:19:38:28 +0100] "GET /api/greader.php/reader/api/0/subscription/list?output=json HTTP/1.1" 200 9798 "-" "curl/8.14.1"
```

* Fallback mod_rewrite

* Log remote user with same priority as FreshRSS_http_Util::httpAuthUser()
2026-01-03 17:48:33 +01:00
Alexandre Alapetite
2527033057 Fix unwanted expansion of user queries in some cases (#8395)
fix https://github.com/FreshRSS/FreshRSS/issues/8378
2026-01-03 16:52:33 +01:00
Inverle
7e5d2d0727 Change Content-Disposition: inline to attachment in f.php (#8344)
Some [misconfigured instances](https://github.com/FreshRSS/FreshRSS/issues/7835) may be stripping out the CSP header that `f.php` sends, which can be mitigated by forcing the browser to download the image instead of displaying it and executing JS code from unsanitized SVGs for example.

Contributes to https://github.com/FreshRSS/FreshRSS/pull/8263 and https://github.com/FreshRSS/FreshRSS/pull/7924
(improving security when CSP is not present)
2025-12-24 21:35:34 +01:00
Inverle
672411ca70 Fix dropdown menus in sidebar going under the navigation bar (#8336)
Missed in #8335 because I was testing without having the navigation bar enabled.

<img width="674" height="198" alt="image" src="https://github.com/user-attachments/assets/a1db7f95-f1d9-47e5-a572-20892e6c7abc" />
2025-12-21 15:37:23 +01:00
Inverle
f387abe2c4 Display sidebar dropdowns above if no space below (#8335)
Closes https://github.com/FreshRSS/FreshRSS/issues/7801
2025-12-21 14:02:27 +01:00
Alexandre Alapetite
4bd5035914 Rework encoding of search filters (#8324)
Rework:
* https://github.com/FreshRSS/FreshRSS/pull/8222

now that we have:
* https://github.com/FreshRSS/FreshRSS/pull/8293

Follow-up of:
* https://github.com/FreshRSS/FreshRSS/pull/8311

* More simplification

* Deprecate getRawInput
2025-12-17 10:07:52 +01:00
Andy Valencia
19666d70ed Bump to API level 4 for Fever; add with_ids so we can mass-change rea… (#8312)
* Bump to API level 4 for Fever; add with_ids so we can mass-change read/unread/saved/unsaved on lists of articles.
As discussed in https://github.com/FreshRSS/FreshRSS/issues/8305

A small enhancement to the Fever API to vastly increase efficiency when bulk marking items.
-

How to test the feature manually:

The client at:

https://sources.vsta.org:7100/FeedMonkey/file?name=js/Fever.js&ci=tip

has code to talk to this API enhancement (when the API level says it's supported).  In particular walkArticles().

* Update indentation per PR check on Github

* make fix-all

* Line length

* Fix many typing issues

* is_numeric

* Update comment

---------

Co-authored-by: Andy Valencia <ajv-899-334-8894@vsta.org>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-12-16 08:36:29 +01:00
Alexandre Alapetite
476e57b046 Reverse hash and nonce (#8320)
Safer password evaluation
2025-12-15 22:06:05 +01:00
Inverle
36118117f0 Improve scrolling into filter in sidebar (#8307)
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8281

todo:
* [x] Include labels (prefix `t_`) too
* [x] Keep sidebar scrollTop when using the nav menu
* [ ] ~~Make this work in the reader view's sidebar too~~ for separate PR
* [x] Prevent whole page from scrolling on `scrollIntoView()` call, just scroll in the sidebar (probably related: https://github.com/FreshRSS/FreshRSS/pull/8306#issuecomment-3647414618)

This TODO will be done in a separate PR since it requires optimizing the sidebar toggle code.
edit: it does work on Chrome already though, but only if `#stream` isn't too large / breaks randomly (Firefox is slower it seems)
2025-12-15 15:12:12 +01:00
Alexandre Alapetite
4b6127ee04 New links in transitions and jump to next transition (#8294)
Easier to explain graphically:

<img width="408" height="266" alt="image" src="https://github.com/user-attachments/assets/0e3724a1-155b-4a87-89b3-cfe8a18cb100" />

The jump to next section ⏭ works when the sorting criterion is a date.

Need https://github.com/FreshRSS/FreshRSS/pull/8293
2025-12-13 11:38:33 +01:00
Alexandre Alapetite
a8a544a2a2 Fix search encoding and quoting (#8311)
Revised the encoding approach for searches: the HTML encoding is done just before its use for DB search.
Fix also some cases with wrong quoting.
Fix https://github.com/FreshRSS/FreshRSS/pull/8306#issuecomment-3643865439
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8293
2025-12-13 11:31:34 +01:00
Inverle
7dd04b00cf Scroll into filtered feed/category on page load (#8281)
Previously if you were to go to for example *Subscription management* and filter a feed, the feed wouldn't be visible in a sidebar with lots of feeds, since you'd have to scroll to it first. Now, this is no longer the case.
Note that if the navigation comes from the sidebar itself, the original behavior remains. (scroll into previous `scrollTop` value of sidebar)
Also improves experience of using shift+j/k (see https://github.com/FreshRSS/FreshRSS/pull/8057)
2025-12-11 18:33:39 +01:00
Inverle
e85d805351 Keep scroll state of page when closing the slider with JS shortcut (#8301)
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8295
2025-12-09 17:05:05 +01:00
Inverle
bb9089aa99 Fix chart resize regression due to chart.js v4 update (#8298)
* Fix chart resize regression due to chart.js v4 update

* Update to chart.js v4.5.1 + add .map file for easier debugging

https://github.com/chartjs/Chart.js/releases/tag/v4.5.1

* Delete .map file
2025-12-09 00:59:10 +01:00
maTh
d9ac9c513f Improve sidebar toggle button position (#8286)
Ref https://github.com/FreshRSS/FreshRSS/pull/8201#issuecomment-3610813235

<img width="422" height="119" alt="grafik" src="https://github.com/user-attachments/assets/0859bf55-d8e6-4401-adda-e854bf41a64a" />
2025-12-06 12:18:23 +01:00
Alexandre Alapetite
78e40c6fe3 Scaling of user statistics (#8277)
Fix https://github.com/FreshRSS/FreshRSS/issues/8268
To better support user management on FreshRSS instance with many users.

SQL speed improved. On a reduced test with 5 users, including some large accounts (PostgreSQL on a very tiny and slow server), improving from ~2.3s to ~1.8s, which gives ~20% speed improvement.

Then tested with 1000 users, with only the default feed (on my old desktop computer):

```sh
for i in {1..1000}; do ./cli/create-user.php --user=freshrss$i --password=freshrss; done
app/actualize_script.php
cli/access-permissions.sh
```

SQLite:

```console
$ time cli/user-info.php | wc -l
1001

real    0m1.366s
user    0m0.908s
sys     0m0.475s
```

PostgreSQL:

```console
$ time cli/user-info.php | wc -l
1001

real    0m28.498s
user    0m12.137s
sys     0m2.217s
```

MariaDB:

```console
# time ./cli/user-info.php | wc -l
1001

real    0m49.485s
user    0m1.276s
sys     0m2.258s
```

Yes, SQLite is much faster - not a surprise for such use-cases, where the TCP connection is not re-used.

I have added some CLI options to disable some statistics:

```sh
cli/user-info.php --no-db-size --no-db-counts
```

For the Web UI, I have disabled detailed user statistics if it takes too long, and retrieve missing user statistics asynchronously via JavaScript. Lazy loading of the user details based on IntersectionObserver, with maximum 10 requests in parallel.
Web UI tested on 1000 users as well. Checked with SeaMonkey.
2025-12-04 19:11:31 +01:00
Inverle
d55f017ccd Implement button for toggling sidebar on all views (#8201)
* Implement button for toggling sidebar on all views

Closes https://github.com/FreshRSS/FreshRSS/issues/7673, https://github.com/FreshRSS/FreshRSS/issues/7100, https://github.com/FreshRSS/FreshRSS/issues/6119, https://github.com/FreshRSS/FreshRSS/issues/5338, https://github.com/FreshRSS/FreshRSS/issues/2792, https://github.com/FreshRSS/FreshRSS/issues/4224, https://github.com/FreshRSS/FreshRSS/issues/4136

https://github.com/user-attachments/assets/0629e465-6450-440e-b38b-430e9ff73ef9

Keyboard shortcut for doing the same: <kbd>t</kbd>

* Partially fix other views

Repartition page looks broken on Swage

* Correction

`close-aside` wasn't meant to be removed

* i18n(conf): fr

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* make fix-all

* Fix settings slider not opening in reader view

* make readme

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-12-04 08:48:03 +01:00
Alexandre Alapetite
1a3565f26c More visible selected article (#8230)
There was not enough difference between selected and not-selected articles, especially not due to hovering using the same style.
Already relevant as is, and more relevant for a future feature depending on selected article.
Additional help welcome to further improve the styling, in this PR or a future one, also for the other themes.

In this example, the third article is the one selected:

<img width="443" height="189" alt="image" src="https://github.com/user-attachments/assets/06168e9f-1b91-47e2-9b64-4fd8ca6c7186" />

* Compensate the increased border-left-width

* Implement in Pafat

* Implement in Nord

* Shorten comment

* Implement in Alternative Dark

* Implement for Flat

* Implement for Swage

* Implement in Ansum and Mapco

* Call stylelint_fix before rtlcss
So that RTLCSS includes the fixes from previous step
2025-11-25 23:27:43 +01:00
Alexandre Alapetite
1c92d55917 Use native CSS instead of SCSS (#8241)
I was tired of having to handle the SCSS themes differently.
fix https://github.com/FreshRSS/FreshRSS/issues/7611
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8200
Convert Ansum and Mapco themes from SCSS to native CSS.
The changes are actually quite limited (mostly changing the syntax of the variables and a few other things)
Require support for:
* https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Nesting
* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/Nesting_selector
* https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix

SCSS and SAAS tools and references are also removed.

Tests welcome.
The styles are left as individual CSS files as designed originally in SCSS. I expect proper HTTP caching and HTTP/2 to be sufficient instead of aggregating back to a single CSS, but might be done in another PR if needed.

At the same time, fixed the fact that we had various whitespace styles in our JSON files, in particular in those themes, sometimes with 2 spaces, or 4 spaces, or tabs. Use tabs everywhere as defined in editorconfig.

I would like to merge this one first to complete https://github.com/FreshRSS/FreshRSS/pull/8230

* RTLCSS stringMap
https://github.com/FreshRSS/FreshRSS/pull/8241#discussion_r2553175514
https://github.com/MohammadYounes/rtlcss/issues/108#issuecomment-347033134
2025-11-23 13:15:10 +01:00
Alexandre Alapetite
d3cb23118c Misc API: better REST semantics (#8232)
To allow minimal diagnostic from client side
2025-11-20 22:16:02 +01:00
Alexandre Alapetite
e6f4fe0481 Reduce SCSS: rewrite Swage as CSS (#8200)
* Reduce unused SCSS

* Rename Swage .scss to .css

* Convert from SCSS to native CSS
Contribute to https://github.com/FreshRSS/FreshRSS/issues/7611

Taking advantage of:
* https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Nesting
* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/Nesting_selector
* https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Colors/Using_relative_colors#using_math_functions

This was mostly to get started and get a better idea of the difficulties.

I am happy to see that the differences between the original SCSS and the native CSS are limited.
The relevant diff to look at is: dd1bc7c663

The main remaining issue is that the *CSS Color Module Level 4, Relative Color* is not mainstream yet, so a small compatibility section is needed with precomputed colour values.
2025-11-11 23:28:21 +01:00
Alexandre Alapetite
a18c35046d Housekeeping lib_rss.php (#8193)
* Housekeeping lib_rss.php
`lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924
Moved most functions to other places.
Mostly no change of code otherwise (see comments).

* Extension: composer run-script phpstan-third-party
2025-11-11 08:17:12 +01:00
maTh
e3fedceeb9 less margin - wrapper div deleted (#8196)
Follow up https://github.com/FreshRSS/FreshRSS/pull/8190 and https://github.com/FreshRSS/FreshRSS/pull/8152

before:
<img width="1090" height="449" alt="grafik" src="https://github.com/user-attachments/assets/ee6a54a2-3602-4f2c-8eb2-cb186287e245" />


After:
<img width="907" height="452" alt="grafik" src="https://github.com/user-attachments/assets/3a3066e5-90e1-4b65-a1c4-18964494f644" />
2025-11-08 22:53:28 +01:00
Inverle
8cb2158a39 Replace arrow navigation in theme switcher with <select> (#8190)
Follow-up (or replacement) of https://github.com/FreshRSS/FreshRSS/pull/8167

![gif](https://github.com/user-attachments/assets/96cdeaff-36bc-4d0b-9b75-97bd7ff78ba1)
2025-11-06 20:45:44 +01:00
Tommaso Ferrari
63fe743878 Fix 7307 - Scroll after load (#7962)
* Fix 7307 - Scroll after load

Closes https://github.com/FreshRSS/FreshRSS/issues/7307

- Wrap the body of `loadDynamicTags()` into a Promise
- inside `mylabels()`, wait for the promise to complete, then scroll
- when `loadDynamicTags()` is not being called, return a self-resolving promise

How to test the feature manually:

1. Click on an long article
2. press keyboard shortcut `l` to go to "My labels"
3. page should scroll down
4. the `My labels` popup should be fully visible

* Rewritten as async/await
* Explicit HTTP Accept application/json

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-11-05 11:51:33 +01:00
Alexandre Alapetite
0587ccaff8 Custom favicons async/await (#8182)
Rewrote the last Promise pattern of our code-base with an async/await pattern: [custom feed favicons](https://github.com/FreshRSS/FreshRSS/pull/7646)
Related to:
* https://github.com/FreshRSS/FreshRSS/pull/7962
2025-11-05 11:46:46 +01:00
Alexandre Alapetite
b6c63d2239 Better transitions between groups of articles (#8174)
fix https://github.com/FreshRSS/FreshRSS/issues/7520
fix https://github.com/FreshRSS/FreshRSS/issues/8168
fix https://github.com/FreshRSS/FreshRSS/discussions/8172
2025-11-04 12:49:21 +01:00