Commit Graph

90 Commits

Author SHA1 Message Date
Inverle
fd9e2843f1 Minor refactor <img class="icon"> -> _i('...') (#8297) 2025-12-08 20:32:28 +01:00
Inverle
9fb3a02b96 Keep scroll state of page when closing the slider (#8295) 2025-12-08 00:29:43 +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
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
Alexandre Alapetite
5eba322cbd New stats overview of dates with most unread articles (#8089)
New view with direct links to dates with most unread articles:

<img width="734" height="581" alt="image" src="https://github.com/user-attachments/assets/159a39b3-3a06-4ae9-9cc0-62ae36d9db9c" />
2025-10-14 11:05:17 +02:00
Alexandre Alapetite
8bd9bd95d8 Minor update syntax echo (#7941)
* Minor update syntax echo
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/7939

* Fix layout
Whitespace optimisation needed to avoid style glitch
2025-09-11 21:19:31 +02:00
Alexis Degrugillier
d31f485973 fix: add default values on stat processing (#7891)
Before, there was an error when retrieving stats for a user without feeds. Now, there are default values to display empty stats instead of an exception.

See #7884

Closes #7884

Changes proposed in this pull request:

- add default values when retrieving stat data

How to test the feature manually:

1. create a new user
2. connect as the new user
3. display stats
4. validate that there is no errors
2025-09-01 23:28:17 +02:00
maTh
afb6f788fa Improve stats page layout (#7243)
* New stats box layout

* repartition: table overview improved with links and icons

* Show selected feed name in title

* i18n string: overview

* fix

* fix

* fix

* delete unused stat in frss

* Update app/i18n/fr/admin.php

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-01-21 23:45:22 +01:00
maTh
27c2e2490a templates and i18n: link back to rss feeds (#7162) 2024-12-29 23:45:50 +01:00
Alexandre Alapetite
b1d24fbdb7 PHPStan 2.0 (#7131)
* PHPStan 2.0
fix https://github.com/FreshRSS/FreshRSS/issues/6989
https://github.com/phpstan/phpstan/releases/tag/2.0.0
https://github.com/phpstan/phpstan/blob/2.0.x/UPGRADING.md

* More

* More

* Done

* fix i18n CLI

* Restore a PHPStan Next test
For work towards PHPStan Level 10

* 4 more on Level 10

* fix getTagsForEntry

* API at Level 10

* More Level 10

* Finish Minz at Level 10

* Finish CLI at Level 10

* Finish Controllers at Level 10

* More Level 10

* More

* Pass bleedingEdge

* Clean PHPStan options and add TODOs

* Level 10 for main config

* More

* Consitency array vs. list

* Sanitize themes get_infos

* Simplify TagDAO->getTagsForEntries()

* Finish reportAnyTypeWideningInVarTag

* Prepare checkBenevolentUnionTypes and checkImplicitMixed

* Fixes

* Refix

* Another fix

* Casing of __METHOD__ constant
2024-12-27 12:12:49 +01:00
kwarraich
066d92be32 Matching category colors across pie-charts (#7090)
* Trying to implement linkace as a sharing method, related to issue 6698. it's in the files now and shows up but is not sharing properly now

* creating a colour palette based on the number of categories, then making it into hex values to use later

* assigning categories with specific colors to make sure the colors are consistent in the graph

* adjusted pychart logic to account for unique assignments of each categoery with the colours

* fixing redundant code blocks

* removing extra uneeded code -an accidental commit

* removed changes unrelated to PR

* fixed linting errors

* refactored color palette to use CSS native hsl() colors

* Fix whitespace

---------

Co-authored-by: rsharaf-dev <rsharaf@andrew.cmu.edu>
Co-authored-by: roma2023 <romasaparhan19@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-12-15 12:32:25 +01:00
Luc SANCHEZ
15745d42b7 Upgrade code to php 8.1 (#6748)
* revert
Fix code indentation
Fix code

Upgrade code to php 8.1

* fix remarques

* code review

* code review

* code review

* Apply suggestions from code review

* code review

* Fixes

* Many remainging updates of array syntax

* Lost case 'reading-list'

* Uneeded PHPDoc

---------

Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-11-28 17:11:04 +01:00
maTh
2489b6259a fix regression user query page (#6859) 2024-10-01 21:42:43 +02:00
Alexandre Alapetite
dfac9f5813 PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions

* Uniformisation
2024-09-11 17:14:53 +02:00
Alexandre Alapetite
d2247221bb Minor update whitespace PHPCS rules (#6666)
* Minor update whitespace PHPCS rules
To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12.
Does not change our current conventions, but just a bit more consistent.

* Forgotten *.phtml

* Sort exclusion patterns + add a few for Extensions repo

* Relaxed some rules
2024-08-01 20:31:40 +02:00
Alexandre Alapetite
3eb3574b13 No warning for muted feeds (#6114)
* No warning for muted feeds
fix https://github.com/FreshRSS/FreshRSS/issues/6113

* Revert subscription
2024-02-21 09:46:47 +01:00
Alexandre Alapetite
a80a5f48a1 Pass PHPStan level 8 (#5946)
* Pass PHPStan level 8
And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels

* Revert wrong replace in comment

* Fix PHPStan level 8

* Update PHPStan and other dev dependencies

* Remove obsolete comment

* noVariableVariables and towards bleedingEdge
https://github.com/phpstan/phpstan-strict-rules
https://phpstan.org/blog/what-is-bleeding-edge

* More bleedingEdge

* A bit more PHPStan level 9

* More PHPStan level 9

* Prepare for booleansInConditions
Ignore int and null

* Revert wrong line

* More fixes

* Fix keep_max_n_unread

* Stricter attribute functions

* Stricter callHooks and more PHPStan level 9

* More typing

* A tiny more
2023-12-18 17:59:16 +01:00
Luc SANCHEZ
30c7a61a9b Use strict_types (#5830)
* Little's optimisations and booleans in conditions

* Apply strict type

* Apply strict type

* Apply strict type

* Fix multiple bugs with PHP 8.2 and 8.3

* Many declares missing, more errors fixed

* Apply strict type

* Another approach

* Stronger typing for Minz_Session

* Fix case of SQLite

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-16 22:43:00 +01:00
maTh
baab354ca2 Improve table scrolling (#5774)
* class table-wrapper added

* class scrolbar-thin added

---------

Co-authored-by: math-gh <>
2023-10-29 20:49:33 +01:00
Alexandre Alapetite
fe7d9bbcd6 Typed view model classes (#5380)
* Typed view model classes
* Add ability to provide a typed view model class to a controller
* Use `::class` instead of string for referring to classes
* Examplified with `stats` and `javascript` controllers / views (more to do)
* Also useful for extensions (my usecase today), which did not have the ability to define own view model attributes before.

* Typo
2023-05-11 12:53:32 +02:00
Alexandre Alapetite
c72914bba2 PHPStan Level 7 for more DAO PDO (#5328)
* PHPStan Level 7 for more DAO PDO
With new function to address common type and check problems

* A bit more

* PHPStan Level 7 for FreshRSS_Entry
2023-04-28 14:01:11 +02:00
Alexandre Alapetite
f3760f138d Complete PHPStan Level 6 (#5305)
* Complete PHPStan Level 6
Fix https://github.com/FreshRSS/FreshRSS/issues/4112
And initiate PHPStan Level 7

* PHPStan Level 6 for tests
* Use phpstan/phpstan-phpunit
* Update to PHPStan version 1.10

* Fix mixed bug

* Fix mixed return bug

* Fix paginator bug

* Fix FreshRSS_UserConfiguration

* A couple more Minz_Configuration bug fixes

* A few trivial PHPStan Level 7 fixes

* A few more simple PHPStan Level 7

* More files passing PHPStan Level 7
Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251

* A few more PHPStan Level 7 preparations

* A few last details
2023-04-17 08:30:21 +02:00
Alwaysin
cb1c2da8e6 Correct manage link on stats page (#4768)
Wasn't working before
2022-10-24 01:26:19 +02:00
Cyb10101
89202922b1 Slider: Block Page for one scrollbar; Scrollbar width normal (#4692)
* Block page if slider is open; Hides the double page scrollbar

* Slider scrollbar default width

* Update frss.rtl.css

* Add user Cyb10101 to credits

* make fix-all

* make fix-all (second pass)

Co-authored-by: mathContao <math-home@web.de>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-10-05 23:40:59 +02:00
maTh
46d0b4140e Improved: better semantic HTML for boxes (#4665)
* add h1 title on views

* add h2 titles into box-title

* thin scrollbar in box-content
2022-10-03 18:04:10 +02:00
maTh
6bed64f6f3 Improved: Mouse title on empty feeds (#4617)
* Update aside_feed.phtml

* Update global.phtml

* Update idle.phtml

* Update index.phtml

* Update idle.phtml

* improved

* Update app/views/subscription/index.phtml

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

* Update app/views/stats/idle.phtml

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

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-09-18 18:31:14 +02:00
maTh
2d807e06b1 Fix/Improved: Slider mobile (#4416)
* add close button, add content slider div

* add &ajax=1#slider to the links

* CSS

* fix showPW functionality

* open slider after received Ajax

* do not show empty slider

* RTL CSS

* fixed code smell

* improved: links prep via JS

* Redirect anchor

* enable #anchors in printuri()

* enable #slider when config was saved

* Active sliding via JS

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-07-19 12:56:09 +02:00
maTh
992b906062 Slider: close via shortcut (#4394)
* change close-slider behind slider

* open/close slider via anchor

* use shortcuts globaly

* deleted debugging console.log()
2022-05-30 23:06:50 +02:00
Alexandre Alapetite
0fc0060966 Fix slider when no article (#4375)
* Fix slider when no article
#fix https://github.com/FreshRSS/FreshRSS/issues/4373
https://github.com/FreshRSS/FreshRSS/pull/4291

* Use aside

* Forgotten

Co-authored-by: maTh <math-home@web.de>
2022-05-17 23:31:24 +02:00
maTh
5e28bf8b40 Improved: slider (#4297)
* CSS

* thin scrollbar

* fix whitespaces in CSS

* fix CSS order
2022-04-11 10:31:04 +02:00
Alexandre Alapetite
6f018cc674 Show errored, empty, muted feeds in statistics (#4276) 2022-03-21 12:51:26 +01:00
maTh
be9c06fd5c Improved: Idle feeds list in a new layout (#4192)
* that should work fine

* fixed phpcs

* fixed phpcs
2022-02-05 10:57:36 +01:00
Alexandre Alapetite
77e9877316 Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/

```sh
composer run-script phpstan
```

* More fixes

* Fix global variables

* Add .phtml

* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090

* Fix more warnings

* Fix view errors and enable in CI

* ReturnTypeWillChange

* Dynamic view type

* Fix Minz static/self bug
2021-12-31 17:00:51 +01:00
maTh
a54aa19dc7 Fix: double main tags (#4014)
* replace div with main

* include the slider into main

* format source

* add close icon for the extension slider

* replace div with main

* Update shortcut.phtml

* fixed the nits
2021-12-03 00:57:32 +01:00
maTh
02641de32e Stats: replace flotr2 with chart.js (#3858)
* include Chart.js

* page: main statistics. Flotr.js replaced with Chart.js

* main stats + repartition

* Delete: repartition.js + stats.js

* delete flotr2

* add libs in README

* polish

* code polish

* fixed amount of week days and months

* added manget link for LibreJS

* added: @license-end

* phpcbf + jshint formatting

* delete old code

* fix stats

* fix Comments

* finally I found the issue and fixed its best

* fix the month stats

* Whitespace fixes

* Remove flotr2

* Rename to chart.min.js

* Remove console.log

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-10-16 12:00:07 +02:00
maTh
e5e9a417da Menu: move stats into subscription management (#3803)
* add stats menu into subscription management menu
* delete stats menu entry from dropdown menu
* Delete aside_stats.phtml
* Update aside_subscription.phtml
2021-09-12 11:50:00 +02:00
maTh
6c396997f2 Statistics: improved layout (#3797)
* css grid layout

* Update repartition.phtml

* scrolling the canvas if it does not fit
2021-08-25 11:52:40 +02:00
maTh
f1e15cdd82 Improve the link "back to RSS feeds": set a CSS class (#3761)
* templates

* improved CSS class names
2021-08-20 14:07:14 +02:00
Alexandre Alapetite
947e918f05 Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length

* Also check whitespace in CSS files

* Fix line length ext.php

* More syntax, string templates

* Fix exclude-pattern

* Test JS files as well
2021-02-28 12:26:24 +01:00
Alexandre Alapetite
82278af7a9 Fix double HTML-encoding in category names (#2897)
Category names are already HTML-encoded when reaching the view.
2020-04-12 16:36:45 +02:00
Alexandre Alapetite
7a5236de3f Take advantage of PHP 5.4+ short echo (#2585)
* Take advantage of PHP 5.4+ short echo

https://php.net/migration54.new-features thanks to
https://github.com/FreshRSS/FreshRSS/pull/2495

Use `<?=  ?>` instead of `<?php echo; ?>`
10kB of code saved :-)

Done with regular expression:
```
<\?php echo (.+?);? *\?>
<?= \1 ?>
```

* Try Travis fix

https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272
2019-10-23 11:18:20 +02:00
Alexandre Alapetite
a66b995be7 Explicit quotes decoding (#1947)
* Explicit quotes decoding

* Explicit htmlspecialchars_decode and htmlspecialchars
2018-06-22 16:07:48 +02:00
Alexandre Alapetite
967dff535d Merge branch 'FreshRSS/dev' into PostgreSQL 2016-08-13 21:14:36 +02:00
Alexandre Alapetite
e6fd34bdda CSRF token, update HTTP Referrer policy to same-origin
https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
https://github.com/FreshRSS/FreshRSS/issues/570
https://github.com/FreshRSS/FreshRSS/issues/955
https://github.com/FreshRSS/FreshRSS/issues/1198
https://github.com/FreshRSS/FreshRSS/issues/565
https://github.com/FreshRSS/FreshRSS/issues/554
2016-08-13 17:49:31 +02:00
Alexandre Alapetite
bee833bf52 Problematic MySQL reserved keyword
`read` and `reads` are reserved keywords
2016-08-07 00:54:49 +02:00
Alexandre Alapetite
93f7f84987 Restaure compatibility with Internet Explorer 11 / Edge
https://github.com/FreshRSS/FreshRSS/issues/772
2016-07-31 18:25:02 +02:00
Alexis Degrugillier
5f04462e55 Fix redirection while deleting a feed
Before, when deleting a feed from the statistics idle page, there was an error in the redirection process.
Now, the redirection works properly and redirects to the idle page.
2016-03-06 12:51:39 +01:00
Alexandre Alapetite
cb913a3a76 CSP for statistics and forms
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-21 19:15:23 +01:00
Alexandre Alapetite
264d05297c CSP for statistics
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-21 17:26:37 +01:00
Marien Fressinaud
875b8a72f9 Coding style endforeach (must be avoided) 2014-12-17 21:15:24 +01:00