? Pending

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
11 Mar 2018

Pull Request for Issue # .

Summary of Changes

Move the inline jQuery dependant code to custom elements/native ES6 javascript

Testing Instructions

Install this branch, change the default editor to codemirror and check it's functionality (F10 and all the highlighting still works)

screen shot 2018-03-12 at 01 11 37

screen shot 2018-03-12 at 01 11 58

Few notes

  • All the related scripts (codemirror, addons the custom element itself) are lazy loaded
  • thus it makes this editor PWA ready
  • We're using Promises (the polyfill for the webcomponents cover the older browsers)
  • we're using requestAnimationFrame (https://caniuse.com/#feat=requestanimationframe) supported even in IE11 (wow ?)
  • the code remains flexible as the options can be changed in runtime (even better than the old var approach)

Documentation Changes Required

Yes

avatar dgt41 dgt41 - open - 11 Mar 2018
avatar dgt41 dgt41 - change - 11 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2018
Category JavaScript Repository Front End Plugins
avatar dgt41 dgt41 - change - 11 Mar 2018
The description was changed
avatar dgt41 dgt41 - edited - 11 Mar 2018
avatar dgt41 dgt41 - change - 12 Mar 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 12 Mar 2018
Category JavaScript Repository Front End Plugins JavaScript Repository Layout Front End Plugins
avatar infograf768
infograf768 - comment - 12 Mar 2018

Does not look like working here (installed from your branch):
screen shot 2018-03-12 at 09 42 18

avatar infograf768
infograf768 - comment - 12 Mar 2018
avatar dgt41
dgt41 - comment - 12 Mar 2018

Thanks will check it

avatar infograf768
infograf768 - comment - 12 Mar 2018

Same for addons.js as I tested by adding in index.php

HTMLHelper::_('script', 'media/vendor/codemirror/lib/codemirror.js');
HTMLHelper::_('script', 'media/vendor/codemirror/lib/addons.js');

which still get the error in console but loads the textarea normally.

Also, you still have some debug code in FileLayout.php

avatar dgt41
dgt41 - comment - 12 Mar 2018

And a slight facelift:
screen shot 2018-03-12 at 12 42 48

avatar Anu1601CS
Anu1601CS - comment - 12 Mar 2018

screenshot from 2018-03-12 16-57-24

@dgt41 not fixed yet.

avatar dgt41
dgt41 - comment - 12 Mar 2018

@infograf768 @Anu1601CS since I never use subfolders to install any instance of Joomla can you please provide the error messages and a screenshot of the DOM element joomla-editor-codemirror ?
Thanks

avatar Anu1601CS
Anu1601CS - comment - 12 Mar 2018

screenshot from 2018-03-13 01-25-20
screenshot from 2018-03-13 01-24-57

avatar dgt41
dgt41 - comment - 12 Mar 2018

@Anu1601CS let me know if latest commit solves the problem

avatar infograf768
infograf768 - comment - 13 Mar 2018

Not working yet. Looks related to the slash

‘src’ attribute of <script> element is not a valid URI: “http://localhost:8888:8888\joomla-cms-fields-editor-codemirror/media/vendor/codemirror/lib/codemirror.min.js”

(can you Update branch?)

avatar dgt41
dgt41 - comment - 13 Mar 2018

@infograf768 can you fetch/pull and try again?

avatar infograf768
infograf768 - comment - 13 Mar 2018

Loading correctly now.
Reminder: You still have some debug code in FileLayout.php

avatar dgt41
dgt41 - comment - 13 Mar 2018

You still have some debug code in FileLayout.php

What do you mean? This PR is not touching any FileLayout.php

avatar infograf768
infograf768 - comment - 13 Mar 2018

maybe I did not express myself correctly.
When debug is on, I get this. But indeed it looks like it is voluntary and independant from your PR.

screen shot 2018-03-13 at 09 53 58

avatar dgt41
dgt41 - comment - 13 Mar 2018

@infograf768 that's the debug code for JLayouts, seems related to the PR but it shouldn't be. Do you get the same on the main repo?

avatar infograf768
infograf768 - comment - 13 Mar 2018

Yep, I do. No p.

avatar Anu1601CS
Anu1601CS - comment - 13 Mar 2018

@dgt41 Now its little bit fine.

screenshot from 2018-03-13 16-04-17
:) But some bug in height of input pane.

avatar dgt41
dgt41 - comment - 13 Mar 2018

@Anu1601CS more a css thing: https://stackoverflow.com/a/44954280

Ps the answer is the one below that one I shared (stupid mobile layout)

avatar C-Lodder
C-Lodder - comment - 13 Mar 2018

@dgt41 - Please put the XTD button back below the textarea. The textarea is the most important part of the edit view, so when those buttons stack on mobile, users will have to scroll down even further.

avatar dgt41
dgt41 - comment - 13 Mar 2018

The buttons will become dropdown similar to tinymce for all editors but cannot be done yet as we don’t have the dropdown custom element yet...
Also the buttons need a new API...
So please hold on here as this is the starting point, there are few more steps to get to the final version

avatar brianteeman
brianteeman - comment - 14 Mar 2018

When there is no wysiwyg toolbar the buttons should be at the bottom as they are less important than the editor

avatar dgt41
dgt41 - comment - 14 Mar 2018

Then according to this tinyMCE should get the button (all of them) in the bottom. Seriously now I try to make this consistent in all 3 core editors, but if people think that only tiny should get the xtd-buttons on the top toolbar and the rest should have a different ux/ui then that’s fine for me, let’s keep confusing people. Joomla is well known for this ?

avatar C-Lodder
C-Lodder - comment - 14 Mar 2018

Well if I were up to me, the TinyMCE toolbar would also be placed at the bottom too.

That said, people don't really switch between editors. They stick with the editor that suites them best. So if they're used to using Codemirror and having XTD buttons that the bottom, leave them there

avatar dgt41
dgt41 - comment - 14 Mar 2018

So if they're used to using Codemirror and having XTD buttons that the bottom, leave them there

In that sense let's revert the left menu to top because that is what ppl are used to?
I will always try to make things consistent, now if others don't care or think that this is a bad idea and it's acceptable to keep broken UX/UI, then fine. Will revert it back the 10 years old approach...

avatar C-Lodder
C-Lodder - comment - 14 Mar 2018

Dimitris, is a simple matter of prioritizing content. We did research on this area ages ago.

The sidebar menu is there because it fixes the issue in J3 where too many components is problematic. It actually fixes something, not just a random thing I initially did for the sake of it.

Please explain why having buttons on the bottom o the editor is a "10 year old approach"...I'm interested.

avatar infograf768
infograf768 - comment - 14 Mar 2018

I guess the best is to have the choice between top and bottom.

Examples:
I always have to scroll in frontend when saving an article because the Save buttons are at the bottom while I would prefer them on top.
Another one is when installing Joomla and choosing to install languages. Instead of having the Buttons on top AND bottom, they are only at the bottom, forcing to scroll that long list when the language you want to install is towards the top.

avatar dgt41
dgt41 - comment - 14 Mar 2018

I always have to scroll in frontend when saving an article because the Save buttons are at the bottom while I would prefer them on top.

Thats the reason in every other software the buttons are always on top

forcing to scroll that long list when the language you want to install is towards the top.

The problem there is that you have a very long page which in fact should be only one multiple selection field, so no scrolling at all.

Anyways, as I said before this is about consistency, but people like to have a messy Joomla so I'll revert these changes, np. Let's keep the bad UX which is the trademark of Joomla

avatar dgt41
dgt41 - comment - 14 Mar 2018

Reverted, enjoy the broken UX

a20e785 14 Mar 2018 avatar dgrammatiko paths
avatar brianteeman
brianteeman - comment - 14 Mar 2018

If only we had a UX team who could do some user testing

avatar dgt41
dgt41 - comment - 23 Mar 2018

@infograf768 @Anu1601CS can you please mark your tests here?

avatar laoneo
laoneo - comment - 5 Apr 2018

Would be good to have some tests here.

avatar Anu1601CS
Anu1601CS - comment - 5 Apr 2018

After I manually fix above issue and when i tried to install in subfolder
screenshot from 2018-04-05 18-13-37

avatar brianteeman
brianteeman - comment - 5 Apr 2018

@dgt41 you really need to switch your dev environment so that you are developing in a sub folder all this will keep happening again and again ;)

avatar dgt41
dgt41 - comment - 5 Apr 2018

The commit a5b1f7a is totally wrong I will revert it

avatar joomla-cms-bot joomla-cms-bot - change - 6 Apr 2018
Category JavaScript Repository Front End Plugins Layout JavaScript Repository Layout
avatar dgrammatiko
dgrammatiko - comment - 6 Apr 2018

@Anu1601CS can you confirm that the editor is ok now?

avatar Anu1601CS
Anu1601CS - comment - 6 Apr 2018

I have tested this item successfully on 95e949f

@dgrammatiko Now it's fine for me.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19890.

avatar Anu1601CS Anu1601CS - test_item - 6 Apr 2018 - Tested successfully
avatar laoneo laoneo - change - 11 Apr 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-11 06:36:03
Closed_By laoneo
avatar laoneo laoneo - close - 11 Apr 2018
avatar laoneo laoneo - merge - 11 Apr 2018
avatar zero-24
zero-24 - comment - 11 Apr 2018

@laoneo please make sure you assign prs to milestones ;-)

Add a Comment

Login with GitHub to post a comment