{"action":"created","issue":{"url":"https://api.github.com/repos/freedombox/Plinth/issues/221","repository_url":"https://api.github.com/repos/freedombox/Plinth","labels_url":"https://api.github.com/repos/freedombox/Plinth/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/freedombox/Plinth/issues/221/comments","events_url":"https://api.github.com/repos/freedombox/Plinth/issues/221/events","html_url":"https://github.com/freedombox/Plinth/issues/221","id":105404121,"number":221,"title":"Flatten the URL heirarchy by removing /app and /system","user":{"login":"SunilMohanAdapa","id":1535496,"avatar_url":"https://avatars.githubusercontent.com/u/1535496?v=3","gravatar_id":"","url":"https://api.github.com/users/SunilMohanAdapa","html_url":"https://github.com/SunilMohanAdapa","followers_url":"https://api.github.com/users/SunilMohanAdapa/followers","following_url":"https://api.github.com/users/SunilMohanAdapa/following{/other_user}","gists_url":"https://api.github.com/users/SunilMohanAdapa/gists{/gist_id}","starred_url":"https://api.github.com/users/SunilMohanAdapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunilMohanAdapa/subscriptions","organizations_url":"https://api.github.com/users/SunilMohanAdapa/orgs","repos_url":"https://api.github.com/users/SunilMohanAdapa/repos","events_url":"https://api.github.com/users/SunilMohanAdapa/events{/privacy}","received_events_url":"https://api.github.com/users/SunilMohanAdapa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/freedombox/Plinth/labels/beginner","name":"beginner","color":"0052cc"},{"url":"https://api.github.com/repos/freedombox/Plinth/labels/cleanup","name":"cleanup","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-09-08T15:18:50Z","updated_at":"2016-07-23T13:06:03Z","closed_at":null,"body":"- This hierarchy was necessary when we had a higher level menu with \"Applications\" \"System\" etc. items in it.  The URL hierarchy was used to figure out which menu item to highlight.  With the new user interface, this menu is not present.\r\n\r\n- Now there are only /app and /system hierarchies and not more.  We had more earlier.  There is not much chance for clashes.\r\n\r\n- Each module's name has to be unqiue and must be used in the URL following current conventions.  This makes sure that an app URL will never clash with a system URL."},"comment":{"url":"https://api.github.com/repos/freedombox/Plinth/issues/comments/234717243","html_url":"https://github.com/freedombox/Plinth/issues/221#issuecomment-234717243","issue_url":"https://api.github.com/repos/freedombox/Plinth/issues/221","id":234717243,"user":{"login":"nikhilrayaprolu","id":15216503,"avatar_url":"https://avatars.githubusercontent.com/u/15216503?v=3","gravatar_id":"","url":"https://api.github.com/users/nikhilrayaprolu","html_url":"https://github.com/nikhilrayaprolu","followers_url":"https://api.github.com/users/nikhilrayaprolu/followers","following_url":"https://api.github.com/users/nikhilrayaprolu/following{/other_user}","gists_url":"https://api.github.com/users/nikhilrayaprolu/gists{/gist_id}","starred_url":"https://api.github.com/users/nikhilrayaprolu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikhilrayaprolu/subscriptions","organizations_url":"https://api.github.com/users/nikhilrayaprolu/orgs","repos_url":"https://api.github.com/users/nikhilrayaprolu/repos","events_url":"https://api.github.com/users/nikhilrayaprolu/events{/privacy}","received_events_url":"https://api.github.com/users/nikhilrayaprolu/received_events","type":"User","site_admin":false},"created_at":"2016-07-23T13:06:03Z","updated_at":"2016-07-23T13:06:03Z","body":"```\r\n def active_item(self, request):\r\n        \"\"\"Return the first active item (e.g. submenu) that is found.\"\"\"\r\n        for item in self.items:\r\n            if request.path.startswith(item.url):\r\n                return item\r\n```\r\nhttps://github.com/freedombox/Plinth/blob/master/plinth/menu.py#L82\r\nSo the menu items are grouped at present as system ,help and app at present .and are returned based on the path specified in the url.\r\nif we plan to remove the hierarchy in the url.then we have to find an alternative in retreiving the side menu instead of searching for a specific keyword in the request url path.\r\nI would suggest\r\n1) (i)let the system modules have the url /sys/<module name> and when ever a request come with /sys/* then send the system modules in the sidemenu.\r\n(ii)above condition will be used for help module too.\r\n(iii)An app will be requested directly (instead of /app/<module name> we get <module name>/ and we send the app sidemenu when ever a request come without /sys/* or /help/\r\n\r\n2)instead of searching for a sys,help or app in the url,we search for the module name and then return the menu object having that module name.this can be done by searching the menu objects having this module name as a subitem and return that object.\r\nOr any suggestions?"}}
{"actor":{"display_login":"nikhilrayaprolu"}}