Skip to content

Fix sidenav styles and upgraded to M3 #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 27 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,66 +97,54 @@ We like feature requests but make sure that it can be seen within the goals of t

Good pull requests - patches, improvements, new features - are a fantastic help. Thanks for taking the time to contribute.

**Please ask first** before working on any significant pull request, otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
**Please ask first** and open a new issue before working on any significant pull request, otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.

**Do not edit `materialize.css`, or `materialize.js`
directly!** Those files are automatically generated. You should edit the
source files in [`/materialize/sass/`](https://github.com/materializecss/materialize/tree/main/sass)
and/or [`/materialize/js/`](https://github.com/materializecss/materialize/tree/main/js) instead.
directly!** Those files are automatically generated. You should edit the source files in [`sass`](https://github.com/materializecss/materialize/tree/v2-dev/sass) and [`src`](https://github.com/materializecss/materialize/tree/v2-dev/src) instead.

### Documentation

When contributing to Materialize's documentation, you should edit the documentation source files in
[the `/materialize/pug/page-contents/` directory of the `main` branch](https://github.com/materializecss/materialize/tree/main/pug).
**Do not edit the `gh-pages` branch.** That branch is generated from the documentation source files and is managed separately by the Materialize maintainers.
When contributing to the documentation, you should edit the documentation source files in the [`pug/page-contents/`](https://github.com/materializecss/materialize/tree/v2-dev/pug) directory of the `v2-dev` branch.

### Submitting Your Pull Request
**Do not edit the `gh-pages` branch directly.** That branch is generated from the documentation source files and is managed separately by the Materialize maintainers.

Adhering to the following process is the best way to get your work included in the project:
---

1. [Fork](https://help.github.com/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>/materialize.git
# Navigate to the newly cloned directory
cd materialize
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/materializecss/materialize.git
```
### Submitting your Pull Request

2. Go to Starting Branch and get latest changes:
First make yourself clear what you want to provide: Bugfix or Feature? The principle for both types of changes is the same: "First update, then work"

2.1. Bugfix
Adhering to the following process is the best way to get your work included in the project:

Get the latest changes from upstream main-branch:
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
```bash
git checkout main # go to the main branch
git pull upstream main # pull from the community-repo main-branch
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/materialize.git
# Navigate to the newly cloned directory
cd materialize
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/materializecss/materialize.git
```

2.2. Feature
2. Get latest changes ("First update, then work")

Get the latest changes from upstream development-branch:
Pull from upstream development-branch:
```bash
git checkout v2-dev # go to the dev branch
git pull upstream v2-dev # pull from the community-repo dev-branch
# go to local dev branch
git checkout v2-dev
# pull from online-repo dev-branch
git pull upstream v2-dev
```

3. Create a new topic branch to contain your work:
```bash
git checkout -b <topic-branch-name>
```
```bash
git checkout -b <topic-branch-name>
```

4. Commit your changes in logical chunks with messages written in English. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) and use [conventional commit format](https://github.com/conventional-changelog/commitlint/#what-is-commitlint) in your commit messages. Failing to do this makes your commits unlikely to be merged into the main project.
> You can use `npm run commit` to help you formatting the message, or use [commitlint.io](https://commitlint.io) if you are not editing locally
4. Commit your changes in logical chunks with messages in english. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) and use [conventional commit format](https://github.com/conventional-changelog/commitlint/#what-is-commitlint) in your commit messages. Failing to do this makes your commits unlikely to be merged.
> You can use `npm run commit` to help you formatting the message, or use [commitlint.io](https://commitlint.io) if you are not editing locally

5. Locally merge (or rebase) the upstream branch into your topic branch.
If in the meantime anything has changed in the community-repo you can add this changes locally into your repo.
5. Locally merge (or rebase) the upstream branch into your topic branch. If in the meantime anything has changed in the online-repo you can add this changes locally into your repo.
```bash
git pull [--rebase] upstream main # bugfix
git pull [--rebase] upstream v2-dev # feature
git pull [--rebase] upstream v2-dev
```

6. Push your topic branch up to your fork:
Expand Down
8 changes: 4 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ module.exports = function(grunt) {
output: {
filename: 'materialize.js',
path: path.resolve(__dirname, 'dist/js'),
libraryTarget: 'var',
library: 'M'
libraryTarget: 'umd',
globalObject: 'this'
}
}),

Expand All @@ -140,8 +140,8 @@ module.exports = function(grunt) {
output: {
filename: 'materialize.min.js',
path: path.resolve(__dirname, 'dist/js'),
libraryTarget: 'var',
library: 'M'
libraryTarget: 'umd',
globalObject: 'this'
}
}),
},
Expand Down
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,12 @@
<a href="https://gitter.im/materializecss/materialize">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter badge">
</a>
<a href="https://opencollective.com/materialize">
<img alt="Open Collective backers and sponsors" src="https://img.shields.io/opencollective/all/materialize">
</a>
</p>

## Table of Contents
- [Quickstart](#quickstart)
- [Documentation](#documentation)
- [Build](#build)
- [Supported Browsers](#supported-browsers)
- [Changelog](#changelog)
- [Testing](#testing)
- [Contributing](#contributing)
- [Copyright and license](#copyright-and-license)

## Quickstart:
## Quickstart
Read the [getting started guide](https://materializecss.github.io/materialize/getting-started.html) for more information on how to use materialize.

- [Download the latest release](https://github.com/materializecss/materialize/releases/latest) of materialize directly from GitHub. ([Beta](https://github.com/materializecss/materialize/releases/))
Expand Down Expand Up @@ -76,7 +69,6 @@ Materialize is compatible with:
- Safari 9+
- Opera
- Edge
- IE 11+

## Changelog
For changelogs, check out [the Releases section of materialize](https://github.com/materializecss/materialize/releases) or the [CHANGELOG.md](CHANGELOG.md).
Expand All @@ -87,5 +79,25 @@ We use Jasmine as our testing framework and we're trying to write a robust test
## Contributing
Check out the [CONTRIBUTING document](CONTRIBUTING.md) in the root of the repository to learn how you can contribute. You can also browse the [help-wanted](https://github.com/materializecss/materialize/labels/help-wanted) tag in our issue tracker to find things to do.

## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/materialize#sponsor)]

[![OC sponsor 0](https://opencollective.com/materialize/sponsor/0/avatar.svg)](https://opencollective.com/materialize/sponsor/0/website)
[![OC sponsor 1](https://opencollective.com/materialize/sponsor/1/avatar.svg)](https://opencollective.com/materialize/sponsor/1/website)
[![OC sponsor 2](https://opencollective.com/materialize/sponsor/2/avatar.svg)](https://opencollective.com/materialize/sponsor/2/website)
[![OC sponsor 3](https://opencollective.com/materialize/sponsor/3/avatar.svg)](https://opencollective.com/materialize/sponsor/3/website)
[![OC sponsor 4](https://opencollective.com/materialize/sponsor/4/avatar.svg)](https://opencollective.com/materialize/sponsor/4/website)
[![OC sponsor 5](https://opencollective.com/materialize/sponsor/5/avatar.svg)](https://opencollective.com/materialize/sponsor/5/website)
[![OC sponsor 6](https://opencollective.com/materialize/sponsor/6/avatar.svg)](https://opencollective.com/materialize/sponsor/6/website)
[![OC sponsor 7](https://opencollective.com/materialize/sponsor/7/avatar.svg)](https://opencollective.com/materialize/sponsor/7/website)
[![OC sponsor 8](https://opencollective.com/materialize/sponsor/8/avatar.svg)](https://opencollective.com/materialize/sponsor/8/website)
[![OC sponsor 9](https://opencollective.com/materialize/sponsor/9/avatar.svg)](https://opencollective.com/materialize/sponsor/9/website)


## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/materialize#backer)]

[![Backers](https://opencollective.com/materialize/backers.svg?width=890)](https://opencollective.com/materialize#backers)

## Copyright and license
Code Copyright 2023 Materialize. Code released under the MIT license.
2 changes: 1 addition & 1 deletion dist/css/materialize.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Materialize v2.0.0-alpha (https://materializecss.github.io/materialize)
* Materialize v2.0.1-alpha (https://materializecss.github.io/materialize)
* Copyright 2014-2023 Materialize
* MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/materialize.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 26 additions & 13 deletions dist/js/materialize.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
/*!
* Materialize v2.0.0-alpha (https://materializecss.github.io/materialize)
* Materialize v2.0.1-alpha (https://materializecss.github.io/materialize)
* Copyright 2014-2023 Materialize
* MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)
*/
var M;
/******/ (() => { // webpackBootstrap
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, () => {
return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({

Expand Down Expand Up @@ -4589,7 +4598,7 @@ exports.Forms = Forms;
/*!***********************!*\
!*** ./src/global.ts ***!
\***********************/
/***/ ((module, exports, __webpack_require__) => {
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {


var _a;
Expand Down Expand Up @@ -4876,7 +4885,7 @@ class M {
}
exports.M = M;
_a = M;
M.version = '2.0.0-alpha';
M.version = '2.0.1-alpha';
M.keys = {
TAB: 9,
ENTER: 13,
Expand Down Expand Up @@ -4941,7 +4950,7 @@ M.keyDown = false;
waves_1.Waves.Init();
range_1.Range.Init();
})();
module.exports = M;
exports["default"] = M;


/***/ }),
Expand Down Expand Up @@ -7424,7 +7433,8 @@ class Tabs extends component_1.Component {
const _oldContent = this._content;
// Update the variables with the new link and content
this._activeTabLink = tabLink;
this._content = document.querySelector(tabLink.hash);
if (tabLink.hash)
this._content = document.querySelector(tabLink.hash);
this._tabLinks = this.el.querySelectorAll('li.tab > a');
// Make the tab active
this._activeTabLink.classList.add('active');
Expand Down Expand Up @@ -7477,7 +7487,7 @@ class Tabs extends component_1.Component {
Array.from(this._tabLinks).forEach((a) => a.classList.remove('active'));
this._activeTabLink.classList.add('active');
this._index = Math.max(Array.from(this._tabLinks).indexOf(this._activeTabLink), 0);
if (this._activeTabLink) {
if (this._activeTabLink && this._activeTabLink.hash) {
this._content = document.querySelector(this._activeTabLink.hash);
this._content.classList.add('active');
}
Expand All @@ -7488,9 +7498,11 @@ class Tabs extends component_1.Component {
this.options.swipeable = false;
const tabsContent = [];
this._tabLinks.forEach(a => {
const currContent = document.querySelector(a.hash);
currContent.classList.add('carousel-item');
tabsContent.push(currContent);
if (a.hash) {
const currContent = document.querySelector(a.hash);
currContent.classList.add('carousel-item');
tabsContent.push(currContent);
}
});
// Create Carousel-Wrapper around Tab-Contents
const tabsWrapper = document.createElement('div');
Expand Down Expand Up @@ -9036,7 +9048,8 @@ exports.Waves = Waves;
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __webpack_require__("./src/global.ts");
/******/ M = __webpack_exports__;
/******/
/******/ return __webpack_exports__;
/******/ })()
;
;
});
8,969 changes: 8,967 additions & 2 deletions dist/js/materialize.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/materialize.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Builds Materialize distribution packages",
"author": "Alvin Wang, Alan Chang",
"homepage": "https://materializecss.github.io/materialize/",
"version": "2.0.0-alpha",
"version": "2.0.1-alpha",
"main": "dist/js/materialize.js",
"style": "dist/css/materialize.css",
"sass": "sass/materialize.scss",
Expand Down
8 changes: 4 additions & 4 deletions pug/contents/getting_started_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ <h3 class="header">Download</h3>
<div class="col s12 m6">
<h5>Materialize</h5>
<p>This is the standard version that comes with both the minified and unminified CSS and JavaScript files. This option requires little to no setup. Use this if you are unfamiliar with Sass.</p>
<a id="download-source" class="btn waves-effect waves-light" href="https://github.com/materializecss/materialize/releases/download/2.0.0-alpha/materialize-v2.0.0-alpha.zip">Materialize<i class="material-icons right">file_download</i></a>
<a id="download-source" class="btn waves-effect waves-light" href="https://github.com/materializecss/materialize/releases/download/2.0.1-alpha/materialize-v2.0.1-alpha.zip">Materialize<i class="material-icons right">file_download</i></a>
</div>
<div class="col s12 m6">
<h5>Sass</h5>
<p>This version contains the source SCSS files. By choosing this version you have more control over which components to include. You will need a Sass compiler if you choose this option.</p>
<a id="download-sass" class="btn waves-effect waves-light" href="https://github.com/materializecss/materialize/releases/download/2.0.0-alpha/materialize-src-v2.0.0-alpha.zip">Source<i class="material-icons right">file_download</i></a>
<a id="download-sass" class="btn waves-effect waves-light" href="https://github.com/materializecss/materialize/releases/download/2.0.1-alpha/materialize-src-v2.0.1-alpha.zip">Source<i class="material-icons right">file_download</i></a>
</div>
</div>

Expand All @@ -51,10 +51,10 @@ <h5>CDN</h5>
<i class="material-icons copyButton">content_copy</i>
<code class="language-markup copiedText">
&lt;!-- Compiled and minified CSS -->
&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.0.0-alpha/dist/css/materialize.min.css">
&lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.0.1-alpha/dist/css/materialize.min.css">

&lt;!-- Compiled and minified JavaScript -->
&lt;script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.0.0-alpha/dist/js/materialize.min.js">&lt;/script>
&lt;script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.0.1-alpha/dist/js/materialize.min.js">&lt;/script>
</code></pre>
</div>
<div class="col s12">
Expand Down
2 changes: 1 addition & 1 deletion pug/contents/index_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="s12 m10 offset-m1">
<img id="logo" src="res/materialize.svg" style="height: 100px;" alt="Materialize"/>
<h1 class="header white-text" style="margin-bottom: 0;">Materialize</h1>
<a class="current-version-number white-text" target="_blank" href="https://github.com/materializecss/materialize">2.0.0-alpha</a>
<a class="current-version-number white-text" target="_blank" href="https://github.com/materializecss/materialize">2.0.1-alpha</a>
</div>

<div class="s12 m8 offset-m2">
Expand Down
Loading