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

Discussion: Introduction to Modern Javascript and Tools #14355

Open
Piyush3079 opened this Issue Jun 3, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@Piyush3079
Contributor

Piyush3079 commented Jun 3, 2018

Hi Community,

I am Piyush Vijay, working on Introduction of Modern js and Tools into the phpMyAdmin javascript codebase as a Student developer under GSoC 2018.

I have made a pull request with some changes #14288

Requirements: node > 6.11.5 npm > 4.10.2 yarn 1.3.2

Steps to reproduce this pr into you local machine:
1). Edit config.default.php and change $cfg['CSPAllow'] to "http://localhost:3307 ws://localhost:3307".
2). Copy config.sample.inc.php to config.inc.php and uncomment line 25 and 31 and change $cfg['environment'] to 'development'.
3). Comment out lines fron 759 to 826.
4). Run yarn.
5). Run yarn dev:wds. This will start the webpack development server on 3307 port.
6). Run php server to serve php files and the open it in your browser.

How to verify changes:
1). There should be one file in script tag of head named index_new.js serving from http://localhost:3307/js/dist.
2). There should be chunk files dynamically loading on switching to page server_databases.php and server_privileges.php from the home page.
3). There shouldn't be any js file named server_databases.js and server_privileges.js.
4). An addition parameter test is added in new /src/ajax.js to check that only new ajax instance is used in new files which can be verified by consoling new ajax instance and look for the parameter test.
5). A debug statement is placed import_check which will be console every time a module is dynamically imported. This will help in ensuing that on going to same page again that module is not imported again.

Functionality broken:
Almost all the files except the two mentioned above have some functionality break.

Reason for functionality break:
We have commented the code of js/ajax.js which was attaching the event listener on every link and taking AJAX.AJAX.requestHandler as event handle function. Now new ajax js/src/ajax.js is attaching the event and using new AJAX.AJAX.requestHandler which is not in the scope of files other than the two js files mentioned.

@Piyush3079 Piyush3079 changed the title from Introduction to Modern Javascript and Tools to Discussion: Introduction to Modern Javascript and Tools Jun 3, 2018

@nulll-pointer

This comment has been minimized.

Contributor

nulll-pointer commented Jun 11, 2018

You still need help with this??

@Piyush3079

This comment has been minimized.

Contributor

Piyush3079 commented Jun 13, 2018

Actually I opened this discussion so that people can reproduce the pr and suggest changes. So if you have some suggestions regarding this pr, then you can comment :).

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