Skip to content

[POC] [WIP] Include patterns-sass #829

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

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
Allow importing styles from external libraries in Patternslib JavaScript via the global variable ``window.__patternslib_import_styles`` set to ``true``.
This allows loading these styles automatically via Webpack.
Disable setting style import per default.
- Styles: Import styles by setting ``__patternslib_import_styles``
Allow importing styles from external libraries in Patternslib JavaScript via the global variable ``window.__patternslib_import_styles`` set to ``true``.
This allows loading these styles automatically via Webpack.
Set patternslib to use/import styles per default.
- pat carousel: Use ``imagesloaded`` instead of timeout to wait for images to have been loaded.
- core registry: Do not scan patterns within trees with attribute ``hidden`` or class ``cant-touch-this``.
- Implenent lazy loading for external libraries via dynamic imports. Leads to significantly reduced bundle sizes.
Expand Down
7 changes: 0 additions & 7 deletions _sass/_patterns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
@import "components/avatar";
@import "components/form";
@import "components/icon";
@import "src/pat/auto-suggest/auto-suggest";
@import "src/pat/autofocus/autofocus";
@import "src/pat/auto-scale/auto-scale";
@import "src/pat/auto-submit/auto-submit";
@import "src/pat/bumper/bumper";
@import "src/pat/carousel/carousel";
@import "src/pat/checklist/checklist";
@import "src/pat/collapsible/collapsible";
@import "src/pat/date-picker/date-picker";
@import "src/pat/datetime-picker/datetime-picker";
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"masonry-layout": "^4.2.2",
"moment": "^2.29.0",
"moment-timezone": "^0.5.31",
"patterns-sass": "git+https://github.com/Patternslib/patterns-sass.git#scr-984",
"photoswipe": "^4.1.3",
"pikaday": "^1.8.0",
"promise-polyfill": "^8.1.0",
Expand Down
13 changes: 0 additions & 13 deletions src/pat/auto-scale/_auto-scale.scss

This file was deleted.

5 changes: 4 additions & 1 deletion src/pat/auto-scale/auto-scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Copyright 2012 Humberto Sermeno
* Copyright 2013 Simplon B.V. - Wichert Akkerman
*/

import $ from "jquery";
import Base from "../../core/base";
import Parser from "../../core/parser";
Expand All @@ -25,6 +24,10 @@ export default Base.extend({
force_method: null,

init: function ($el, opts) {
if (window.__patternslib_import_styles) {
import("patterns-sass/components/_auto-scale.scss");
}

this.options = parser.parse(this.$el, opts);
if (this.force_method !== null) {
this.options.method = this.force_method;
Expand Down
1 change: 0 additions & 1 deletion src/pat/auto-scale/example-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
type="text/javascript"
charset="utf-8"
></script>
<link rel="stylesheet" href="autoscale.css" type="text/css" />
<style>
body {
width: 500px;
Expand Down
12 changes: 0 additions & 12 deletions src/pat/auto-scale/icon.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/pat/auto-scale/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Auto scale</title>
<link rel="stylesheet" href="/style/common.css" type="text/css" />
<script
src="/dist/bundle.js"
type="text/javascript"
Expand Down
Empty file.
10 changes: 0 additions & 10 deletions src/pat/auto-submit/icon.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/pat/auto-submit/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Auto submit</title>
<link rel="stylesheet" href="/style/common.css" type="text/css" />
<script
src="/dist/bundle.js"
type="text/javascript"
Expand Down
Binary file removed src/pat/auto-submit/placeholder.gif
Binary file not shown.
38 changes: 0 additions & 38 deletions src/pat/auto-submit/test.html

This file was deleted.

Loading