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

Improving designer #15165

Closed
wants to merge 5 commits into from
Closed

Conversation

Bournvita1998
Copy link
Contributor

@Bournvita1998 Bournvita1998 commented Apr 8, 2019

Description

#15163
Signed-off-by: Bournvita1998 mohit.kuri@research.iiit.ac.in

Refactored 2 JS files of Designer

Fixes #

Before submitting pull request, please review the following checklist:

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch. For example, for bug fixes in a released version use the corresponding QA branch and for new features use the master branch. If you have a doubt, you can ask as a comment in the bug report or on the mailing list.
  • Every commit has proper Signed-off-by line as described in our DCO. This ensures that the work you're submitting is your own creation.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.
  • Any new functionality is covered by tests.

Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>
@williamdes
Copy link
Member

@Bournvita1998 I see that you have made great improvements, can you fix https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/517394475#L645 before I review the PR please ?

@@ -2,8 +2,7 @@ var designer_tables = [{ name: 'pdf_pages', key: 'pg_nr', auto_inc: true },
{ name: 'table_coords', key: 'id', auto_inc: true }];

var DesignerOfflineDB = (function () {
var designerDB = {};
var datastore = null;
var designerDB = {}, datastore = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should split var declarations into multiple statements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remembered that we should not declare the variables in multiple lines as per good coding practices. But found that its wrong :(. Thus reverted the changes. Also due to the same reason its showing linting error (which I have removed rn, will be displayed in the new commit).

document.getElementById('query_where').style.zIndex = '103';
document.getElementById('query_where').style.visibility = 'visible';
document.getElementById('query_where').style.display = 'block';
$("#eQuery").value = history_array[index].get_obj().getquery(); // get_obj(),get_query might be removed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why replace document.getElementById with the jQuery ID selector?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to convert some of the JS into jQuery while refactoring the code. Should I continue doing this in this PR itself or should I create a new one?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I want to know is, for example in the #eQuery case, what are the advantages in using jQuery instead of using plain JavaScript?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MauricioFauth I would like to suggest that if you hadn't looked my proposal on "Refactoring and Improving Designer" till now, please have a look at that you will definitely find the answer for "what are the advantages in using jQuery instead of using plain JavaScript?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MauricioFauth
Copy link
Member

Hello. Thanks for your contribution!

We require a full name for legal compliance reasons. Could you use your full name in the signature tag?
For example: Signed-off-by: Jane Developer <jane@example.org>

See Developer's Certificate of Origin

Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>
Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>
@codecov
Copy link

codecov bot commented Apr 10, 2019

Codecov Report

Merging #15165 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #15165      +/-   ##
============================================
+ Coverage     52.82%   52.83%   +0.01%     
  Complexity    14044    14044              
============================================
  Files           485      485              
  Lines         62139    62131       -8     
============================================
+ Hits          32826    32829       +3     
+ Misses        29313    29302      -11

@Bournvita1998
Copy link
Contributor Author

@williamdes If everything is fine, should I go ahead with other changes?

@williamdes
Copy link
Member

@Bournvita1998 I would say yes, @MauricioFauth do you agree ?

@Bournvita1998 Bournvita1998 changed the title refactored 2 files as of now Improving designer Apr 12, 2019
Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>

Improved the performance of all the JS files of the designer and imrpoved the names of the new variables used.
@Bournvita1998
Copy link
Contributor Author

@williamdes I am done with all the changes, please review.

@Bournvita1998
Copy link
Contributor Author

@williamdes @MauricioFauth I am thinking of closing this PR and create new PRs in a step by step manner as mentioned in my proposal. Its because I will be working on the designer project this summer. Should I go ahead?
Also, can you please review my proposal and suggest any changes if required?
https://docs.google.com/document/d/16rg0DImKFuW_dwxGXbgncJQ0NjZuglXVkRF2rUPzrwA/edit?usp=sharing

@williamdes
Copy link
Member

@Bournvita1998 I agree, good proposal !

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

Successfully merging this pull request may close these issues.

None yet

4 participants