diff --git a/.github/workflows/bundler.yml b/.github/workflows/bundler.yml index ba1ca9401e..96839c1302 100644 --- a/.github/workflows/bundler.yml +++ b/.github/workflows/bundler.yml @@ -11,53 +11,93 @@ jobs: image: atk4/image:latest # https://github.com/atk4/image steps: - uses: actions/checkout@master - - name: Update CDN versions + - name: Update CDN destination run: | v=$(echo ${{ github.ref }} | cut -d / -f 4) - echo $v + echo "::set-env name=version::$v" + git branch sed -i "s|'https://cdn.jsdelivr.net/gh/atk4/ui.*|'https://cdn.jsdelivr.net/gh/atk4/ui@$v/public',|" src/App.php sed -i "s|public \$version.*|public \$version = '$v';|" src/App.php + + - uses: teaminkling/autocommit@master + with: + commit-message: Update versions for develop + - uses: ad-m/github-push-action@master + with: + branch: feature/${{ env.version }}-cdn-update + force: true # in case of repeat run + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: pull-request + uses: romaninsh/pull-request@master + with: + source_branch: feature/${{ env.version }}-cdn-update + destination_branch: develop + pr_title: "Updating CDN link to use @${{ env.version }}" + pr_body: | + Compiled JS files from last release are here: + + https://cdn.jsdelivr.net/gh/atk4/ui@${{ env.version }}/public/ + + pr_reviewer: "romaninsh" + pr_assignee: "romaninsh" + github_token: ${{ secrets.GITHUB_TOKEN }} + + + - name: Update to stable dependencies run: | jq 'del(."minimum-stability")|del(.require["atk4/data"])' < composer.json > tmp && mv tmp composer.json - composer require atk4/data - composer update + composer require atk4/data --no-progress + composer update --no-progress + + - name: Compile JS files for CDN + run: | + npm install -g less-plugin-clean-css + lessc public/agileui.less public/agileui.css --clean-css="--s1 --advanced --compatibility=ie8" --source-map + uglifyjs --compress -- public/agileui.js > public/agileui.min.js + echo '!agileui.css' >> public/.gitignore + echo '!agileui.css.map' >> public/.gitignore + echo '!agileui.min.js' >> public/.gitignore + echo '!atkjs-ui.js' >> public/.gitignore + echo '!atkjs-ui.min.js' >> public/.gitignore + git add public - uses: teaminkling/autocommit@master with: - commit-message: Setting current dependencies + commit-message: Setting current dependencies and complied JS - uses: ad-m/github-push-action@master with: branch: ${{ github.ref }} github_token: ${{ secrets.GITHUB_TOKEN }} - - name: pull-request-action - uses: vsoch/pull-request-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PULL_REQUEST_BRANCH: "master" - PULL_REQUEST_TITLE: "Releasing ${{ github.ref }} into master" - PULL_REQUEST_BODY: | - - [ ] Review changes (must include stable dependencies) - - [ ] Merge this PR into master (will delete ${{ github.ref }}) - - [ ] Go to Releases and create TAG from master - - Do not merge master into develop - - -# - name: pull-request -# uses: repo-sync/pull-request@v2 -# with: -# source_branch: "" # If blank, default: triggered branch -# destination_branch: "master" # If blank, default: master -# pr_title: "Releasing ${{ github.ref }} into master" -# pr_body: | +# - name: pull-request-action +# uses: vsoch/pull-request-action@master +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# PULL_REQUEST_BRANCH: "master" +# PULL_REQUEST_TITLE: "Releasing ${{ github.ref }} into master" +# PULL_REQUEST_BODY: | # - [ ] Review changes (must include stable dependencies) # - [ ] Merge this PR into master (will delete ${{ github.ref }}) # - [ ] Go to Releases and create TAG from master +# # Do not merge master into develop -# pr_reviewer: "romaninsh" -# pr_assignee: "romaninsh" -# github_token: ${{ secrets.GITHUB_TOKEN }} +# + + - name: pull-request + uses: romaninsh/pull-request@master + with: + source_branch: "release/${{ env.version }}" + destination_branch: "master" # If blank, default: master + pr_title: "Releasing ${{ github.ref }} into master" + pr_body: | + - [ ] Review changes (must include stable dependencies) + - [ ] Merge this PR into master (will delete ${{ github.ref }}) + - [ ] Go to Releases and create TAG from master + Do not merge master into develop + pr_reviewer: "romaninsh" + pr_assignee: "romaninsh" + github_token: ${{ secrets.GITHUB_TOKEN }} # diff --git a/public/.gitignore b/public/.gitignore index a79ae128ba..6cf346eba5 100644 --- a/public/.gitignore +++ b/public/.gitignore @@ -3,3 +3,8 @@ !agileui.js !agileui.less !.gitignore +!agileui.css +!agileui.css.map +!agileui.min.js +!atkjs-ui.js +!atkjs-ui.min.js diff --git a/public/agileui.css b/public/agileui.css new file mode 100644 index 0000000000..d47a906c44 --- /dev/null +++ b/public/agileui.css @@ -0,0 +1 @@ +.ui.visible.left.sidebar~header.atk-topMenu.ui.menu.fixed{width:calc(100% - 260px)}.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:260px}.atk-dialog-content{min-height:100px}.atk-hide-loading-content.loading:before{background:rgba(255,255,255,.98)!important}.atk-layout{display:flex;min-height:100vh;flex-direction:column}.atk-topMenuGhost.ui.menu{display:none;margin:0;pointer-events:none;visibility:hidden}header.atk-topMenu.ui.fixed.menu~.atk-topMenuGhost{display:block}header.atk-topMenu.ui.menu .item>.label{margin-left:0}.atk-mainContainer{flex:1}.atk-mainContainer .atk-mainContainerWrapper{padding:3em}footer.atk-footer .ui.divider,footer.atk-footer .ui.segment{margin:0}.ui.left.sidebar{z-index:103}.ui.left.sidebar .item.atk-leftMenuClose{display:none;position:fixed;right:0;top:0;z-index:999}.ui.left.sidebar .item.atk-leftMenuClose i.icon{margin-left:0!important}.atk-table-dropdown{display:inline;float:right}.atk-table-dropdown i{opacity:.3;vertical-align:bottom}.atk-overflow-auto{overflow:auto;border:1px solid rgba(34,36,38,.15);margin-bottom:1em}.atk-overflow-auto>.ui.table{margin-top:0}.atk-cell-expanded{min-width:320px;max-width:640px;white-space:normal}.atk-overlay.pushable{height:100%;left:0;opacity:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:102}.atk-overlay.pushable .pusher:after{height:100%;opacity:1;width:100%}@media (max-width:991px){.ui.left.sidebar~header.atk-topMenu.ui.menu.fixed{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);width:100%!important}.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:0}.ui.left.sidebar{opacity:0;pointer-events:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:visible}body.atk-leftMenu-visible:after{left:0;position:fixed;top:0}body.atk-leftMenu-visible .ui.left.sidebar{opacity:1;pointer-events:auto}body.atk-leftMenu-visible .ui.left.sidebar .atk-leftMenuClose{display:block}}@media (min-width:768px) and (max-width:991px){body.atk-leftMenu-visible .atk-overlay.pushable{opacity:1}}@media (max-width:767px){body.atk-leftMenu-visible{overflow:hidden}.ui.left.sidebar{width:100%}}@media print{.ui.visible.left.sidebar~.atk-mainContainer,.ui.visible.left.sidebar~footer.atk-footer{padding-left:0}.atk-topMenu,.atk-topMenuGhost,.ui.left.sidebar{display:none!important}}/*# sourceMappingURL=agileui.css.map */ \ No newline at end of file diff --git a/public/agileui.css.map b/public/agileui.css.map new file mode 100644 index 0000000000..2d79a343cb --- /dev/null +++ b/public/agileui.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["agileui.less"],"names":[],"mappings":"AASqD,0DACnD,MAAA,mBAEuB,4CACQ,2CAC/B,aAAA,MAGF,oBACE,WAAA,MAG+B,yCAC3B,WAAA,gCAGN,YACE,QAAA,KACA,WAAA,MACA,eAAA,OAEkB,0BAClB,QAAA,KACA,OAAA,EACA,eAAA,KACA,WAAA,OAE+B,mDAC/B,QAAA,MAE+B,wCAC/B,YAAA,EAEF,mBACE,KAAA,EACA,6CACE,QAAA,IAIC,8BAAa,8BACd,OAAA,EAMI,iBACN,QAAA,IACK,yCACH,QAAA,KACA,SAAA,MACA,MAAA,EACA,IAAA,EACA,QAAA,IACC,gDACC,YAAA,YASN,oBACE,QAAA,OACA,MAAA,MAGkB,sBAClB,QAAA,GACA,eAAA,OAMF,mBACE,SAAA,KACA,OAAA,IAAA,MAAA,mBACA,cAAA,IACK,6BACH,WAAA,EAIJ,mBACE,UAAA,MACA,UAAA,MACA,YAAA,OAEU,sBACV,OAAA,KACA,KAAA,EACA,QAAA,EACA,eAAA,KACA,SAAA,MACA,IAAA,EACA,MAAA,KACA,QAAA,IAEG,oCACC,OAAA,KACA,QAAA,EACA,MAAA,KAQoC,yBACK,kDAC3C,kBAAmB,mBACnB,UAAW,mBACX,MAAA,eAEuB,4CACQ,2CAC/B,aAAA,EAEM,iBACN,QAAA,EACA,eAAA,KACA,kBAAmB,mBACnB,UAAW,mBACX,WAAA,QAGC,gCACC,KAAA,EACA,SAAA,MACA,IAAA,EAEM,2CACN,QAAA,EACA,eAAA,KACA,8DACE,QAAA,OAKgE,+CAChC,gDACpC,QAAA,GAGqC,yBACnC,0BACF,SAAA,OAEM,iBACN,MAAA,MAOJ,aAC2B,4CACQ,2CAC/B,aAAA,EAEgB,aAAc,kBAAxB,iBACN,QAAA"} \ No newline at end of file diff --git a/public/agileui.min.js b/public/agileui.min.js new file mode 100644 index 0000000000..7367a578d1 --- /dev/null +++ b/public/agileui.min.js @@ -0,0 +1 @@ +$(function(){$(".ui.left.sidebar").prepend(''),$(".atk-leftMenuClose").click(function(){$("body").removeClass("atk-leftMenu-visible")}),$(".atk-leftMenuTrigger").click(function(ev){ev.preventDefault(),ev.stopPropagation(),$(".ui.left.sidebar").toggleClass("visible"),$("body").toggleClass("atk-leftMenu-visible")})}); diff --git a/src/App.php b/src/App.php index 6c5d01b99f..271db07679 100644 --- a/src/App.php +++ b/src/App.php @@ -33,14 +33,14 @@ class App /** @var array|false Location where to load JS/CSS files */ public $cdn = [ - 'atk' => 'https://cdn.jsdelivr.net/gh/atk4/ui@2.0.1/public', + 'atk' => 'https://cdn.jsdelivr.net/gh/atk4/ui@2.0.2/public', 'jquery' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1', 'serialize-object' => 'https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.5.0', 'semantic-ui' => 'https://cdn.jsdelivr.net/npm/fomantic-ui@2.7.2/dist', ]; /** @var string Version of Agile UI */ - public $version = '2.0.1'; + public $version = '2.0.2'; /** @var string Name of application */ public $title = 'Agile UI - Untitled Application';