Skip to content

Mark as read button: config for the size#7314

Merged
Alkarex merged 7 commits intoFreshRSS:edgefrom
math-GH:markAsRead-button-size
Mar 13, 2025
Merged

Mark as read button: config for the size#7314
Alkarex merged 7 commits intoFreshRSS:edgefrom
math-GH:markAsRead-button-size

Conversation

@math-GH
Copy link
Contributor

@math-GH math-GH commented Feb 7, 2025

Closes #7310 and #2016

default: big
grafik

small:
grafik

none:
grafik

benefit:
user can decide which button fits best. The big button has advantages ans disadvantages.

@math-GH math-GH added the UX User experience label Feb 7, 2025
@math-GH math-GH added this to the 1.26.0 milestone Feb 7, 2025
@Alkarex Alkarex modified the milestones: 1.26.0, 1.27.0 Feb 7, 2025
@Alkarex
Copy link
Member

Alkarex commented Feb 7, 2025

(Let's try to release 1.26.0 soon, so focussing mostly on regressions)

FreshRSS_Context::userConf()->lazyload = Minz_Request::paramBoolean('lazyload');
FreshRSS_Context::userConf()->sides_close_article = Minz_Request::paramBoolean('sides_close_article');
FreshRSS_Context::userConf()->sticky_post = Minz_Request::paramBoolean('sticky_post');
FreshRSS_Context::userConf()->mark_read_button = Minz_Request::paramStringNull('mark_read_button') ?? 'big';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not understand the issue here:

 Check failure on line 134 in app/Controllers/configureController.php
GitHub Actions / tests

Property FreshRSS_UserConfiguration::$mark_read_button ('big'|'none'|'small') does not accept string.

Copy link
Member

Choose a reason for hiding this comment

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

It is because you have not checked that the string is only 'big'|'none'|'small'.
You may do so with e.g. in_array()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the help.
Would it make sense to have a function similar to Minz_Request::paramStringNull that have the check implemented too?

Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to have a function similar to Minz_Request::paramStringNull that have the check implemented too?

I did a quick test but did not found how to do that in a way that is understood by PHPStan, so keeping it simple for now, but help welcome with another proposition that works.

@Alkarex Alkarex linked an issue Mar 13, 2025 that may be closed by this pull request
@Alkarex Alkarex merged commit 7de384b into FreshRSS:edge Mar 13, 2025
1 check passed
@math-GH math-GH deleted the markAsRead-button-size branch March 24, 2025 21:06
@Alkarex Alkarex modified the milestones: 1.27.0, 1.26.2 Apr 1, 2025
This was referenced Apr 3, 2025
Alkarex pushed a commit that referenced this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UX User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Disable the mark all as read button Improving the "mark all as read" big button

2 participants