Tel qu'utilisé, LazyLoad charge les nouvelles images lors d'un scroll. Hors dans certains cas (navigation clavier ou clic souris sur un article pour l'ouvrir), aucun scroll n'est généré et du coup les images ne sont pas chargées.
Ce patch ajoute un événement scroll artificiel dans ces cas là.
Exemple de cas sans scroll: bas de liste d'articles (ex: non lus), avec des articles plus petits que la taille verticale de la fenêtre, il n'y a pas de matière pour scroller plus haut.
Dans la vue pour modifier les flux, les URLs du site et du flux RSS ne
sont plus des liens et peuvent être plus facilement copié-collé
Les liens cliquables sont représentés par une icône à coté
Les raccourcis page suivante et précédente n'avait plus lieu d'être avec
le mode endless
Petite correction du design pour les formulaire : les labels (float left)
dépassaient des form-group
1) Lors de la navigation clavier, si le chargement automatique en bas de page est activé, il ne faut pas manuellement charger les nouveaux articles, sinon il y a des doublons.
2) Il faut d'abord changer d'article avant d'en charger des nouveaux.
Vite fait, et vite testé, mais semble marcher et corriger les bugs de doublons que je constatais en navigation clavier (les articles non-lus que je venais de lire se rechargeaient une 2ème fois).
En particulier en affichage mobile, il n'était pas facile de voir quelle
catégorie ou flux on était en train de lire. Ce patch l'affiche sur la
ligne du jours, avec une suggestion de style.
Paging now works even when many entries have the same date.
SQL speed could probably be improved by testing first on date, and then
on CONCAT.
Also, having an index on date would probably help too.
In the current SQL request with LIMIT, if many dates are identical, the
pagination may not work properly. Added a little more tolerance, but
will have to be solved better.
- jQuery updated from version 1.5.2 to 1.10.2 (checked that it is ok
with jQuery Migrate Plugin)
- Put hide_posts() first to avoid flashing content during load
- Big speed optimisation of init_img()
- Use a single on() delegated event (jQuery 1.7+) instead of all
per-article click events as described on http://api.jquery.com/on/
- Moved all the per-article click events to an outside function
init_stream_delegates() that is called only once even when new articles
are dynamically added. Much lighter approach, and does not require
unbinding events and rebinding them at each dynamic load.
- Side effect: corrected the bug of favourites and read/unread that were
not properly unbound during dynamic loading.
- Corrected a JavaScript error for auto_load_more when #load_more is not
visible and therefore does not have a position() defined.
This patch is to make search work again after the new SQL optimisations,
by removing some of the optimisations when searching is used.
Optimisation of search is left for some future work.
The whole base is indeed transfered from MySQL to PHP, which is not
good.
Big effect (on speed and memory), but few changes :-)
Drastically reduced the number of SQL requests needed (from 233 down to
8 to load the home page with my own data set = 140 feeds in 15
categories).
Drastically reduced the amount of data transferred from MySQL to PHP.
Provide better access to the link of the article, and allow
control-click on the title to e.g. open in a background tab, without
having to reach the little link icon on the far right.
Use the faster str_replace() and str_ireplace() instead.
From http://www.php.net/manual/function.str-replace.php : "If you don't
need fancy replacing rules (like regular expressions), you should always
use this function instead of preg_replace(). "
The content seem to be already HTML safe, e.g. for some feeds in UTF-8
with HTML special characters encoded, for some other feeds with all
eligible characters HTML-encoded
La barre contenant le lien connexion/déconnexion est supprimée (sauf en
vue mobile)
Le lien connexion se trouve à la place de la roue des paramètres
Le lien déconnexion se trouve dans la liste des actions en cliquant sur
la roue des paramètres
*** ATTENTION, MODIFICATION DE LA BDD ***
Cette option permet de garder les vieux articles d'un flux en même s'ils
sont plus vieux que la limite des X mois d'historique (3 par défaut)
Les modifications de la base de données :
- ajout du champ "keep_history int(1) DEFAULT 0" à la table feed
- suppression des champs "is_public" et "lastUpdate" de la table entry
(n'étaient plus utilisés de toute façon)
Désormais, en cliquant sur une catégorie ou un flux, une "popup" s'ouvre
nous proposant les flux à lire directement. Les mêmes actions que la vue
normale sont alors possibles
Cela a impliqué de gros changements javascript en aval puisque les
articles n'étaient plus repérés en fonction de la fenêtre, mais en
fonction du popup (#panel)
Le code va vraiment devoir être repris pour avoir une architecture
logique (voir issue #121)
+ Début fix issue #130 : en cliquant sur une catégorie ou un flux, on
repasse en mode de vue "normale" pour pouvoir lire les articles
Ce n'est qu'un début :)
Ajout du système de token pour accéder aux flux RSS même quand la
connexion a été paramétrée.
Pour l'utiliser, il faut simplement ajouter le paramètre
?token=<votre_token> à l'url
Le token permettra d'accéder aux flux RSS cachés derrière une
authentification
L'option load more permettra de ne pas charger automatiquement les
articles suivants une fois arrivé en bas de la page