{"id":19175399,"url":"https://github.com/clecap/treeandmenung","last_synced_at":"2025-02-23T00:45:58.988Z","repository":{"id":81103975,"uuid":"492311910","full_name":"clecap/TreeAndMenuNG","owner":"clecap","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-15T09:27:41.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-04T01:54:21.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clecap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-14T19:51:58.000Z","updated_at":"2022-05-14T19:58:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"779dda1e-5c75-4b62-98f9-2c5e4696d524","html_url":"https://github.com/clecap/TreeAndMenuNG","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clecap%2FTreeAndMenuNG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clecap%2FTreeAndMenuNG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clecap%2FTreeAndMenuNG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clecap%2FTreeAndMenuNG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clecap","download_url":"https://codeload.github.com/clecap/TreeAndMenuNG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254181,"owners_count":19772386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T10:23:03.724Z","updated_at":"2025-02-23T00:45:58.962Z","avatar_url":"https://github.com/clecap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TreeAndMenuNG\n\nTreeAndMenuNG is an extension offering tree and menu functionalities, especially for usage in sidebar and UI aspects, adapted to needs of the dantewiki project.\n\n## Additional Features\n\n* Display the specific dantewiki name as part of the personal portlet.\n* Provide a category tree together with a tree-based editor.\n* Category links in the category tree open in a seperate window on the left of the screen.\n\n\n## Special Sidebar Areas\n\nThe structure of the sidebar is described by MediaWiki:Sidebar.\nThree special keywords may be used:\n* startus\n* catus\n* socialus\n\n### Startus\n\nStartus is a general tree-like area and can provide further tree-like structure for the site.\n\nThe tree-like structure is modified by editing MediaWiki:SidebarTree.\n\n### Catus\n\nCatus provides a category tree, which displays ...........all cats which are ........................\n\n* Click on a category link opens a category inspector, i.e. a seperate page describing the category and allowing some additional navigation, preferably in the category namespace, while editing the page.\n* The checkboxes can be clicked while viewing a page, which leads to a recategorization of the page.\n* The tree shows the categoriey applied to the current page\n* The tree opens automagically whenever categories of a displayed page are deeper down in the category structure.\n \n\n### Socialus  \n\n\n\n\n\n\n## TODO Patches:\n\n* Hilite a category in the tree if below that category there is a marking, hidden inside of the collapsed tree.\n\n\n## Category Editor Functionality ##\n\nWe have a category tree showing sub categories of category root\n  TODO: make more flexible, not necessariy root bur rather \"sidebar\"\nThe categories of a page are ticked.\n\nWhen viewing pages: Changing the checkboxes is disabled.\n\nWhen editing a page: Changing them is enabled\nWhen saving a page:  We have to check which of them are clicked\n  PROBLEM: How do we solve a discrepancy between 1) text in the wiki page using category links and 2) settings in the tree?\n  PROBLEM: How do we ensure that category links are at the end of a wiki page text and not somewhere in the middle?\n\n\n\n\n## Patches and Changes Done\n\n* Adapt to the new mediawiki extension loading mechanism.\n* Streamlined and compressed the code layout in some places.\n* Removed unnecessary animation, which only serves as eye candy and does not convey essential UI information.\n* Combined several extension functions into one.\n* Reduced flicker while loading.\n* Some resource bundles were renamed in MW 1.35 and thus not found. Adjusted them in extension.json ext.fanccytree\n\n\n\n\n## Features ##\n\n### Link Modification Features ###\n\nA link which is descendant of a \u003cspan\u003e with class\n* \"removeTargetClass\" has its target removed\n* \"blankTargetClass\"  opens in target _blank\n\n* \"showReferrer\" is explicitely allowed to show referrers\n\nThis allows us to define the opening mode in the sidebar tree menus.\n\nLinks with target _blank are dotted red, not underlined.\n\n\n### Main / Side hide feature ###\nIf we add to the URL a specode=side to the URL then we only get the sidebar\nIf we add specode=main then we only get the main contents\n\n## Why a multi functional extension ? ##\n\nA multi functional extension is counter the design principle of separation of concerns. However,\n* a larger number of independent extensions is not practical since they are not on a common maintenance standard and with\na change in an interface of the core functions all would have to be maintained individually\n\n\n## Installation\n\n* The extension must not be placed into directory `./extensions`  but into the sibling directory `./myExtensions`. \n* The extension must not be renamed.\n* The specific restrictions are a consequence of the way the mediawiki ressource loader is written and documented, neither of which I am responsible for.\n\n\n## History\n\nTreeAndMenuNG is a new generation version of the TreeAndMenu mediawiki extension available at https://www.mediawiki.org/wiki/Extension:TreeAndMenu and https://gitlab.com/organicdesign/TreeAndMenu/\nYears ago I started to hack the original extension a bit without properly documenting my changes. Then somehow the original was updated and my branch made it difficult for me to keep up with it. \n\n\n## Roadmap and Todos\n\n* The load of the dynamic elements of the sidebar is getting quite heavy. Thus, we would like to consider a cache architecture.\n* The sidebar currently is generated in many aspects on the fly and in the client. 1) The categories of a page are marked in the client via JS. 2) The sidebar itself is built in the client in JS. 3) The tree opening is persisted in the client (which is ok)\n  but this is implemented in the client. To prevent to much flickering, we switch the sidebar to hidden, build the sidebar in the client and then show it. As a result, the sidebar is faulted in, after the main page already is displayed. This is unfortunate.\n  We might eventually move on to a better sidebar architecture, reducing the load, doing more caching in the sidebar and displaying it at the same time as the main page is displayed.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclecap%2Ftreeandmenung","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclecap%2Ftreeandmenung","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclecap%2Ftreeandmenung/lists"}