{"action":"created","issue":{"url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/1457","repository_url":"https://api.github.com/repos/Laravel-Backpack/CRUD","labels_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/1457/labels{/name}","comments_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/1457/comments","events_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/1457/events","html_url":"https://github.com/Laravel-Backpack/CRUD/issues/1457","id":332129717,"node_id":"MDU6SXNzdWUzMzIxMjk3MTc=","number":1457,"title":"[Feature Request] Ability to save active filters in local cookie or in URL bar","user":{"login":"jsiebach","id":9845442,"node_id":"MDQ6VXNlcjk4NDU0NDI=","avatar_url":"https://avatars3.githubusercontent.com/u/9845442?v=4","gravatar_id":"","url":"https://api.github.com/users/jsiebach","html_url":"https://github.com/jsiebach","followers_url":"https://api.github.com/users/jsiebach/followers","following_url":"https://api.github.com/users/jsiebach/following{/other_user}","gists_url":"https://api.github.com/users/jsiebach/gists{/gist_id}","starred_url":"https://api.github.com/users/jsiebach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsiebach/subscriptions","organizations_url":"https://api.github.com/users/jsiebach/orgs","repos_url":"https://api.github.com/users/jsiebach/repos","events_url":"https://api.github.com/users/jsiebach/events{/privacy}","received_events_url":"https://api.github.com/users/jsiebach/received_events","type":"User","site_admin":false},"labels":[{"id":837502507,"node_id":"MDU6TGFiZWw4Mzc1MDI1MDc=","url":"https://api.github.com/repos/Laravel-Backpack/CRUD/labels/triage","name":"triage","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-13T19:22:38Z","updated_at":"2018-06-22T07:38:40Z","closed_at":null,"author_association":"NONE","body":"It's frustrating to lose my filters every time I leave and re-enter a CRUD panel.  I am consistently opening my edit screens in a new tab so I don't lose my place.  It would be ideal if we could enable some sort of functionality which stored filtered values in local storage and returned those filters to active when the page was re-opened.  Ideally this could be toggled on the front-end (similar to the \"Save\" button functionality) since it is a per-person preference in my mind.\r\n\r\nThis could also apply to the search bar.\r\n\r\nI also see that in backpack CRUD 3.3, the URL bar can still take filters, but they are not passed into the AJAX url for the datatable.  I can visit for instance:\r\n\r\nmyapp.com/admin/client?status=[2]\r\n\r\nAnd the `select_2_multiple` filter will show as active and properly select status with the ID 2.  However, the AJAX results are not filtered until I fire a change event on the filter by adjusting it.\r\n\r\nAll in all, the lack of saving of filters creates a difficult time navigating larger CRUDS when much editing needs to be done. To sum up my ideas for this:\r\n\r\n1. Automatically save filter parameters in the URL bar to localstorage, and use them in the AJAX call to load the table.\r\n2. Save additional filters to localstorage after they are changed and before making the AJAX call\r\n3. Potentially do the same thing for search queries by using `?q=example` or by saving search queries to local storage as they are typed\r\n4. [Optional] Create a toggleable \"Save Filters\" button in the filter bar which toggles this functionality\r\n5. [Optional] Customize the behavior of this in config files (how long to save, forget filters on logout, allow searches, etc)\r\n\r\nI have looked through the query code and I think it would be possible to do this without editing each filter individually although I am not sure.  I also don't know of any other places in backpack where settings are stored on the front-end, so this might require conversation about the best place to store and manage front-end settings.  I am interested in contributing to this if I can and just wanted to float these ideas out there and see what you all think.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/comments/399351402","html_url":"https://github.com/Laravel-Backpack/CRUD/issues/1457#issuecomment-399351402","issue_url":"https://api.github.com/repos/Laravel-Backpack/CRUD/issues/1457","id":399351402,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTM1MTQwMg==","user":{"login":"tabacitu","id":1032474,"node_id":"MDQ6VXNlcjEwMzI0NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1032474?v=4","gravatar_id":"","url":"https://api.github.com/users/tabacitu","html_url":"https://github.com/tabacitu","followers_url":"https://api.github.com/users/tabacitu/followers","following_url":"https://api.github.com/users/tabacitu/following{/other_user}","gists_url":"https://api.github.com/users/tabacitu/gists{/gist_id}","starred_url":"https://api.github.com/users/tabacitu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabacitu/subscriptions","organizations_url":"https://api.github.com/users/tabacitu/orgs","repos_url":"https://api.github.com/users/tabacitu/repos","events_url":"https://api.github.com/users/tabacitu/events{/privacy}","received_events_url":"https://api.github.com/users/tabacitu/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T07:38:40Z","updated_at":"2018-06-22T07:38:40Z","author_association":"MEMBER","body":"PS2. On your numbers above:\r\n\r\n> 4. [Optional] Create a toggleable \"Save Filters\" button in the filter bar which toggles this functionality\r\n\r\nI don't really like the \"Save Filters\" button, but I can't explain why... I guess it's because I feel it would add UX complexity; it's something that's done _on top_ of something; and I feel a feature like this would better work _as default_, since it's the intuitive way to do stuff;\r\n\r\n> 5. [Optional] Customize the behavior of this in config files (how long to save, forget filters on logout, allow searches, etc)\r\n\r\nI think we'd only need one config option, how long to save the cookie, in minutes. But if we figure out a sensible default, not even that config option is needed, imho :-) Laravel automatically deletes cookies on logout, I believe, so no point in overwriting that behaviour. I don't think anybody expects the filtering to be remembered long-term, only for a few minutes or so. And I think remembering search is a MUST. Otherwise the remembering functionality is counter-intuitive."}}
{"actor":{"display_login":"tabacitu"}}