{"action":"created","issue":{"url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/357","repository_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop","labels_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/357/comments","events_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/357/events","html_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/357","id":336820770,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MTg0OTUx","number":357,"title":"WIP: Refactor files (do not merge)","user":{"login":"lostfictions","id":567041,"node_id":"MDQ6VXNlcjU2NzA0MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/567041?v=4","gravatar_id":"","url":"https://api.github.com/users/lostfictions","html_url":"https://github.com/lostfictions","followers_url":"https://api.github.com/users/lostfictions/followers","following_url":"https://api.github.com/users/lostfictions/following{/other_user}","gists_url":"https://api.github.com/users/lostfictions/gists{/gist_id}","starred_url":"https://api.github.com/users/lostfictions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostfictions/subscriptions","organizations_url":"https://api.github.com/users/lostfictions/orgs","repos_url":"https://api.github.com/users/lostfictions/repos","events_url":"https://api.github.com/users/lostfictions/events{/privacy}","received_events_url":"https://api.github.com/users/lostfictions/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-06-29T00:10:51Z","updated_at":"2018-07-04T17:13:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/pulls/357","html_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/357","diff_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/357.diff","patch_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/357.patch"},"body":"#### Relevant info and issue/PR links \r\n\r\nSorry for this massive PR :(  Midway through implementing drag-and-drop in the files pane, I was hitting a couple of snags trying to wrap the necessary components and introduce new ones, so I thought I'd try to clean stuff up a bit -- which ended up rippling all the way up to the main view.\r\n\r\nThis PR is based on a branch where I was implementing the drag & drop stuff, but I've branched it off again and reverted the changes specific to drag-and-drop so that this can be reviewed on its own. (Wasn't expecting the refactor to balloon to be bigger than the original task.)\r\n\r\n---\r\n\r\n`InlineFiles` still needs to be updated to reflect one of the component changes, but other stuff should generally work -- but this PR should still be considered WIP.\r\n\r\nThe refactor tries to reduce incidental state as much as possible, introducing new components as much as makes sense, and (relatedly) trying to minimize antipatterns (like stashing opaque references to non-primitive data in the DOM via `data-` attributes). The `Files` view has gone from ~600LOC to ~230 (including some added comments.)\r\n\r\nSome components are a bit more opinionated (\"baking in\" their functionality, especially if it relates to eg. operations on Icebear models, rather than passing it down through a complex hierarchy.) I think this is probably more maintainable and less brittle overall, but I'm definitely amenable to changing things around again if it doesn't make sense.\r\n \r\n#### Testing instructions  \r\n\r\nI tried to work carefully, but most files-related functionality will probably require thorough retesting. Pretty much everything in the Files pane should be looked over, including menus, modals, etc. There's a possibility some styles got broken by accident, so an eye should be kept out for that if possible.\r\n\r\nOnce I've amended the inline files component, that'll need to be looked over for regressions too.\r\n\r\n----\r\n### Repository owner\r\n\r\n- [ ] Was tested and can be merged.\r\n- [ ] PR name follows conventional changelog format.\r\n\r\n[PR guideline](https://github.com/PeerioTechnologies/peerio-icebear/blob/dev/docs/CONTRIBUTING.md)\r\n"},"comment":{"url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/comments/402529006","html_url":"https://github.com/PeerioTechnologies/peerio-desktop/pull/357#issuecomment-402529006","issue_url":"https://api.github.com/repos/PeerioTechnologies/peerio-desktop/issues/357","id":402529006,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjUyOTAwNg==","user":{"login":"lostfictions","id":567041,"node_id":"MDQ6VXNlcjU2NzA0MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/567041?v=4","gravatar_id":"","url":"https://api.github.com/users/lostfictions","html_url":"https://github.com/lostfictions","followers_url":"https://api.github.com/users/lostfictions/followers","following_url":"https://api.github.com/users/lostfictions/following{/other_user}","gists_url":"https://api.github.com/users/lostfictions/gists{/gist_id}","starred_url":"https://api.github.com/users/lostfictions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostfictions/subscriptions","organizations_url":"https://api.github.com/users/lostfictions/orgs","repos_url":"https://api.github.com/users/lostfictions/repos","events_url":"https://api.github.com/users/lostfictions/events{/privacy}","received_events_url":"https://api.github.com/users/lostfictions/received_events","type":"User","site_admin":false},"created_at":"2018-07-04T17:13:00Z","updated_at":"2018-07-04T17:13:00Z","author_association":"CONTRIBUTOR","body":"@suprko did you get a chance to try the branch to make sure any recent changes you've made to the files view are reflected in there? i had to reapply most of those changes by hand, one by one, without seeing what they do, so i could've easily messed up..."}}
{"actor":{"display_login":"lostfictions"}}