Skip to content
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

Use local resources only - pack/download from CDN lately on install #1025

Closed
mvorisek opened this issue Mar 29, 2020 · 8 comments · Fixed by #1785
Closed

Use local resources only - pack/download from CDN lately on install #1025

mvorisek opened this issue Mar 29, 2020 · 8 comments · Fixed by #1785

Comments

@mvorisek
Copy link
Member

mvorisek commented Mar 29, 2020

This is a feature request to pack or download all resources with composer at install/update.

This includes not only directly resources for atk4, but also for used libraries, like CDN fonts used in Fomantic UI.

Important for intranets/IOT where internet connection is not available or limited.

@DarkSide666
Copy link
Member

DarkSide666 commented Mar 30, 2020

(plus)+ already compiled JS and CSS files.

@mvorisek
Copy link
Member Author

mvorisek commented Mar 30, 2020

* already compiled JS and CSS files.

@DarkSide666, wdym? The compiled (& minified) files are currently not available within this repo.

One possible solution - and very common - is to put the compiled (& minified + possibly other downloaded resources) files into the repo directly, ensure that all of them can be built repeatably and add CI tests to make sure the compiled files are 1:1 (ie. synchronized) with the source files.

But at least the complete build script (that will also fetch the remote resources like Fomantic UI files) is needed.

@mvorisek mvorisek added the MAJOR label Mar 30, 2020
@DarkSide666
Copy link
Member

DarkSide666 commented Mar 30, 2020

Well, sometimes it would be great to have compiled/minified files in repo.
They probably can be compiled automatically by some github action on each commit (or PR).

@romaninsh
Copy link
Member

Are you suggesting to extend https://github.com/atk4/ui/blob/develop/tools/get-assets.php?

@mvorisek
Copy link
Member Author

mvorisek commented Apr 3, 2020

Are you suggesting to extend https://github.com/atk4/ui/blob/develop/tools/get-assets.php?

This is not enougt as the linked resources usually load/link fonts and other resources - see for ex. FUI css https://cdn.jsdelivr.net/npm/fomantic-ui@2.7.4/dist/semantic.min.css (and search for .woff)

@mvorisek
Copy link
Member Author

mvorisek commented Mar 6, 2022

There is no CDN solution when GH is down, resources must be committed within the repo (as we do with our CSS/JS) and checked by CI.

@mvorisek
Copy link
Member Author

mvorisek commented Apr 8, 2022

Should also fix Behat CI failures like:

Feature: Executor
  Testing basic action executor

  Scenario: basic                                   # tests-behat/basicexecutor.feature:4
    Given I am on "data-action/actions.php"         # Behat\MinkExtension\Context\MinkContext::visit()
    │
    ╳  Exception: jQuery did not finish within a time limit in src/Behat/Context.php:99
    ╳  Stack trace:
    ╳  #0 src/Behat/Context.php(62): Atk4\Ui\Behat\Context->jqueryWait()
    │
    └─ @AfterStep # Atk4\Ui\Behat\Context::waitUntilLoadingAndAnimationFinished()
    And I press button "Import"                     # Atk4\Ui\Behat\Context::iPressButton()
    Then Toast display should contains text "Done!" # Atk4\Ui\Behat\Context::toastDisplayShouldContainText()

@mvorisek
Copy link
Member Author

Should also allow to customize SUI, see related issue #1257

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants