The local time was not updating between user cards because the computed property was not used correctly.
There's an old saying in Tennessee — I know it's in Texas, probably in Tennessee — that says, fool me once computed properties, shame on — shame on you. Fool me — you can't get fooled again.
This commit reworks slightly the `toggleBookmark` and `toggleBookmarkTopic` functions.
- Pressing [f] (toggleBookmarkTopic)
- a topic list item is selected, we attempt to toggle the related topic
- a post is selected, we bookmark the current 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 fixes bug when bookmarking a topic list item on the front page and the firstPost couldn't be found.
This adds a site setting (default off) to optionally show a user's local time and timezone in their user card. For example, I live in Brisbane, and if at 3:30PM my time I were to open a user who lives in California's card I would see 22:30 (PST).
FEATURE: dismiss first notification on click anywhere
Quicker jumpstart for those already familiar with the platform:
Allow dismissal of first notification mask from any click.
On the dismissal click, we also need to send a "yes I saw it" confirmation
by grabbing a batch of notifications. This prevents the dialog from appearing
again on refresh, or other browsers and ensures we only see it once.
This is a replacement for `decorateCooked` which will work without jquery.
A backwards compatibility layer is provided for existing plugins/themes which are currently using `decorateCooked`
In order to be able to use ember-cli we need to fix the import
statements for `TextField` and `TextArea` in the code base.
The only change I don't fully understand is the one in
`discourse-loader.js`, but adding the components to that file make it
all work.
This means that decorateCooked can be used to modify HTML without triggering the download of remote resources (e.g. images)
In some rare cases (e.g. IntersectionObservers in Chromium), decorating needs to happen in the real DOM. For this, pass `afterAdopt: true` to `decorateCooked`
This reverts commit fa96054acf.
Sadly this fails a test case, we may have to hunt up all the
parentElements to check for the cooked class to perform the
bypass
onSelectionChanged fires a debounced event that calls window.getSelection()
window.getSelection() is reasonably expensive. There is no reason to do any
of this work if we have an input field focused, that is not how quote works
* FEATURE: don't display new/unread notification for muted topics
Currently, even if user mute topic, when a new reply to that topic arrives, the user will get "See 1 new or updated topic" message. After clicking on that link, nothing is visible (because the topic is muted)
To solve that problem, we will send background message to all users who recently muted that topic that update is coming and they can ignore the next message about that topic.