UIO+'s source code is hosted on GitHub. All of the code that is included in a release lives in the main branch. The intention is that the main branch is always in a working state.
UIO+ uses a workflow where contributors fork the project repository, work in a branch created off of main, and submit a Pull Request against the project repo's main branch.
Issues are tracked using GitHub Issues. When creating a new issue, please pick the most appropriate type (e.g. bug, enhancement) and fill out the template with all the necessary information. Issues should be meaningful and describe the task, bug, or feature in a way that can be understood by the community. Opaque or general descriptions should be avoided. If you have a large task that will involve a number of substantial commits, consider breaking it up into subtasks.
Commit logs should follow the Conventional Commits format.
Production-level code needs to be accompanied by a reasonable suite of unit tests. This helps others confirm that the code is working as intended, and allows the community to adopt more agile refactoring techniques while being more confident in our ability to avoid regressions. Please view the Documentation for using jqUnit and the IoC Testing Framework for writing tests.
JavaScript is a highly dynamic and loose language, and many common errors are not picked up until run time. In order to avoid errors and common pitfalls in the language, all code should be regularly checked using the provided lint task. You may also wish to setup linting in your IDE.
npm run lint
After a Pull Request (PR) has been submitted, one or more members of the community will review the contribution. This typically results in a back and forth conversation and modifications to the PR. Merging into the project repo is a manual process and requires at least one Maintainer to sign off on the PR and merge it into the project repo.
When merging a Pull Request, it is recommended to use a Squash Merge. While this does modify commit history, it will enable us to more easily establish a link between code changes and Issues that precipitated them.
Class names can either be used as CSS selectors for styling or an element selector for JavaScript actions. To reduce confusion when styling, modifying HTML, or refactoring code; the same classes must not be used for both. The following outlines the conventions used.
Styling classes must be prefixed with uioPlus-
. Styling classes for components coming from Infusion may be prefixed
with fl-
.
Classes used by JavaScript to locate and manipulate DOM elements must be prefixed with uioPlusJS-
. Classes used by
Infusion components may be prefixed with flc-
- Prepare Code.
- Ensure that all of the code, that should be published, has been merged into the main branch.
- Ensure that the code in main is working as expected.
- Run tests:
npm test
- Lint:
npm run lint
- Manual test build.
- Create a build: "npm run build"
- Load unpacked extension into Chrome.
- In Chrome, go to chrome://extensions
- Ensure that "Developer mode" is enabled.
- Click "Load unpacked".
- From the File Dialog, navigate to the "uio-plus" repo and select the "dist" directory.
- Test all of the preferences and ensure that they apply to web page content correctly.
- Refresh any Browser Tabs/Windows that were open prior to installing the extension.
- The preferences should be tested individually and in combinations to ensure that interactions between the preferences are working properly. For example (Text-to-Speech and Syllabification, Text-to-Speech with Reading Mode).
- Multiple web pages should be tested. However, not all preferences will work with all sites.
- Run tests:
- Increase the "version" number in the manifest file, and push changes to main.
- Create the release package.
- Create a release build:
npm run build
- If making a beta, open the manifest file, located in the newly created dist directory, and add a version name with the beta release number (e.g. “version_name”: “0.1.0 beta 10” ). The version name will be displayed instead of the version number in the Chrome Web Store.
- Create a zip archive of the dist directory.
- Create a release build:
- Publish to the Chrome Web Store.
- Go to the Developer Dashboard on the Chrome Web Store and log in using the fluid team account.
- On the Developer Dashboard, click “Edit”; located on the right-hand side of the UI Options Plus (UIO+) listing.
- On the UI Options Plus (UIO+) edit page, click “upload updated package” and upload the zip created in step 2.2 above.
- Update the “Detailed description” field as necessary. Similar information is contained in this README.
- Update the screenshots if necessary. They will need to be the exact size requested.
- Until a full release is published, we will want to ensure that the “Visibility Options” are set to “Unlisted”. This means that UIO+ will be available for install from the Chrome Web Store, but won't be searchable. It will only be accessible by the direct link: UIO+.
- Click "Preview Changes".
- Verify that everything appears correct. Pay particular attention to anything that was changed, e.g., version number/name, descriptions, screenshots, etc.
- When everything appears correct, publish the changes.
- The actual publishing to the Chrome Web Store will take about an hour.
- Tag the main branch with the release (e.g., v0.1.0-beta.10).
- Create a GitHub release for the tag.
- Go to the uio-plus GitHub page.
- Click on "releases".
- Click "Draft a new release".
- For "Tag Version" and "Release Title", enter the tag name created in step 3.9 (e.g., v0.1.0-beta.10).
- For the description, add a summary of changes and any other relevant information. View prior releases, for example.
- Attach the build zip file created in step 2.2. Before uploading, make sure the file is named "build_{tag}.zip" (e.g., build_v0.1.0-beta.10.zip).
- If this is a beta release, check "This is a pre-release".
- After all the information has been entered correctly, click "Publish release".
- Verify Published UIO+.
- Ensure that the contents of the UIO+ page on the Chrome Web Store appear correct. Double check things like version number/name, descriptions, screenshots, etc.
- Install the version from the Chrome Web Store, and run through the manual testing again. (See: step 1.2.3 above)
- If everything is working, announce release where required (e.g., fluid-work list, project teams, etc.). If there are any issues, fix them and repeat the process.