hplush / slowreader

Web app to combine feeds from social networks and RSS and to help read more meaningful and deep content
https://dev.slowreader.app
GNU Affero General Public License v3.0
161 stars 37 forks source link

Do not show mobile menu on no categories #261

Closed ilyatitovich closed 1 month ago

ilyatitovich commented 1 month ago

Fixes #178

  1. Added API in core for display mobile menu;
  2. Code handles open/close menu moved to core from template;
  3. Added tests.

Motivation

Improve UX.

I suggest to open menu when user navigate to /slow, /fast and /add routes, so I added subscription to router. Also we can add check is mobile and handle calculation only if it's narrow screen. I would like to discuss it.

github-actions[bot] commented 1 month ago

Pull request auto-reviewer

github-actions[bot] commented 1 month ago

Pull request auto-reviewer

ilyatitovich commented 1 month ago
  1. Removed stores;
  2. Moved the logic to openMenu();
  3. Added a dynamic function substitution to the template so that it wouldn't run twice (when clicking and navigating).
ai commented 1 month ago

I am planning to start refactoring, so I am merging it (I will fix small changes)