diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index acd4e76371..454c1e9868 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,12 +1,12 @@ - + When asking general "how to" questions: - Please do not open an issue here! -- Instead, ask for help on [StackOverflow](stackoverflow.com/questions/tagged/materialize) or in our [Gitter](https://gitter.im/Dogfalo/materialize) channel. +- Instead, ask for help on [StackOverflow](stackoverflow.com/questions/tagged/materialize) or in our [Gitter](https://gitter.im/materializecss/materialize) channel. -- Read the [CONTRIBUTING document](https://github.com/Dogfalo/materialize/blob/master/CONTRIBUTING.md) Any issues that are violating the contributing guidelines, will be closed! -- [Search for duplicate or closed issues](https://github.com/Dogfalo/materialize/issues?utf8=%E2%9C%93&q=is%3Aissue) and make sure to go through our [labels](https://github.com/Dogfalo/materialize/labels). +- Read the [CONTRIBUTING document](https://github.com/materializecss/materialize/blob/master/CONTRIBUTING.md) Any issues that are violating the contributing guidelines, will be closed! +- [Search for duplicate or closed issues](https://github.com/materializecss/materialize/issues?utf8=%E2%9C%93&q=is%3Aissue) and make sure to go through our [labels](https://github.com/materializecss/materialize/labels). - Include a [reduced test case](https://css-tricks.com/reduced-test-cases/) in the form of a Codepen when reporting bugs unless it is not applicable, otherwise your issue will be closed. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6632fde4f7..83d3eb8330 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,7 +2,7 @@ ## Screenshots (if appropriate) or codepen: - + ## Types of changes @@ -14,7 +14,7 @@ ## Checklist: -- [ ] I have read the **[CONTRIBUTING document](https://github.com/Dogfalo/materialize/blob/master/CONTRIBUTING.md)**. +- [ ] I have read the **[CONTRIBUTING document](https://github.com/materializecss/materialize/blob/main/CONTRIBUTING.md)**. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..cce4ec0112 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,26 @@ +name: Docs +on: + push: + branches: + - main + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Generate docs + run: | + npm i + npm run docs + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs + exclude_assets: node_modules + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + diff --git a/.github/workflows/lint-commits.yml b/.github/workflows/lint-commits.yml new file mode 100644 index 0000000000..ee53d286b5 --- /dev/null +++ b/.github/workflows/lint-commits.yml @@ -0,0 +1,11 @@ +name: Lint Commit Messages +on: [pull_request] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v3 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000000..24ce52b941 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,27 @@ +name: CI +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Run tests + run: | + npm i + npm run test + + - name: Nightly build + run: | + npm run release + + - uses: actions/upload-artifact@v2 + with: + name: build + path: dist/ diff --git a/.gitignore b/.gitignore index ad179199cb..6aa57eb81c 100644 --- a/.gitignore +++ b/.gitignore @@ -38,13 +38,13 @@ temp/ # Jasmine SpecRunner _SpecRunner.html -# Ignore .html files in root -/*.html -!fab-toolbar-demo.html - # Ignore compiled files css/ghpages-materialize.css bin/ # Ignore lock -yarn.lock \ No newline at end of file +yarn.lock + +# Compiled docs +/docs/*.html +!/docs/fab-toolbar-demo.html diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000000..31354ec138 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 0000000000..5425d9c7ac --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit $1 --color + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6681e0738..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - "6.10" -before_install: - - npm install -g npm@latest - - npm install -g grunt-cli -install: npm ci -git: - depth: 10 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f84fb5d15..92a3534a28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,521 +1,76 @@ -Changelog -======= -Bolded styling surrounded by emojis indicates a breaking change. - -## 1.0.0 (September 9th, 2018) -- [Full Changelog here](https://github.com/Dogfalo/materialize/blob/v1-dev/v1-changelog.md) - -## 1.0.0-rc.2 (June 23rd, 2018) -- Autocomplete - - Fixed bug where Autocomplete did not open properly in certain cases with keyboard focus - -- Carousel - - Fix noWrap option bug - -- Collapsible - - Now correctly removes all event listeners on destroy - -- Materialbox - - Destroy now removed wrapper element added during intialization - -- Pushpin - - Fixed bug on IE11 where class was not removed properly - -- Select - - No longer triggers onchange event when selecting the same option - -- Sidenav - - Destroy now reenables body scrolling if Sidenav was destroyed while it was open - -- Tabs - - Tab indicator no longer displays improperly when a scrollbar is present in the element - - -## 1.0.0-rc.1 (May 1st, 2018) -- Autocomplete - - Added open and close methods - - Fixed bug where Autocomplete would close on click - -- Datepicker - - Added autoClose option - -- Modal - - Fixed issue with focus with nested modals - -- Select - - Removed `active` class on option elements - - Fixed bug where `selected` class was not properly removed on option elements - -- Sidenav - - Destroy method now correctly removes style property - -- Text Input - - Fixed bug where autofill on chrome overlapped text input - -- Toast - - Fixed bug where Toast did not respect inDuration option - -- Tooltip - - Fixed tooltip positioning bug in certain scenarios when html height was less than screen height - - Fixed bug where tooltip stayed open on click - - -## 1.0.0-beta (March 21st, 2018) -- Autocomplete - - Now uses dropdown - -- Carousel - - Added numVisible option - -- Collapsible - - Added keyboard support - -- Dropdown - - Fixed scrolling dropdown bug on touch devices - -- Javascript Initialization - - Added AutoInit function - -- Modals - - Focus now stays within open modal - -- Pickers - - Standardized action buttons to match those on android - - Added support for date and time input types - - **fromnow renamed to fromNow** - -- Select - - Dropdown scrolls to selected option - -- Sidenav - - Now detects vertical scrolling - -- Tabs - - Fixed tab preselection on swipeable tabs - -- TapTarget - - **Reverted name change from FeatureDiscovery** - -- Tooltips - - Added keyboard support - - -## 1.0.0-alpha.4 (February 18th, 2018) -- Badge - - Fixed display issue when used in a table - -- Chips - - Fixed autocomplete initialization - -- CSS - - Added hide and show classes for extra large breakpoint - - Added small buttons - - Fixed input helper text alignment when using prefix - -- Date Picker - - Fixed month and year select overflow issues - - Added additional date formatting options - -- Dropdown - - Added container option - - Dropdown on mobile now correctly selects the right item - - Dropdown now closes correctly on iOS devices - -- Materialbox - - Fixed error with photo caption - - Fixed issues caused by width and height attributes - - Fixed issues caused by max-width and max-height - -- Modal - - Improved support for nested modals - -- Parallax - - Fixed infinite loop bug - -- Select - - *Renamed plugin class to `FormSelect`* - - *Renamed jQuery plugin to `formSelect`* - -- Sidenav - - Fixed issues with draggable option when used with fixed sidenav - -- Time Picker - - Changed i18n options to be more consistent with date picker - - Fixed error with auto close option - - -## 1.0.0-alpha.3 (December 29th, 2017) -- *Initialization code for all components changed. E.g. Change`new M.Tooltip(el, options)` to `M.Tooltip.init(el, options)`* - - This was done so that the same initialization code can be used to initialize single Elements as well as NodeLists and jQuery element objects - -- Added in onOpen and OnClose callbacks for appropriate plugins - -- Datepicker - - Destroy function added - -- Feature Discovery - - Added open and close callbacks - -- Materialbox - - Added open and close callbacks - -- Modal - - Added open and close callbacks for consistency - - Removed ready and complete callbacks - -- Parallax - - Has responsiveThreshold option - - Destroy function added - -- Pushpin - - added onPositionChange callback - -## 1.0.0-alpha.2 (November 30th) -- Chips - - Fixed and standardized chips callback parameters - -- Datepicker - - Fixed date format option - - Scrollbar no longer unecessarily appears when using datepicker - - Fixed bug where using month and year selectors didn't change date - -- Dropdown - - Removed automatic focus highlight on open - -- Textarea - - Fixed error where text was cut off on Firefox - -- Tabs - - Fixed error with pure JavaScript initialization - - Fixed error where a tab with no content would break tabs - -- Timepicker - - Fixed error with twelveHour options - -- Replaced velocity.js with anime.js - -## 1.0.0-alpha.1 (November 10th) -- Dropdown - - rewritten with classes - - Plugin is initialized on `.dropdown-content` instead of `.dropdown-button` - - Renamed classes `.dropdown-button` to `.dropdown-trigger` - - Renamed option `belowOrigin` to `coverTrigger` - - Added callbacks onOpenStart, onOpenEnd, onCloseStart, onCloseEnd - - Removed HTML attribute options - - Removed stopPropagation option - - Reworked animation - -- Select - - rewritten with classes - - Plugin renamed from 'material_select' to 'select' - - The select will no longer copy the class attribute on each