{"id":19041059,"url":"https://github.com/everythingme/plaxien","last_synced_at":"2025-04-23T21:26:16.225Z","repository":{"id":24422267,"uuid":"27823351","full_name":"EverythingMe/plaxien","owner":"EverythingMe","description":"An Android library to create Explain Views for algorithms","archived":false,"fork":false,"pushed_at":"2015-01-21T14:22:44.000Z","size":515,"stargazers_count":142,"open_issues_count":0,"forks_count":12,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-18T06:51:05.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EverythingMe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-10T14:26:42.000Z","updated_at":"2023-08-13T11:33:01.000Z","dependencies_parsed_at":"2022-08-06T02:00:18.409Z","dependency_job_id":null,"html_url":"https://github.com/EverythingMe/plaxien","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/EverythingMe%2Fplaxien","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EverythingMe%2Fplaxien/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EverythingMe%2Fplaxien/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EverythingMe%2Fplaxien/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EverythingMe","download_url":"https://codeload.github.com/EverythingMe/plaxien/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250516319,"owners_count":21443600,"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-08T22:26:52.777Z","updated_at":"2025-04-23T21:26:16.208Z","avatar_url":"https://github.com/EverythingMe.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plaxien\n## Let Your App Explain Itself Beautifully\n\nPlaxien is a small library we use at EverythingMe, that allows us to create \"Explains\" - easy to read representations of in-app data and logic.\n\nBasically it can represent hierarchical data composed of \"nodes\" and \"key/value\" pairs in a nice collapsible tree view. It looks something like this:\n\n![Plaxien Exammple Screenshot](plaxien.png)\n\n## Why did we create Plaxien?\n\nThe idea is simple - you want to be able to peek into your app's internal logic beyond logs.\nIt could be anything - why did a search result return? What's the metadata of the current user? etc.\n\nThat's why in debug builds of our app, we add Explain Views for different parts of our system (Smart Folders, Contextual Insights, App Recommendations, In-phone search, etc).\nOver the years different features in our product had solved this ad-hoc using a number of techniques,\nbut we wanted a simple, unified way to create those views.\n\nPlaxien allows us to quickly create them, export the explain data to the servers, and even create these trees from arbitrary JSON trees.\n\n## Example usage\n\nThe basic idea is that you build a tree of \"Explain Nodes\", that can have sub-nodes, or values - which are nodes with a key and a value.\n\nThen you can either embed an `ExplainView` right in any activity, or launch an activity.\n\n```java\n\n        // First we create the root of the tree\n        Explain.Node node = new Explain.Node(\"Explaining Plaxien\", null);\n\n        // Now we can add sub-nodes.\n        node.addChild(\"Reasons to build it\")\n                // To sub nodes we can add values\n                .addValue(\"Describe our algorithms\", true)\n\n                // Adding a Uri or intent to a value launches them when the value is clicked\n                .addValue(\"Export the explains\", true, \"http://everything.me\");\n\n        // Repeat as much as you want and as deep as you want\n        node.addChild(\"What we use it for\")\n                .addValue(\"Explain search results\", \"Yes!\")\n                .addValue(\"Explain recommendations\", \"Yep\")\n                .addValue(\"Debug context signals\", \"YEAH\");\n\n\n        // This is how you launch the activity shown in the image above\n        ExplainActivity.explain(this, \"My Explain\", node, true);\n\n        // Alternatively - this is how you embed the explain view in an activity\n        ExplainViewFactory f = new ExplainViewFactory(this);\n        someContainerView.addView(f.getSectionView(node));\n\n\n```\n\n\n## Adding Plaxien to your App\n\nIn Android Studio - just clone this project, import it into Android Studio, and add it as a dependency to your app.\n\n\n## Styling\n\nIt is possible to customize and apply your own style theme to the texts.\n\n#### Options\nStyles you can extend:\n* `PlaxienTitle` - the title text style of all nodes and values\n* `PlaxienNodeName` - the node name text style\n* `PlaxienNodeCounter` - the node counter text style\n* `PlaxienValueName` - the value name text style\n* `PlaxienValue` - the value text style\n\n#### Usage\n\n##### 1. Define `\u003cstyle\u003e`\nDefine in your project new `style` for node title and change to other color for example:\n\n``` xml\n\u003cstyle name=\"MyPlaxienTitle\" parent=\"PlaxienTitle\"\u003e\n        \u003citem name=\"android:textColor\"\u003e#2E4172\u003c/item\u003e\n\u003c/style\u003e\n```\n\nDo it for other styles if you want.\n\n##### 2. Apply styles\n\n``` java\n// Create new view style with your super new theme\nExplainViewFactory.ExplainViewStyle viewStyle = new ExplainViewFactory.Builder()\n        .setTitleStyle(R.style.MyPlaxienTitle)\n        .setNodeNameStyle(R.style.MyPlaxienNodeName)\n        .setNodeCounterStyle(R.style.MyPlaxienNodeCounter)\n        .setValueNameStyle(R.style.MyPlaxienValueName)\n        .setValueStyle(R.style.MyPlaxienValue)\n        .build();\n\n// Create view factory as before! just pass the viewStyle\nExplainViewFactory f = new ExplainViewFactory(this, viewStyle);\n\n```\n\n##### Theme example\n\u003cimg src=\"plaxien_theme.png\" width=\"400\"/\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverythingme%2Fplaxien","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feverythingme%2Fplaxien","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverythingme%2Fplaxien/lists"}