{"id":30626896,"url":"https://github.com/wikimedia/oojs-ui","last_synced_at":"2025-08-30T19:04:00.011Z","repository":{"id":11698531,"uuid":"14212481","full_name":"wikimedia/oojs-ui","owner":"wikimedia","description":"OOUI is a modern JavaScript UI library with strong cross-browser support. It is the standard library for MediaWiki and Wikipedia. This is a mirror from https://gerrit.wikimedia.org. Main website:","archived":false,"fork":false,"pushed_at":"2025-08-28T12:20:04.000Z","size":17596,"stargazers_count":68,"open_issues_count":0,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-28T19:42:31.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.mediawiki.org/wiki/OOUI","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wikimedia.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-11-07T18:45:25.000Z","updated_at":"2025-08-28T12:20:07.000Z","dependencies_parsed_at":"2023-12-28T13:32:26.845Z","dependency_job_id":"44892141-a31a-41c6-8e15-15c34d2a1eb6","html_url":"https://github.com/wikimedia/oojs-ui","commit_stats":{"total_commits":5277,"total_committers":105,"mean_commits":50.25714285714286,"dds":0.8180784536668562,"last_synced_commit":"f32415191f74c743b74ceae41368e7ed1390d3d3"},"previous_names":[],"tags_count":239,"template":false,"template_full_name":null,"purl":"pkg:github/wikimedia/oojs-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Foojs-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Foojs-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Foojs-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Foojs-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wikimedia","download_url":"https://codeload.github.com/wikimedia/oojs-ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Foojs-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272892512,"owners_count":25010795,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-30T19:02:43.854Z","updated_at":"2025-08-30T19:03:59.998Z","avatar_url":"https://github.com/wikimedia.png","language":"JavaScript","readme":"OOUI\n=================\n\nOOUI is a component-based JavaScript UI library. Key features:\n\n* Common widgets, layouts, and dialogs\n* Classes, elements, and mixins to create custom interfaces\n* Internationalization and localization, like right-to-left (RTL) languages support\n* Theme-ability\n* Built-in icons\n* Accessibility features\n\nIt was the standard library for Web products at the Wikimedia Foundation, having been originally created for use by [VisualEditor](https://www.mediawiki.org/wiki/VisualEditor). It is now in maintenance mode, and we strongly recommend all new code instead be written using [Codex](https://doc.wikimedia.org/codex/latest/).\n\nQuick start\n----------\n\nThe library is available on [npm](https://www.npmjs.com/package/oojs-ui). To install:\n\n```bash\n$ npm install oojs-ui\n```\n\nOnce installed, include the following scripts and styles to get started:\n\n```html\n\u003cscript src=\"node_modules/jquery/dist/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"node_modules/oojs/dist/oojs.min.js\"\u003e\u003c/script\u003e\n\n\u003cscript src=\"node_modules/oojs-ui/dist/oojs-ui.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"node_modules/oojs-ui/dist/oojs-ui-wikimediaui.min.js\"\u003e\u003c/script\u003e\n\u003clink rel=\"stylesheet\" href=\"node_modules/oojs-ui/dist/oojs-ui-wikimediaui.min.css\"\u003e\n```\n\n\nLoading the library\n-------------------\n\nWhile the distribution directory is chock-full of files, you will normally load only the following three:\n\n* `oojs-ui.js`, containing the full library;\n* One of `oojs-ui-wikimediaui.css` or `oojs-ui-apex.css`, containing theme-specific styles; and\n* One of `oojs-ui-wikimediaui.js` or  `oojs-ui-apex.js`, containing theme-specific code\n\nYou can load additional icon packs from files named `oojs-ui-wikimediaui-icons-*.css` or `oojs-ui-apex-icons-*.css`.\n\nThe remaining files make it possible to load only parts of the whole library.\n\nFurthermore, every CSS file has a right-to-left (RTL) version available, to be used on pages using right-to-left languages if your environment doesn't automatically flip them as needed.\n\n\nIssue tracker\n-------------\n\nFound a bug or missing feature? Please report it in our [issue tracker Phabricator](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=PHID-PROJ-dgmoevjqeqlerleqzzx5)!\n\n\nContributing\n------------\n\nWe are always delighted when people contribute patches. To setup your development environment:\n\n\n1. Clone the repo: `$ git clone https://gerrit.wikimedia.org/r/oojs/ui oojs-ui`\n\n2. Move into the library directory:\u003cbr\u003e`$ cd oojs-ui`\n\n3. Install [composer](https://getcomposer.org/download/) and make sure running `composer` will execute it (*e.g.* add it to `$PATH` in POSIX environments).\n\n4. Install dev dependencies:\u003cbr\u003e`$ npm install`\n\n5. Build the library (you can alternatively use `grunt quick-build` if you don't need to rebuild the PNGs):\u003cbr\u003e`$ grunt build`\n\n6. You can see a suite of demos in `/demos` by executing:\u003cbr\u003e`$ npm run-script demos`\n\n7. You can also copy the distribution files from the dist directory into your project.\n\n8. You can start a local web server by running `php -S localhost:80` in your root dir.\n\n9. You can navigate to http://localhost/tests/ to run the tests locally in your browser.\n\nWe use [Gerrit](https://gerrit.wikimedia.org/) for code review, and [Phabricator](https://phabricator.wikimedia.org) to track issues. To contribute patches or join discussions all you need is a [developer account](https://wikitech.wikimedia.org/w/index.php?title=Special:CreateAccount\u0026returnto=Help%3AGetting+Started).\n\n* If you've found a bug, or wish to request a feature [raise a ticket on Phabricator](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=PHID-PROJ-dgmoevjqeqlerleqzzx5).\n* To submit your patch, follow [the \"getting started\" quick-guide](https://www.mediawiki.org/wiki/Gerrit/Getting_started). We try to review patches within a week.\n* We automatically lint and style-check changes to JavaScript, PHP, LESS/CSS, Ruby and JSON files. You can test these yourself with `npm test` and `composer test` locally before pushing changes. SVG files should be squashed in advance of committing with [SVGO](https://github.com/svg/svgo) using `svgo --pretty --disable=removeXMLProcInst --disable=cleanupIDs \u003cfilename\u003e`.\n\nA new version of the library is released most weeks on Tuesdays.\n\nCommunity\n---------\n\nGet updates, ask questions and join the discussion with maintainers and contributors:\n\n* Join the Wikimedia Developers mailing list, [wikitech-l](https://lists.wikimedia.org/mailman/listinfo/wikitech-l).\n* Chat with the maintainers on `#wikimedia-dev` on `irc.libera.chat`.\n* Ask questions on [StackOverflow](https://stackoverflow.com/tags/oojs-ui/info).\n* Watchlist the [documentation](https://www.mediawiki.org/wiki/OOUI) on MediaWiki to stay updated.\n\n\nVersioning\n----------\n\nWe use the [Semantic Versioning guidelines](http://semver.org/).\n\nReleases will be numbered in the following format:\n\n`\u003cmajor\u003e.\u003cminor\u003e.\u003cpatch\u003e`\n\n\nRelease\n----------\n\n### Prerequisites\n- [Create an NPM account](https://www.npmjs.com/signup), if you don't have one already\n- Verify that you can [log into your NPM account](https://www.npmjs.com/login)\n- Verify that you are [listed as a maintainer](https://www.npmjs.com/package/oojs-ui/access)\n  of the oojs-ui package. If not, ask an existing maintainer to add you.\n- Make sure that you have two-factor authentication (2FA) set up.\n- Run `npm login` and follow the steps. You should only need to do this once on each computer.\n  If you're not sure if you've already done this, you can run `npm whoami`; if it prints your\n  NPM username, you're already logged in.\n- Clone the mediawiki/vendor repository: https://gerrit.wikimedia.org/r/admin/repos/mediawiki/vendor,general\n\n### Prepare and submit the release commit\nFrom the root of this repository, update master and check out a new `release` branch:\n```bash\n$ git remote update\n$ git checkout -B release -t origin/master\n```\n\nClean-install npm dependencies, update Composer dependencies, and ensure tests pass:\n```bash\n$ npm ci \u0026\u0026 composer update \u0026\u0026 npm test \u0026\u0026 composer test\n```\n\nGenerate a list of commits that are part of this release:\n```bash\n$ git log --format='* %s (%aN)' --no-merges v$(node -e 'console.log(require(\"./package\").version);')...HEAD | grep -v \"Localisation updates from\" | sort\n```\n\nIn History.md, add a new heading for this version and date. Copy the list of commits into the new\nsection and sort into five sub-sections, in order, omitting any sub-section that has no commits:\n```md\n### Breaking changes\n### Deprecations\n### Features\n### Styles\n### Code\n```\n\nGenerate the list of Phabricator tasks for this release. Copy the resulting list and save it for\nlater. In a later step, you will add it to the commit message of the MediaWiki core commit.\n```bash\n$ git log --pretty=format:%b v$(node -e 'console.log(require(\"./package\").version);')...HEAD | grep Bug: | sort | uniq\n```\n\nUpdate the version number (in the following command, change 'patch' to 'minor' if you've made\nbreaking changes):\n```bash\n$ npm version patch --git-tag-version=false\n```\n\nCommit the release and submit to Gerrit. Note that if there is a Phabricator task associated with\nthe release, you should edit the commit to add the bug number before running `git review`.\n```bash\n$ git add -u\n$ git commit -m \"Tag v$(node -e 'console.log(require(\"./package\").version);')\"\n$ git review\n```\n\n### Publish the tag and push to NPM\nAfter the tag commit is merged in this repo, push the tag and publish to NPM:\n```bash\n$ git remote update\n$ git checkout origin/master\n$ git tag \"v$(node -e 'console.log(require(\"./package\").version);')\"\n$ npm run publish-build \u0026\u0026 git push --tags \u0026\u0026 npm publish\n```\n\n### Update the mediawiki/vendor repo\nIn your local mediawiki/vendor repo, point composer to the new version and pull in the updated\nvendor files:\n```bash\n# Replace 1.2.34 with the version number of the new release\n$ composer require oojs/oojs-ui 1.2.34 --no-update\n$ composer update --no-dev\n```\n\nThen commit the changes with the following commit message, replacing 1.2.34 with the new OOUI\nversion number (example: https://gerrit.wikimedia.org/r/c/mediawiki/vendor/+/813629).\n```bash\n$ git add -u\n$ git commit\n```\n\nCommit message format:\n```bash\nUpdate OOUI to v1.2.34\n\n  Release notes: https://gerrit.wikimedia.org/g/oojs/ui/+/v1.2.34/History.md\n```\n\nPush this to gerrit. Take note of the Change-Id in the commit message. Copy it and save it for\nlater. You will need it for the Depends-On: line in the commit message when updating MediaWiki.\n```bash\n$ git review\n# Show the last commit\n$ git show --stat\n```\n\n### Update the MediaWiki core repo\n\nIn your local MediaWiki core repo, open `composer.json` and update the version number of\n`oojs/oojs-ui` to the new version number.\n\nOpen `RELEASE-NOTES-1.NN`. If there is already a list item about OOUI, update the latest version\nnumber. For example, if there is a list item that says \"Updated OOUI from v1.2.0 to v1.2.33\",\nupdate the latter version number fo `v1.2.34`. If there isn't a list item about OOUI yet, add one\nin the `Changed external libraries` section.\n\nOpen `resources/lib/foreign-resources.yaml`. For the OOUI listing, change the `version`, the `purl`,\nand the `src` URL to use the new version number. Compute the new integrity hash:\n\n```bash\n$ php maintenance/run.php manageForeignResources make-sri ooui\n# Or if you're running Docker...\n$ docker compose exec mediawiki php maintenance/run.php manageForeignResources make-sri ooui\n```\n\nThen update the OOUI library files:\n```bash\n$ php maintenance/run.php manageForeignResources update ooui\n# Or if you're running Docker...\n$ docker compose exec mediawiki php maintenance/run.php manageForeignResources update ooui\n```\n\nThen run the following command to update `foreign-resources.cdx.json`:\n```bash\n$ php maintenance/run.php manageForeignResources make-cdx\n# Or if you're running Docker...\n$ docker compose exec mediawiki php maintenance/run.php manageForeignResources make-cdx\n```\n\nThen commit the changes with the following commit message, replacing 1.2.34 with the new OOUI\nversion number:\n```bash\n$ git add -u\n$ git commit\n```\n\nCommit message format, where the list of bugs is the list you generated during the OOUI tag step,\nand Depends-On is set to the Change-Id of the mediawiki/vendor commit:\n```txt\nUpdate OOUI to v1.2.34\n\n  Release notes: https://gerrit.wikimedia.org/g/oojs/ui/+/v1.2.34/History.md\n\nBug: T123456\nBug: T234567\nDepends-On: I12345678901234567890\n```\n\nThen push that commit to gerrit:\n```bash\ngit review\n```\n\n### Update the VisualEditor/VisualEditor repo\nIn your local VisualEditor/VisualEditor repo, run the script to create a commit updating the local\ncopy of OOUI, and push the commit to Gerrit:\n\n```bash\n$ ./bin/update-ooui.sh\n$ git review\n```\n","funding_links":[],"categories":["🤖 AI \u0026 Machine Learning"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Foojs-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwikimedia%2Foojs-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Foojs-ui/lists"}