media-ui
v11.5.2
Published
UI libraries made by Instructure Inc.
Readme
media-ui
Prerequisites and Installation
You'll need to have Git installed on your system.
We use Lerna to manage inter-package dependencies in this monorepo.
Prerequisites: Node.js v18+, Yarn v1.6.0+ A tested working combination is Node.js v18.20.2 and Yarn v1.22.21.
Installation steps:
- Install Git.
- Install Node) and nvm.
- Install Yarn.
- Clone this repository:
git clone gerrit:media-ui. - Run
cd media-ui - Run
yarn - Run
yarn build
Run yarn run to list the available commands.
Running the documentation app
- Run
yarn start - Open http://localhost:8001 in your browser
Development
- Run
yarn test:watchto run the tests and watch for changes. - Run
yarn testto run all the tests for every package.
Publishing
Jenkins builds and publishes a new rc release every time you merge something to master. (This is the reason why we have many rc releases. See them here )
In order to have a properly versioned release, all you need to do is run yarn bump [<version>|major|minor|patch]. This will create a new commit with updated version for each package and will also generate some new lines to CHANGELOG.md. Once this release commit is merged, Jenkins will do a publish to npm with the new version.
The project follows semver versioning having a major, minor and patch version number. (E.g. for 1.2.3 major is 1, minor is 2 and patch is 3)
yarn bumpThis command will try to come up with the next version based on the commit messages since the last release.yarn bump <version>Sets the given version, for exampleyarn bump 1.2.3will change the version to1.2.3yarn bump majorMajor version should be bumped in case of some breaking changes from the previous interface. Example: 1.2.3 -> 2.0.0yarn bump minorMinor version should be bumped if new features are added, but existing interfaces remain the same. Example: 1.2.3 -> 1.3.0yarn bump patchPatch version increases are used when an issue is fixed, but no new functionality is added. Example: 1.2.3 -> 1.2.4
Once a new version is released, please communicate it in the #studio Slack channel: "We have released a new version of media-ui (x.y.z) with the following changes:" and quote the part of CHANGELOG.md that was generated by the bump.
Linters and Code Formatting
Linters are run as part of the build. If you use the Sublime Text, Atom, or VSCode editors, you can set up the following plugins to catch lint and formatting errors earlier.
- Install the Linter plugin Sublime, Atom. Linting is included in VSCode.
- Install the EditorConfig plugin Sublime, Atom, VSCode
- Install the Eslint plugin Sublime, Atom, VSCode
- Install the Stylelint plugin Sublime, Atom, VSCode
- Run
yarnto install the dependencies - Restart your editor
Commit Guidelines
- Run
yarn committo commit your changes and follow our commit message format. - Please do not include the output of
yarn buildin your commits.
Updating build (repository) dependencies
yarn add <package-name>oryarn upgrade <package-name>.- Commit the result.
Updating individual package dependencies
- Update the relevant
package.jsonfile. Make sure to retain the^semver range. - Run
yarnand commit the result.
Accessibility and Internationalization Requirements
All components should:
- be accessible
- support RTL languages.
- localize all dates, times, numbers and strings (or require localized content passed in via props).
