{"action":"created","issue":{"url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/issues/1279","repository_url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid","labels_url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/issues/1279/labels{/name}","comments_url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/issues/1279/comments","events_url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/issues/1279/events","html_url":"https://github.com/AdguardTeam/AdguardForAndroid/issues/1279","id":235500766,"number":1279,"title":"Rework the user filter","user":{"login":"ameshkov","id":5947035,"avatar_url":"https://avatars3.githubusercontent.com/u/5947035?v=3","gravatar_id":"","url":"https://api.github.com/users/ameshkov","html_url":"https://github.com/ameshkov","followers_url":"https://api.github.com/users/ameshkov/followers","following_url":"https://api.github.com/users/ameshkov/following{/other_user}","gists_url":"https://api.github.com/users/ameshkov/gists{/gist_id}","starred_url":"https://api.github.com/users/ameshkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ameshkov/subscriptions","organizations_url":"https://api.github.com/users/ameshkov/orgs","repos_url":"https://api.github.com/users/ameshkov/repos","events_url":"https://api.github.com/users/ameshkov/events{/privacy}","received_events_url":"https://api.github.com/users/ameshkov/received_events","type":"User","site_admin":false},"labels":[{"id":251986222,"url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/labels/UI","name":"UI","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":{"login":"Revertron","id":105154,"avatar_url":"https://avatars1.githubusercontent.com/u/105154?v=3","gravatar_id":"","url":"https://api.github.com/users/Revertron","html_url":"https://github.com/Revertron","followers_url":"https://api.github.com/users/Revertron/followers","following_url":"https://api.github.com/users/Revertron/following{/other_user}","gists_url":"https://api.github.com/users/Revertron/gists{/gist_id}","starred_url":"https://api.github.com/users/Revertron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Revertron/subscriptions","organizations_url":"https://api.github.com/users/Revertron/orgs","repos_url":"https://api.github.com/users/Revertron/repos","events_url":"https://api.github.com/users/Revertron/events{/privacy}","received_events_url":"https://api.github.com/users/Revertron/received_events","type":"User","site_admin":false},"assignees":[{"login":"Revertron","id":105154,"avatar_url":"https://avatars1.githubusercontent.com/u/105154?v=3","gravatar_id":"","url":"https://api.github.com/users/Revertron","html_url":"https://github.com/Revertron","followers_url":"https://api.github.com/users/Revertron/followers","following_url":"https://api.github.com/users/Revertron/following{/other_user}","gists_url":"https://api.github.com/users/Revertron/gists{/gist_id}","starred_url":"https://api.github.com/users/Revertron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Revertron/subscriptions","organizations_url":"https://api.github.com/users/Revertron/orgs","repos_url":"https://api.github.com/users/Revertron/repos","events_url":"https://api.github.com/users/Revertron/events{/privacy}","received_events_url":"https://api.github.com/users/Revertron/received_events","type":"User","site_admin":false},{"login":"vozersky","id":17472907,"avatar_url":"https://avatars2.githubusercontent.com/u/17472907?v=3","gravatar_id":"","url":"https://api.github.com/users/vozersky","html_url":"https://github.com/vozersky","followers_url":"https://api.github.com/users/vozersky/followers","following_url":"https://api.github.com/users/vozersky/following{/other_user}","gists_url":"https://api.github.com/users/vozersky/gists{/gist_id}","starred_url":"https://api.github.com/users/vozersky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vozersky/subscriptions","organizations_url":"https://api.github.com/users/vozersky/orgs","repos_url":"https://api.github.com/users/vozersky/repos","events_url":"https://api.github.com/users/vozersky/events{/privacy}","received_events_url":"https://api.github.com/users/vozersky/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/milestones/13","html_url":"https://github.com/AdguardTeam/AdguardForAndroid/milestone/13","labels_url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/milestones/13/labels","id":2527113,"number":13,"title":"2.9 R2","description":"Patch for version 2.9 (minor bugfixes after the initial release)","creator":{"login":"ameshkov","id":5947035,"avatar_url":"https://avatars3.githubusercontent.com/u/5947035?v=3","gravatar_id":"","url":"https://api.github.com/users/ameshkov","html_url":"https://github.com/ameshkov","followers_url":"https://api.github.com/users/ameshkov/followers","following_url":"https://api.github.com/users/ameshkov/following{/other_user}","gists_url":"https://api.github.com/users/ameshkov/gists{/gist_id}","starred_url":"https://api.github.com/users/ameshkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ameshkov/subscriptions","organizations_url":"https://api.github.com/users/ameshkov/orgs","repos_url":"https://api.github.com/users/ameshkov/repos","events_url":"https://api.github.com/users/ameshkov/events{/privacy}","received_events_url":"https://api.github.com/users/ameshkov/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":41,"state":"open","created_at":"2017-05-17T15:04:20Z","updated_at":"2017-06-30T10:47:56Z","due_on":"2017-05-31T07:00:00Z","closed_at":null},"comments":11,"created_at":"2017-06-13T10:01:04Z","updated_at":"2017-07-03T11:17:23Z","closed_at":"2017-06-27T13:01:29Z","body":"This all started here:\r\nhttps://github.com/AdguardTeam/AdguardForAndroid/issues/1255\r\n\r\nHowever, I am not happy with how it works at the moment, so let's rework it properly.\r\n\r\n### Toolbar menu\r\n\r\n![adguard for android - user filter moqups 2017-06-13 12-48-23](https://user-images.githubusercontent.com/5947035/27076697-a4cb701e-5036-11e7-875e-777cac0ae6b9.png)\r\n\r\n* Add rule -- brings up a \"New Rule\" dialog\r\n* Remove all -- removes all rules from the user filter. **IMPORTANT:** we must show a confirmation dialog before actually doing it.\r\n* Edit filter -- switches user filter to the \"edit mode\" (multiline text edit)\r\n* Import -- brings up the \"Import\" dialog\r\n* Export -- brings up the \"Export\" dialog\r\n\r\n### Empty user filter\r\n\r\nScreenshot:\r\n<details>\r\n\r\n![adguard for android - user filter moqups 2017-06-13 12-47-11](https://user-images.githubusercontent.com/5947035/27076645-7ed032e6-5036-11e7-8ef0-fe3fee587ba6.png)\r\n</details>\r\n\r\n### New Rule dialog\r\n\r\n![adguard for android - user filter moqups 2017-06-13 12-51-21](https://user-images.githubusercontent.com/5947035/27076877-0db38bac-5037-11e7-881e-0f9560abb0d8.png)\r\n\r\n**Important notes:**\r\n\r\n* Use multiline text input (max rows == 3)\r\n* Text input font should be `monospace`\r\n\r\n### User filter rules list view\r\n\r\nScreenshot:\r\n<details>\r\n\r\n![adguard for android - user filter moqups 2017-06-13 12-53-28](https://user-images.githubusercontent.com/5947035/27076971-53f386da-5037-11e7-8523-b12ed18d9e9e.png)\r\n</details>\r\n\r\n**Important notes:**\r\n\r\n* Use monospace font for list view items\r\n* Do not allow word-wrapping\r\n* Depending on the rule text we should use different color for the rules text\r\n\r\nHere are the rules for syntax highlighting:\r\n```\r\n// Depending on the substring we choose class\r\n\t\t\t\t\t\t{regex: /\\!.*/, token: \"comment\"},\r\n\t\t\t\t\t\t{regex: /@@.*/,  token: \"whitelist\"},\r\n\t\t\t\t\t\t{regex: /%%.*/, token: \"js\"},\r\n\t\t\t\t\t\t{regex: /#%#.*/, token: \"js\"},\r\n\t\t\t\t\t\t{regex: /#@%#.*/, token: \"js\"},\r\n\t\t\t\t\t\t{regex: /#\\$#.*/, token: \"css-inject\"},\r\n\t\t\t\t\t\t{regex: /#@\\$#.*/, token: \"css-inject\"},\r\n\t\t\t\t\t\t{regex: /##.*/, token: \"css\"},\r\n\t\t\t\t\t\t{regex: /#@#.*/, token: \"css\"},\r\n\t\t\t\t\t\t{regex: /\\$\\$.*/, token: \"content\"},\r\n\t\t\t\t\t\t{regex: /\\$@\\$.*/, token: \"content\"}\r\n\r\n// Rules colors\r\n.cm-s-default .cm-comment {color: #808080;}\r\n.cm-s-default .cm-whitelist {color: #336666;}\r\n.cm-s-default .cm-css {color: #6699cc;}\r\n.cm-s-default .cm-js {color: #999933;}\r\n.cm-s-default .cm-css-inject {color: #4477aa;}\r\n.cm-s-default .cm-content {color: #a176a2;}\r\n```\r\n\r\n### Edit rule dialog\r\n\r\nTapping on a list item brings up the \"Edit Rule\" dialog:\r\n![adguard for android - user filter moqups 2017-06-13 12-57-02](https://user-images.githubusercontent.com/5947035/27077173-df221d66-5037-11e7-85ae-5c7a7a71fdf1.png)\r\n\r\nIt is almost the same as the \"New Rule\" save for one more option -- \"Delete\".\r\n**IMPORTANT:** there should be a confirmation dialog after the user taps \"delete\".\r\n\r\n### User filter edit mode\r\n\r\nChoosing \"Edit filter\" in the context menu leads a user to the \"user filter edit mode\".\r\n\r\nHere is how it looks like:\r\n<details>\r\n\r\n![adguard for android - user filter moqups 2017-06-13 12-59-06](https://user-images.githubusercontent.com/5947035/27077275-2a9a17e4-5038-11e7-962b-669fb10c81b9.png)\r\n</details>\r\n\r\nBasically, this is just a huge multiline text input with \"monospace\" font and two options in the context menu: `Save` and `Cancel`"},"comment":{"url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/issues/comments/312619513","html_url":"https://github.com/AdguardTeam/AdguardForAndroid/issues/1279#issuecomment-312619513","issue_url":"https://api.github.com/repos/AdguardTeam/AdguardForAndroid/issues/1279","id":312619513,"user":{"login":"vozersky","id":17472907,"avatar_url":"https://avatars2.githubusercontent.com/u/17472907?v=3","gravatar_id":"","url":"https://api.github.com/users/vozersky","html_url":"https://github.com/vozersky","followers_url":"https://api.github.com/users/vozersky/followers","following_url":"https://api.github.com/users/vozersky/following{/other_user}","gists_url":"https://api.github.com/users/vozersky/gists{/gist_id}","starred_url":"https://api.github.com/users/vozersky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vozersky/subscriptions","organizations_url":"https://api.github.com/users/vozersky/orgs","repos_url":"https://api.github.com/users/vozersky/repos","events_url":"https://api.github.com/users/vozersky/events{/privacy}","received_events_url":"https://api.github.com/users/vozersky/received_events","type":"User","site_admin":false},"created_at":"2017-07-03T11:17:23Z","updated_at":"2017-07-03T11:17:23Z","body":"@ilvjyw https://github.com/AdguardTeam/AdguardForAndroid/issues/1312"}}
{"actor":{"display_login":"vozersky"}}