martin
(Martin Brennan)
Avril 28, 2020, 6:47
121
C’était une journée productive. Les PR suivantes ont été fusionnées, et toutes, sauf la dernière, sont désormais en ligne sur Meta :
master ← jjaffeux:no-bookmark
merged 01:19AM - 28 Apr 20 UTC
master ← jjaffeux:stop-shortcut-propagation
merged 12:33AM - 28 Apr 20 UTC
This commit reworks slightly the `toggleBookmark` and `toggleBookmarkTopic` func… tions.
The following cases have been identified:
- Pressing [f] (toggleBookmarkTopic)
- a topic list item is selected, we attempt to toggle the related topic
- a post is selected, we bookmark the associated topic
- nothing is selected, if there's a currentTopic we bookmark it
- Pressing [b] (toggleBookmark)
- a post is selected, we bookmark it
- a topic list item is selected, we attempt to toggle the related topic
- nothing is selected, if there's a currentTopic we bookmark it
Note this, commit also reduces jquery usage, a bug where the [f] shortcut was propagated to the modal input, and attempts to fix a bug when bookmarking a topic list item on the front page and the firstPost couldn't be found, current repro before fix:
- navigate to /
- press [j] to select a topic list item
- press [f]
- `Uncaught TypeError: Cannot read property 'post_number' of undefined` error appears in console, the topic is not bookmarked
master ← issue/fix-topic-user-bookmarked-column-logic
merged 06:19AM - 28 Apr 20 UTC
Make sure the topic_user.bookmarked column is set correctly when user bookmarks/… unbookmarks any post in a topic. For example, you bookmarked a post in the topic that was not the OP, the bookmark icon in the topic list would not be shown. Same if deleting a bookmark for the last bookmarked post in a topic, the bookmark icon in the topic list would not be removed.

* Previously this was only setting it to true if bookmarking the OP/topic, which was not correct -- we want to show the icon on the topic list if any post is bookmarked.
* Also set to false if unbookmarking the last bookmarked post in the topic.
Also in this PR is a migration to correct any out of sync `topic_user.bookmarked` columns, based on the new logic.
Et FIX: Do not save bookmark if close (X) on modal is clicked by martin-brennan · Pull Request #9541 · discourse/discourse · GitHub devrait être fusionnée sous peu. J’ai également soumis une PR pour revenir de l’URL /bookmarks-with-reminders à /bookmarks, en espérant la fusionner demain : FIX: Change bookmarks-with-reminders URL back to bookmarks for user activity by martin-brennan · Pull Request #9566 · discourse/discourse · GitHub .
La correction « La logique de la colonne « Marque-page utilisateur du sujet » n’était pas correcte » devrait être en ligne sur Meta dans les prochaines heures. Plus tard cette semaine, nous publierons une autre version bêta pour toutes ces corrections.
18 « J'aime »