Skip to content

Commit

Permalink
Releasing 2.0.0 into master (manually) (#859)
Browse files Browse the repository at this point in the history
* Apply fixes from StyleCI

* remove extra spaces from Response Content-Type

* enhanced

only call server when using expression in row.

* code review

review hasExpression function

* First scratch for multiline Documentation

* add semantic-ui-vue in atkjs bundle

* update webpack configuration

* Better draft, formatting and Screenshots follow

* Add some formatting

* Update Formatting

* Add Multiline Screenshots

* Fix Link to Screenshot

* Add ability to customize CSS of 'content' div

* Add Documentation for addContentCss() feature

* Added Expressions, onLineChange()

* Chapter "Changing appearance"

* Improve formatting

* update doc

* add "Is Not" for TableColumn::FilterModel::TypeString

* StyleCI

* changed Css to CSS (similarly how we use e.g. renderJS)

* add demo

* Apply fixes from StyleCI

* Add a Scrolling Modal

* minor fix

change function name.

* remove useSuiVue

Now include in Bundle

* fix/CaughException Layout

- When children App is created

* Bump eslint-utils from 1.4.0 to 1.4.2 in /js

Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.2)

Signed-off-by: dependabot[bot] <[email protected]>

* Update to changes in Modal.php

* add ignore E_DEPRECATED & E_USER_DEPRECATED

* add App->catch_error_types to define error types in set_error_handler

* fix/#802 Array fields error in form

* Apply fixes from StyleCI

* Fix #8ß5

* Allow to add Attributes to <input> tag 

New property added: $this->inputAttr in which additional attributes are stored
New function added: setInputAttr() which is a clone of View->setAttr() which fills the $this->inputAttr array

Can also be used to overwrite existing attributes as $this->inputAttr is passed as second param to array_merge (at $this->app->getTag())

* update to use inputAttr

* update to use inputAttr

* update to use inputAttr

* update to use inputAttr

* style CI fixes

* styleCI fixes

* Add demo for custom <input> Attributes

* add another demo field which uses array definition

* Update TypeText.php

to pass check

* Fix autocomplete.html

* Fix lookup.html

* Fix autocomplete.pug

* Fix lookup.pug

* init

- add jsCallback when adding or deleting a row.

* feature/TreeItemSelector Form Field

Initial commit

* Apply fixes from StyleCI

* Make Escape key clear Grid Search

* feature/MultiLine Enhancement

- Ability to run js when adding or deleting row.
- Add new line of record when tabbing out of the last row/column

* Apply fixes from StyleCI

* start implementation

* Apply fixes from StyleCI

* remove test

* changed example for ibelar

* Apply fixes from StyleCI

* some more notes wip

* Apply fixes from StyleCI

* test

* Mutliline: Improve inline docs and comments (#811)

* Improve inline docs and comments

* Update MultiLine.php

* initial testing

* Fix  #814 - useless code in Form.php (#818)

* Fix  #814 - useless code in Form.php

* Update Form.php

* Add Locale class

* Apply fixes from StyleCI

* add LocaleTest

* Apply fixes from StyleCI

* Update LocaleTest.php

* Add credits to Lokalize services

* Create .empty

* Delete .empty

* Fix Locale.php

* refactor

* code review and refactor

* Apply fixes from StyleCI

* updare demo

* type hint and cleanup

* Apply fixes from StyleCI

* js cleanup and comment

* add more demo

* Typo.

* update userAction

move loader set function to jsRender so we could apply afterSuccess or jsSuccess after setAction is done.
Add jsSuccess and stateContext

* Apply fixes from StyleCI

* fix

* Feature/fix textarea (#822)

* fix TextArea and DropDown zero and empty values

* Apply fixes from StyleCI

* Enhance Form Testing suite

* Apply fixes from StyleCI

* fix

* fix

* #823: Fix a few phpDoc comments. (#824)

* #823: Fix a few phpDoc comments.

* #824: Lowercase @inheritdoc .

* update

- include web storage for ajaxexec
- code refactoring

* fix modal service

* update modal service

* fix/DropDown unnecessary property

Remove unneccessary property isValueRequired for dropdown formfield and rely on field property required instead.

* update ajaexec.plugin

add demos/test to gitignore

* remove unused comment

* update button placement and state

* remove jsEvent executor from UserAction

Action that required an event must be expicitly set using jsEvent

* Apply fixes from StyleCI

* add exception handler

* Apply fixes from StyleCI

* update demos

* added jsExecute()

* Apply fixes from StyleCI

* cleanup

* check for exception in each jsSubmit step

* Apply fixes from StyleCI

* Feature/Refactor On method

Allow for on method to receive a Model UserAction as second arguments.

* Apply fixes from StyleCI

* Table columns support user action now

* Apply fixes from StyleCI

* forgot the demo

* Apply fixes from StyleCI

* update

- Create new Class jsUserAction based on existing jsCallback
- remove jsEvent executor from demos
- set demos using new jsUserAction
- update View method to use new jsUserAction

* Apply fixes from StyleCI

* Code review

Add comments
clean up.

* Apply fixes from StyleCI

* update comment

* test

* fix test uri for jsactions.php demo

* init

* merge changed

* Apply fixes from StyleCI

* update View::on()

Add ability to setup apiConfig for jsCallback.

* updated

Fix dropdown when place inside a column table.

* Apply fixes from StyleCI

* fix typo

* update method name

* improve functionality and demos

* Apply fixes from StyleCI

* improve demo

* Apply fixes from StyleCI

* improve demo

* improve demo

* making crud work

* fixes

* integrated crud into actions

* Apply fixes from StyleCI

* Code review

Add comments
clean up.

* Apply fixes from StyleCI

* update comment

* test

* fix test uri for jsactions.php demo

* init

* merge changed

* Apply fixes from StyleCI

* update View::on()

Add ability to setup apiConfig for jsCallback.

* merge

* updated

Fix dropdown when place inside a column table.

* Apply fixes from StyleCI

* fix typo

* update method name

* improve functionality and demos

* Apply fixes from StyleCI

* improve demo

* Apply fixes from StyleCI

* improve demo

* improve demo

* crud improvements

* wip

* wip

* Apply fixes from StyleCI

* action test

* Apply fixes from StyleCI

* test with getting action

* Apply fixes from StyleCI

* change property name

* setup executor from action

* Apply fixes from StyleCI

* Addesd public property currency_decimals in Persistence/UI

* Using property currency_decimals in FormField/Money

* Apply fixes from StyleCI

* code cleanup

* refactor and review

* Apply fixes from StyleCI

* clean up

* add hook callback to crud

* Apply fixes from StyleCI

* adding native action dropdown support into crud

* Apply fixes from StyleCI

* update demo to contain example of redefining action executor

* Apply fixes from StyleCI

* Added two really nice demo pages (index and actions)

* Apply fixes from StyleCI

* fixed and enhancement

- fixed table border
- fixed js when table dropdown menu  appear near end of window
- Delete action should be fixed in atk4\data

remove floating css class to table dropdown menu
View::On method now check for action confirmation property and apply it by default

* fix action in wizrd

* add action to menu item

* add UserConfirmation

* Apply fixes from StyleCI

* Add SSE operation with user confirmation example

This adds an example for triggering an SSE operation after asking confirmation from the user.

* Apply fixes from StyleCI

* hide modal content while reloading

* refactor

make it more generic by applying class to loader instead of moda.

* apply sorting when using action

* Apply fixes from StyleCI

* remove previous test

* remove tutorial from actions page

Added to a new page tutorial_actions for test to work again

* fix double factory

* Fix few bugs and add comments (#847)

* add some comments while reviewing

* fix action->fields bug

* cleanup

* CRUD refactoring

* Apply fixes from StyleCI

* change method name

* minor fix

* notify refactor

* more refactoring

* Apply fixes from StyleCI

* more cleanup

* fix comment

* more cleanup

* Apply fixes from StyleCI

* fix actions test

* fix lookup test

* temp fix for lookup

Seem like db value is not available.

* Feature/Code Highlight (#849)

* Feature/Code Highlight

Display code in tutorial using Highlight.js

* Apply fixes from StyleCI

* add lang selection

* fix

* nothing

* Feature/Card Deck using model action (#846)

* init

* Apply fixes from StyleCI

* fix demo

* enhancement

add menu bar
improve jsNotify setup

* Apply fixes from StyleCI

* add ability to pass View::on() defaults

* add some comments while reviewing

* fix action->fields bug

* cleanup

* CRUD refactoring

* Apply fixes from StyleCI

* change method name

* minor fix

* notify refactor

* more refactoring

* Apply fixes from StyleCI

* more cleanup

* fix comment

* more cleanup

* Apply fixes from StyleCI

* fix actions test

* fix lookup test

* temp fix for lookup

Seem like db value is not available.

* deck refactoring

* Apply fixes from StyleCI

* update demo

* Apply fixes from StyleCI

* typo

* Apply fixes from StyleCI

* enhancement

card template refactoring
add itemSearch to deck

* Apply fixes from StyleCI

* add empty view when no record to show

* Apply fixes from StyleCI

* update

* Apply fixes from StyleCI

* apply partial reload on card when possible

* Apply fixes from StyleCI

* remove test argument

* Code review

* Apply fixes from StyleCI

* create view from seed

* nothing really

* Add Github workflows (actions)  (#848)

* workflow

* Setting current dependencies

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* Fix unit test on Windows paths

* Remove file db.github.php from Demo functional test check.

* Apply fixes from StyleCI

* Fix some Type Hints

* Apply fixes from StyleCI

* Feature/input action (#845)

* Feature/Input Action

* Apply fixes from StyleCI

* Change in demo : exit() to $app->callExit() (#854)

* Change exit() to $app->callExit()

* Change direct exit call to $app->callExit().

* Change all deprecated Persistence_* to correct Persistence\*

* badge

* fix release bundler

* fix release bundler

* wip

* fix release bundler

* fix release bundler

* fix release bundler

* Setting current dependencies
  • Loading branch information
romaninsh authored Dec 15, 2019
1 parent 042d3b4 commit 6a4a839
Show file tree
Hide file tree
Showing 510 changed files with 42,729 additions and 3,903 deletions.
181 changes: 118 additions & 63 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,120 @@
engines:
duplication:
enabled: true
version: "2"
plugins:
# Disabling plugins until there is a reasonable way to sanitize their output
phpcodesniffer:
enabled: false
config:
languages:
php:
mass_threshold: 50
fixme:
enabled: true
standard: "PSR1,PSR2"
ignore_warnings: true
encoding: utf-8
phpmd:
enabled: true
exclude_fingerprints:
- 908ad3f93985ff14c44615cee6966c72 # View have a lot of public methods. Deal with it.
- 81ca5382dedb709060ec70ffea74e157 # allow exit in a call-back inside app constructor
- 409aa7b6ded69296360c17d5c267c8dc # Grid::renderView iterates method
- a4801fad2cfbf1b485de61cca855955d # Grid calls View::renderView() bypassing Lister.
- 5030329ed016f46a2791c854caacb39c # Grid::getHTMLTags passes $row / $field, but $row is not used by money column
- 113c8195220e554776225802db7021d6 # Persistence_Faker: Allow static access to class Faker\Factory in __construct
checks:
CleanCode/ElseExpression:
enabled: false # gives many incorrect suggestions
Controversial/CamelCaseClassName:
enabled: false # because jQuery.php and similar class names
Controversial/CamelCaseMethodName:
enabled: false # methods start with _xx for private methods (that must remain public)
Controversial/CamelCaseParameterName:
enabled: false # allow parameter names to not use camelCase notation
Controversial/CamelCasePropertyName:
enabled: false # becasue we use _xx for private properties (that must remain public)
Controversial/CamelCaseVariableName:
enabled: false # because we call variables $f_login, $m_user for better readability.
Controversial/Superglobals:
enabled: false # yes we use superglobals and that's OK
CyclomaticComplexity:
enabled: false # our code is complex so that your code wouldn't be!
CleanCode/BooleanArgumentFlag:
enabled: false # sometimes it is meaningful to pass boolean arguments to methods
Design/CouplingBetweenObjects:
enabled: false # because we always allow to inject overrides!
Design/LongMethod:
enabled: false # our code is long so that your code wouldn't be!
Design/NpathComplexity:
enabled: false # our code is complex so that your code wouldn't be!
Design/TooManyMethods:
enabled: false # methods never should be to many
Design/TooManyPublicMethods:
enabled: false # it is OK that some classes have more than 12 public methods
Design/WeightedMethodCount:
enabled: false # because we solve complex task, our classes may be complex
Naming/ShortMethodName:
enabled: false # because of on() and js() and $ui
Naming/ShortVariable:
enabled: false # because of on() and js() and $ui
# THERE IS MUCH TO MUCH OF THESE ERRORS - TEMPORARILY DISABLE THIS CHECK
UnusedFormalParameter:
enabled: false
radon:
enabled: true
ratings:
paths:
- "src/**"
exclude_paths:
- "docs/**"
- "tests/**"
- "vendor/**"
enabled: false
sonar-php:
enabled: false

checks:
argument-count:
config:
threshold: 5
complex-logic:
config:
threshold: 4
file-lines:
config:
threshold: 1000
method-complexity:
config:
threshold: 50
method-count:
config:
threshold: 40
method-lines:
config:
threshold: 100
nested-control-flow:
config:
threshold: 4
return-statements:
config:
threshold: 7
similar-code:
config:
threshold: 100
identical-code:
config:
threshold: 150


#engines:
# duplication:
# enabled: true
# config:
# languages:
# php:
# mass_threshold: 50
# fixme:
# enabled: true
# phpmd:
# enabled: true
# exclude_fingerprints:
# - 9d462b7c90c564bf28007ee399340fad # table() NPath is too complex.
# - 7c90035f65bb3bdbd2c03c648a705aac # we use static for factory, so it's good
# - 80ef7f404dd4f054ca51d9ee12d9e9dd # we exit from toStrign() because it can't throw exceptions
# - ae61f5e0cda0328c140f3b7298dbb8af # don't complain about call to static connection, as it's a fallback
# - e71149b967391adfaf3347a53d3c0023 # don't complain about $junk used in foreach when we only need keys
# checks:
# CyclomaticComplexity: # because we solve complex stuff
# enabled: false
# Naming/LongVariable: # because we have variable naming patterns
# enabled: false
# UnusedFormalParameter: # because when we extend methods/hooks we wish to keep unified method call interface
# enabled: false
# Design/TooManyPublicMethods: # because we follow our internal design patters
# enabled: false
# Design/TooManyMethods: # because we solve complex stuff
# enabled: false
# Design/LongMethod: # because methods are as long as we need them to be
# enabled: false
# ExcessivePublicCount: # because Model has too many public methods
# enabled: false
# Design/TooManyFields: # because we solve complex things
# enabled: false
# Design/NpathComplexity: # because splitting up complex stuff into methods makes things even more complex
# enabled: false
# Design/WeightedMethodCount: # because we we solve complex stuff
# enabled: false
# Design/LongClass: # because we design carefully what is native and what is extension
# enabled: false
# Controversial/CamelCaseMethodName: # because we need certain method naming patterns, render_blah for rendering [blah]
# enabled: false
# Controversial/CamelCaseParameterName: #
# enabled: false
# Controversial/CamelCasePropertyName: # because we use _better_dont_change properties
# enabled: false
# Controversial/CamelCaseVariableName: #
# enabled: false
# Controversial/CamelCaseClassName: # Because we use Join_SQL where we specifically include _
# enabled: false
# Naming/ShortVariable: # because sometimes variables should be short
# enabled: false
# CleanCode/ElseExpression: # because following this makes code more complex
# enabled: false
#
# radon:
# enabled: true
#ratings:
# paths:
# - "src/**"
#exclude_paths:
#- "docs/**"
#- "tests/**"
#- "vendor/**"
## exclude obsolete classes
#- "src/Field_Many.php"
#- "src/Field_One.php"
#- "src/Field_SQL_One.php"
#- "src/Relation_Many.php"
#- "src/Relation_One.php"
#- "src/Relation_SQL_One.php"
## exclude classes completely inherited from other repos
#- "src/Exception.php"
47 changes: 47 additions & 0 deletions .github/workflows/bundler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bundler

on: create

jobs:
autocommit:
name: Update to stable dependencies
if: startsWith(github.ref, 'refs/heads/release/')
runs-on: ubuntu-latest
container:
image: atk4/image:latest # https://github.com/atk4/image
steps:
- uses: actions/checkout@master
- name: Hack around git branches
run: |
v=$(echo ${{ github.ref }} | cut -d / -f 4)
echo $v
git branch
- 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
- uses: teaminkling/autocommit@master
with:
commit-message: Setting current dependencies
- uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}

- 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: |
- [ ] 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 }}

16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- develop

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: toolmantim/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Unit Testing

on:
pull_request

jobs:
unit-test:
name: Unit Testing
runs-on: ubuntu-latest
container:
image: atk4/image:latest # https://github.com/atk4/image
strategy:
matrix:
php: ['7.2', '7.3', 'latest']
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
DB_DATABASE: db
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v1
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader

- name: Install dependencies and SQL
run: |
mkdir -p coverage
apk add npm
npm install -g less clean-css uglify-js
mysql -uroot -ppassword -h mysql -e 'CREATE DATABASE atk4;'
mysql -uroot -ppassword -h mysql atk4 < demos/atk4.sql
mv demos/db.github.php demos/db.php
(cd js; npm install; npm run build)
#lessc public/agileui.less public/agileui.css --clean-css="--s1 --advanced --compatibility=ie8" --source-map
#uglifyjs --compress -- public/agileui.js > public/agileui.min.js
- name: Unit Testing
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml

# - name: Merge coverage logs
# run: vendor/bin/phpcov merge build/logs/ --clover build/logs/cc.xml;

- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: covearge.xml


4 changes: 4 additions & 0 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
unreleased-only=true
since-tag=1.5.7
usernames-as-github-logins=true
base=CHANGELOG.md
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
/behat.yml
/config.codekit
/phpunit.xml
*.bak
/.idea
/public/semantic
/public/jquery
/vendor
docs/build
/composer.lock
/demos/db.php
/build
.DS_Store
*.codekit3

yarn.lock
run_local.sh
/coverage
/demos/test/
package-lock.json
Loading

0 comments on commit 6a4a839

Please sign in to comment.