martin
(Martin Brennan)
28 أبريل 2020، 6:47ص
121
كان اليوم منتجًا. تم دمج طلبات السحب (PRs) التالية، وكلها ما عدا الأخيرة متاحة الآن على 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.
ومن المتوقع دمج FIX: Do not save bookmark if close (X) on modal is clicked by martin-brennan · Pull Request #9541 · discourse/discourse · GitHub قريبًا. كما لدي طلب سحب (PR) لتغيير عنوان URL من /bookmarks-with-reminders إلى /bookmarks، وآمل دمج غدًا FIX: Change bookmarks-with-reminders URL back to bookmarks for user activity by martin-brennan · Pull Request #9566 · discourse/discourse · GitHub .
يجب أن يصبح إصلاح “منطق عمود الإشارات المرجعية للمستخدم في الموضوع لم يكن صحيحًا” متاحًا على Meta خلال الساعات القليلة القادمة. في وقت لاحق من هذا الأسبوع، سنقوم بإصدار نسخة تجريبية أخرى لجميع هذه الإصلاحات.
18 إعجابًا