{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/109","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/109/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/109/events","html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/109","id":146174165,"number":109,"title":"Add-folder feature & refactoring","user":{"login":"sminnee","id":59968,"avatar_url":"https://avatars.githubusercontent.com/u/59968?v=3","gravatar_id":"","url":"https://api.github.com/users/sminnee","html_url":"https://github.com/sminnee","followers_url":"https://api.github.com/users/sminnee/followers","following_url":"https://api.github.com/users/sminnee/following{/other_user}","gists_url":"https://api.github.com/users/sminnee/gists{/gist_id}","starred_url":"https://api.github.com/users/sminnee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sminnee/subscriptions","organizations_url":"https://api.github.com/users/sminnee/orgs","repos_url":"https://api.github.com/users/sminnee/repos","events_url":"https://api.github.com/users/sminnee/events{/privacy}","received_events_url":"https://api.github.com/users/sminnee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-04-06T03:14:30Z","updated_at":"2016-04-08T01:43:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/109","html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/109","diff_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/109.diff","patch_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/109.patch"},"body":"This refactoring incorporates a number of changes\r\n\r\n - FileBackend is no longer used. Connection to the backend is via a\r\n   number of API callback props, each of which expects a function that\r\n   returns a promise.\r\n - AssetAdmin has a clearer set of responsibilities: tie together\r\n   Editor & Gallery, and manage interaction with URLs.\r\n - The Gallery & Editor controls are more isolated from the each other\r\n   and the running context. A visible prop on each one controls\r\n   whether or not it is shown, coupled with show() and hide() actions\r\n - As part of this, Editor now has its own actions & reducers.\r\n - Editor and Gallery are regular React.Components\r\n - Editor and Gallery are connected to each other by onEvent()\r\n   methods, that are set by AssetAdmin.\r\n\r\nThis is still a work in progress and I know of the following \r\nbugs:\r\n\r\n - Direct loading a URL of admin/assets/show/0/edit/73 doesn’t work.\r\n   It needs to pre-fetch the folder contents before loading the\r\n   editor, which is probably a job for AssetAdmin to coordinate.\r\n - Search seems to be broken; I don’t know if it previously worked.\r\n - Staggered loading is broken; I don’t believe it previously worked.\r\n\r\nThere are also aspects of the refactoring that I’m not entirely happy\r\nwith:\r\n\r\n - The triggering of the ajax-reload of a folder is a bit messy, with\r\n   folderID and loadedFolderID.\r\n - The components still pull from global state in mapStateToProps().\r\n   It’s not clear to me if this code should be part of the component\r\n   or part of the wiring-together that AssetAdmin does."},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/comments/207165222","html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/109#issuecomment-207165222","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/109","id":207165222,"user":{"login":"chillu","id":111025,"avatar_url":"https://avatars.githubusercontent.com/u/111025?v=3","gravatar_id":"","url":"https://api.github.com/users/chillu","html_url":"https://github.com/chillu","followers_url":"https://api.github.com/users/chillu/followers","following_url":"https://api.github.com/users/chillu/following{/other_user}","gists_url":"https://api.github.com/users/chillu/gists{/gist_id}","starred_url":"https://api.github.com/users/chillu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chillu/subscriptions","organizations_url":"https://api.github.com/users/chillu/orgs","repos_url":"https://api.github.com/users/chillu/repos","events_url":"https://api.github.com/users/chillu/events{/privacy}","received_events_url":"https://api.github.com/users/chillu/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T01:43:46Z","updated_at":"2016-04-08T01:43:46Z","body":"Sweet, merged! BTW, some places in the old `admin/assets` seem to be hardcoded to that base path - for example, navigating up to the parent folder switches from `admin/assets-old` to `admin/assets`. Regression tested other features like upload, create folder, file editing and deletion in both the old and new UIs, and in general it works."}}