This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
Andrei Prigorshnev 4d5f5a67c1
FIX: the empty state message was appearing in wrong moments on the user bookmarks stage (#14127)
Steps to reproduce:

1. Go to activity/bookmarks
2. Search for something that isn’t in your bookmarks, so you get no results
3. Navigate away and then click "Bookmarked" on the sidebar or open the user menu and click the View All Bookmarks button on the bottom of the bookmarks tab, and you get the message "You haven't bookmarked anything yet". 

This commit fixes the problem. We have a controller with a query parameter q that contains a search query. And we also have a property searchTerm that is bound to the search box on the page and mirrors the value in q. We were using a value from searchTerm when querying the server, but ember controllers are singletons so the searchTerm value persisted between page visits and leaded to this bug.

To make things work properly, we should be using the value from q everywhere except two places when we copy a value from q to searchTerm and vice versa.
2021-08-24 23:40:08 +04:00
..
app FIX: the empty state message was appearing in wrong moments on the user bookmarks stage (#14127) 2021-08-24 23:40:08 +04:00
config FIX: ember-cli proxy subfolder fix (#12996) 2021-05-10 10:02:33 -07:00
lib DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
public/assets/scripts DEV: Allow plugin tests to run in Ember CLI qunit 2021-06-24 10:13:35 -04:00
tests FEATURE: Make allow_uploaded_avatars accept TL (#14091) 2021-08-24 10:46:28 +03:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
ember-cli-build.js DEV: Add caret_position.js to ember-cli build (#14009) 2021-08-11 16:42:04 +01:00
package.json DEV: Update pretender and fake-xml-http-request (#13937) 2021-08-05 08:23:01 +10:00
testem.js FIX: Use the no-sandbox flag when running Ember CLI tests. (#12951) 2021-05-05 14:02:26 -03:00