Skip to content

Commit

Permalink
ADAPT-4155: Refactor for TW3 and Presets (#871)
Browse files Browse the repository at this point in the history
* ADAPT-4155: Upgrade to v3 TailwindCSS
* ADAPT-4132: Create TailwindCSS Preset
* ADAPT-000: Misc cleanup and additions

Co-authored-by: Elena <[email protected]>
Co-authored-by: Yvonne Tang <[email protected]>
  • Loading branch information
3 people authored Apr 29, 2022
1 parent b63241f commit ce3c8f9
Show file tree
Hide file tree
Showing 77 changed files with 4,472 additions and 713,013 deletions.
2 changes: 0 additions & 2 deletions .browserslistrc

This file was deleted.

68 changes: 0 additions & 68 deletions .codeclimate.yml

This file was deleted.

7 changes: 2 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{
"endOfLine": "lf",
"semi": true,
"singleQuote": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
Expand All @@ -35,12 +35,9 @@
"func-names": 0,
"semi": [1, "always"] // 1 is for warning
},
"env": {
"jest": true
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"sourceType": "module"
},
"settings": {
"react": {
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/autorelease.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Automatically Create a Release when PR is merged to main with one of the following
# Automatically Create a Release when PR is merged to main with one of the following
# labels: "patch", "minor", "major", "alpha", "beta", "rc".

name: Auto Release

# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow only when merging pull request to the main branch.
pull_request:
Expand All @@ -30,7 +30,7 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'beta') ||
contains(github.event.pull_request.labels.*.name, 'rc')
)
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -39,6 +39,11 @@ jobs:
ref: ${{ github.base_ref }}
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'

# Uses 'npm ci' instead of 'npm install'. See https://docs.npmjs.com/cli/v7/commands/npm-ci
- name: Install dependencies
run: npm ci
Expand All @@ -53,10 +58,10 @@ jobs:
run: |
npm run package
if [ $(git status | grep "dist\/") ]
then
then
git add dist
fi
# Increment version based on label
- name: Patch Release tag
if: ${{ contains( github.event.pull_request.labels.*.name, 'patch') }}
Expand All @@ -65,17 +70,17 @@ jobs:
- name: Minor Release tag
if: ${{ contains( github.event.pull_request.labels.*.name, 'minor') }}
run: npm version minor

- name: Major Release tag
if: ${{ contains( github.event.pull_request.labels.*.name, 'major') }}
run: npm version major

- name: Alpha Release tag
if: ${{ contains( github.event.pull_request.labels.*.name, 'alpha') }}
run: |
npm version prerelease --preid alpha
echo "PRERELEASE=true" >> $GITHUB_ENV
- name: Beta Release tag
if: ${{ contains( github.event.pull_request.labels.*.name, 'beta') }}
run: |
Expand All @@ -88,7 +93,7 @@ jobs:
npm version prerelease --preid rc
echo "PRERELEASE=true" >> $GITHUB_ENV
# Push commits back to origin repo.
# Push commits back to origin repo.
- name: Push Changes
uses: ad-m/github-push-action@master
with:
Expand Down
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ cgi-bin
node_modules
styleguide

# Ignore as they are customized on the user end.
.lando.yml

# Developer studio.
dev/*/test.*
dev/dist
dev/index.html
static/css/*.css

# js files in dist folder
dist/*.js
75 changes: 3 additions & 72 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,74 +74,9 @@ accurate comments, etc.) and any other requirements (such as test coverage).
Linting is preformed on every pull request. Please see STANDARDS.md for more
information on standards, conventions, and best practices.

Follow this process if you'd like your work considered for inclusion in the
project:

## Pull request workflow

1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your
fork, and configure the remotes:

```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/decanter
# Navigate to the newly cloned directory
cd decanter
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/SU-SWS/decanter
```
2. If you cloned a while ago, get the latest changes from upstream:

```bash
git checkout master
git pull upstream master
```
3. Never work directly on `master`. Create a new topic branch (off the latest
version of `master`) to contain your feature, change, or fix:

```bash
git checkout -b <topic-branch-name>
```
4. Commit your changes in logical chunks. Use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
feature to tidy up your commits before making them public.

Be sure to compile the css before submitting.
Be sure to lint the scss before submitting.
5. Locally rebase the upstream development branch into your topic branch:

```bash
git pull --rebase upstream master
```
6. Push your topic branch up to your fork:

```bash
git push origin <topic-branch-name>
```
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description.

**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
license your work under the same license as that used by the project.

### CSS Conventions

CSS conventions are maintained through sass and scss linting. Please run your
work against the linter configuration files in this directory. For your
convenience an NPM/Grunt based sass linter has been packaged in this repository.

To install you must have NPM installed.

Then run:

```bash
npm install
npm run sasslint
```

This should output any errors the linter can find. Please fix those before
submitting a pull request.

## Maintainers

If you have commit access, please follow this process for merging patches and
Expand All @@ -151,18 +86,14 @@ cutting new releases.

1. Check that a PR is within the scope and philosophy of the project.
2. Test the patch locally.
3. Run PR against linter through either Grunt or Code Climate.
3. Run PR against linter
4. Ensure all documentation and commenting is in place.
5. Squash and merge using command line or Github's merge button.

### Releasing a new version

1. Include all new functional changes in the CHANGELOG.
2. Use a dedicated commit to increment the version. The version needs to be
added to the CHANGELOG (inc. date), and `package.json`
3. The commit message must be of `v0.0.0` format.
4. Create an annotated tag for the version: `git tag -m "v0.0.0" 0.0.0`.
5. Push the changes and tags to GitHub: `git push --tags origin master`
1. When merging into the main stream select the correct semver label
2. Let the github actions take care of the rest

### Semver strategy

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ We have removed all assets from the repo in Decanter 7. Instead, we are using re

### Icons
- We have removed FontAwesome (dependency and asset) completely from Decanter v7. For those who would like to continue using FontAwesome, please feel free to do so and include them using methods that are suitable for your own projects.
- In Decanter React, we are using the [react-hero-icon](https://www.npmjs.com/package/react-hero-icon) package to include the needed icons for our components, e.g., the Alert components. [Hero Icons](https://heroicons.com/) are created by the TailwindCSS team and are open source. They can be included as SVG or JSX elements.
- We recommend using the [react-hero-icon](https://www.npmjs.com/package/react-hero-icon) package as [Hero Icons](https://heroicons.com/) are created by the TailwindCSS team and are open source. They can be included as SVG or JSX elements.


## Accessibility
Expand Down
30 changes: 0 additions & 30 deletions dev/README.md

This file was deleted.

Binary file removed dev/assets/img/test-image.jpg
Binary file not shown.
11 changes: 0 additions & 11 deletions dev/src/index.js

This file was deleted.

Loading

0 comments on commit ce3c8f9

Please sign in to comment.