martin
(Martin Brennan)
Abril 28, 2020, 6:47am
121
Hoje foi um dia produtivo. Os seguintes PRs foram mesclados e, exceto o último, todos já estão ativos no 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.
E o FIX: Do not save bookmark if close (X) on modal is clicked by martin-brennan · Pull Request #9541 · discourse/discourse · GitHub deve ser mesclado em breve. Também tenho um PR aberto para alterar a URL /bookmarks-with-reminders de volta para /bookmarks, com expectativa de mesclá-lo amanhã: FIX: Change bookmarks-with-reminders URL back to bookmarks for user activity by martin-brennan · Pull Request #9566 · discourse/discourse · GitHub .
A correção “A lógica da coluna de marcador de tópico do usuário não estava correta” deverá estar ativa no Meta nas próximas horas. Mais tarde nesta semana, lançaremos outra versão beta com todas essas correções.
18 curtidas