Skip to content

Commit

Permalink
Upgrade Fomantic-UI to 2.9.4-beta.11 (#2119)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Oct 8, 2023
1 parent 1264670 commit 7cc2e65
Show file tree
Hide file tree
Showing 37 changed files with 8,603 additions and 10,012 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Many companies use Agile Toolkit to implement admin interface and in some cases

### How does it work?

Download from https://ui.atk4.org/ or install ATK UI with `composer require atk4/ui`
Download from https://github.com/atk4/ui/releases or install Agile UI with `composer require atk4/ui`

Create "index.php" file with:

Expand Down
5 changes: 5 additions & 0 deletions demos/_unit-test/late-output-error.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
require_once __DIR__ . '/../init-app.php';

$emitLateErrorHFx = static function () {
// TODO once https://github.com/php/php-src/issues/12385 is fixed
// while (ob_get_level() !== 0) {
// ob_end_flush();
// }
header('x-unmanaged-header: test');
flush();
// var_dump(headers_sent());
};

$emitLateErrorOFx = static function () {
Expand Down
16 changes: 16 additions & 0 deletions docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

build:
# https://github.com/readthedocs/readthedocs.org/issues/10805#issuecomment-1751816064
os: ubuntu-22.04
tools:
# https://github.com/readthedocs/readthedocs.org/issues/10805
python: '3.11'

python:
install:
# https://github.com/readthedocs/readthedocs.org/issues/10806
- requirements: docs/requirements.txt

formats:
- pdf
2,635 changes: 1,505 additions & 1,130 deletions js/package-lock.json

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions js/src/services/api.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,16 @@ class ApiService {
* Handle a server response failure.
*/
onFailure(response) {
// if JSON is returned, it should contain the error within message property
// if JSON is returned, it should contain the HTML error in message property
if (Object.prototype.hasOwnProperty.call(response, 'success') && !response.success) {
atk.apiService.showErrorModal(response.message);
} else {
// check if we have HTML returned by server with <body> content
const body = response.match(/<html[^>]*>.*<body[^>]*>[\S\s]*<\/body>/gi);

atk.apiService.showErrorModal(atk.apiService.getErrorHtml('API Server Error', '') + '<div>' + (
body
? 'body'
: '<pre style="margin-bottom: 0px;"><code style="display: block; padding: 1em; color: #adbac7; background: #22272e;">' + lodashEscape(response) + '</code></pre>'
) + '</div>');
atk.apiService.showErrorModal(
atk.apiService.getErrorHtml('API Server Error', '')
+ '<div><pre style="margin-bottom: 0px;"><code style="display: block; padding: 1em; color: #adbac7; background: #22272e;">'
+ lodashEscape(response)
+ '</code></pre></div>'
);
}
}

Expand Down
5 changes: 5 additions & 0 deletions js/src/services/modal.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class ModalService {
s.modals.push(this);

s.addModal($(this));

// recenter modal, needed even with observeChanges enabled
// https://github.com/fomantic/Fomantic-UI/issues/2920
// NOT https://github.com/fomantic/Fomantic-UI/issues/2476
$(this).modal('refresh');
}

onHide() {
Expand Down
2 changes: 1 addition & 1 deletion js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const TerserPlugin = require('terser-webpack-plugin');
const VueFomanticUi = require('vue-fomantic-ui'); // eslint-disable-line import/no-unresolved

module.exports = (env) => {
const isProduction = env === undefined ? false /* for eslint-import-resolver-webpack */ : env.production;
const isProduction = env === null ? false /* for eslint-import-resolver-webpack */ : env.production;
const srcDir = path.resolve(__dirname, './src');
const publicDir = path.resolve(__dirname, '../public');
const libraryName = 'atk';
Expand Down
8 changes: 5 additions & 3 deletions public/external/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
!/@shopify/draggable/
/@shopify/draggable/*
!/@shopify/draggable/LICENS*
!/@shopify/draggable/lib/
/@shopify/draggable/lib/*
!/@shopify/draggable/lib/*.bundle.js
!/@shopify/draggable/build/
/@shopify/draggable/build/*
!/@shopify/draggable/build/umd/
/@shopify/draggable/build/umd/*
!/@shopify/draggable/build/umd/*.js

!/chart.js/LICENS*
!/chart.js/dist/
Expand Down
2 changes: 1 addition & 1 deletion public/external/@shopify/draggable/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Shopify
Copyright (c) 2018-present Shopify

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 7cc2e65

Please sign in to comment.