? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar thednp
thednp
24 Feb 2021

Pull Request for Issue #32494.

Summary of Changes

  • removed most minicolors assets
  • added tinycolor asset
  • added the new joomla-field-color-picker.es6.js as described in #32494
  • updated the layouts/joomla/form/field/color/advanced.php file
  • updated 3 language files
  • updated most assets related json files with the new assets

Testing Instructions

This is an initial commit, as is I don't expect the compilers to do magic right now. @dgrammatiko will probably do that.
Once the compilers work, I will update this section.

Actual result BEFORE applying this Pull Request

All type="color" fields that use control="advanced" are outdated in terms of accessibility, usability and because they require jQuery.

Expected result AFTER applying this Pull Request

All your type="color" fields that use control="advanced" are super awesome on any device and any user.

Documentation Changes Required

Yes. We must explain to developers how it works so they don't get funny ideas.

avatar thednp thednp - open - 24 Feb 2021
avatar thednp thednp - change - 24 Feb 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Feb 2021
Category Administration Language & Strings Repository NPM Change JavaScript Layout
avatar thednp thednp - change - 24 Feb 2021
Title
4.0 dev
[4.0 dev] Replace minicolors with color-picker
avatar thednp thednp - edited - 24 Feb 2021
avatar thednp thednp - change - 24 Feb 2021
Labels Added: ? NPM Resource Changed ?
avatar thednp thednp - change - 24 Feb 2021
The description was changed
avatar thednp thednp - edited - 24 Feb 2021
avatar dgrammatiko
dgrammatiko - comment - 24 Feb 2021

@thednp you need to rebase your PR, there are conflicts (meaning the code in this PR has a base that is outdated). @richard67 could you help here?

avatar thednp
thednp - comment - 24 Feb 2021

It says something about write access.

avatar richard67
richard67 - comment - 24 Feb 2021

@thednp you need to rebase your PR, there are conflicts (meaning the code in this PR has a base that is outdated). @richard67 could you help here?

@dgrammatiko I can try later if still necessary then i.e. if @thednp can't solve it himself.

avatar thednp
thednp - comment - 24 Feb 2021

@richard67 I cannot.

avatar richard67
richard67 - comment - 24 Feb 2021

@thednp Please stop making changes for a while, I soon update your branch to fix conflicts. Stay tuned and wait until I report back here that it's done.

avatar richard67
richard67 - comment - 24 Feb 2021

@thednp A few things:

  1. The branch which you have used to make this PR was stone age, I had to merge over 1500 commits into it.
  2. We do not change the copyrights anymore in files every year. Nut with your last change you had changed it from 2016 to 2021. Since the file was created in 2016 and not 2021, I have reverted that.
  3. In general you should make yourself familiar with our code style rules, and that does not need to read big documentation. It just needs to adjust your editor or IDE so you can see spaces and tabs, and to have a look on the existing code around the places which you want to change, and adapt to that. It makes no sense to do everything different to the existing code, even if you think it is better.
  4. If you click the link "Details" at the right side of the row with the "continuous-integration/drone/pr" test, you come to a page where at the left hand side is a list of tests. One of them is called PHPCS. If that is red, you will see the details on PHP code style errors reported by the linter. Those tell you what needs to be fixed.
avatar richard67
richard67 - comment - 24 Feb 2021

@dgrammatiko Please keep secret that I can fix code conflicts ... I don't wanna have too many requests ?

avatar thednp
thednp - comment - 24 Feb 2021

Too late, I already know :)

avatar richard67
richard67 - comment - 24 Feb 2021

@thednp Now drone fails with compiling the SCSS, see here: https://ci.joomla.org/joomla/joomla-cms/40329/1/7 . Maybe @dgrammatiko can advise?

Cleanup the Vendor 
Recreating the media folder...
Error: Cannot find module '@ctrl/tinycolor/package.json'
Require stack:
- /********/src/build/build-modules-js/init/localise-packages.es6.js
- /********/src/build/build.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.resolve (internal/modules/cjs/helpers.js:94:19)
    at resolvePackage (/********/src/build/build-modules-js/init/localise-packages.es6.js:42:34)
    at module.exports.localisePackages (/********/src/build/build-modules-js/init/localise-packages.es6.js:138:19)
    at async /********/src/build/build.js:163:7 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/********/src/build/build-modules-js/init/localise-packages.es6.js',
    '/********/src/build/build.js'
  ]
}
avatar thednp
thednp - comment - 24 Feb 2021

That is surely not my part. I mean I don't know how to fix it :)

avatar thednp
thednp - comment - 24 Feb 2021

For tinycolor I precompiled an es6 source from typescript and uploaded as instructed by @dgrammatiko. Other than that I don't know what's what. He said for tinycolor we need some new compile script but I don't actually know the status of that tbh.

Thanks again @richard67 have a good one, I hope you'll love this commit when done.

avatar dgrammatiko
dgrammatiko - comment - 24 Feb 2021

@thednp I think you created this PR solely on Github UI which will not work in this case (and fwiw most cases). You need to ingtall Git, then git clone git@github.com:joomla/joomla-cms.git.
Then you need to run composer and npm in that directory https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment

Then you create a new branch locally with all the changes, publish the branch and then you will be able to make a PR to the Joomla repo.

What is wrong here is that you said to the tools to copy a file from node_modules but you never installed @ctrl/tinycolor so the package.json and package.json.lock don;t have the dependency and thus everything fails, as expected. Follow the instructions above

avatar thednp
thednp - comment - 24 Feb 2021

I will do it again, differently.

avatar dgrammatiko
dgrammatiko - comment - 24 Feb 2021

I will do it again, differently.

To save you from wasting your time (and ours) please:

  • make sure that you install the dependency in your CLI (like npm install -S @ctrl/tinycolor
  • follow my proposal thednp@13eec3f
avatar thednp
thednp - comment - 24 Feb 2021

@dgrammatiko the thing is: I've set the v4-dev branch as default, that was the problem in the first place, then when switching back, there goes another...

I'm going to save files I've worked on the branch in my local computer, delete this entire fork and start a new fresh.

avatar dgrammatiko
dgrammatiko - comment - 24 Feb 2021

I'm going to save files I've worked on the branch in my local computer, delete this entire fork and start a new fresh.

I made a mistake on my previous comment, you shouldn't clone the Joomla repo but your fork git clone git@github.com:thednp/joomla-color-picker.gitchange to the branch to 4.0-dev then do the composer,npm stuff, etc

avatar thednp
thednp - comment - 24 Feb 2021

I don't know how to use the git app, I use TurtoiseSVN for my repos, and the browser for the other things.

avatar thednp thednp - change - 24 Feb 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-02-24 19:02:03
Closed_By thednp
avatar thednp thednp - close - 24 Feb 2021

Add a Comment

Login with GitHub to post a comment