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

Refactoring history.js of the designer #15318

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
7 participants
@Bournvita1998
Copy link
Contributor

commented Jun 9, 2019

Signed-off-by: Mohit Kuri mohit.kuri@research.iiit.ac.in

Description

Removed vanilla js and added jQuery at several places

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.
Refactoring designer
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>

@Bournvita1998 Bournvita1998 referenced this pull request Jun 9, 2019

Closed

Refactoring designer #15314

6 of 6 tasks complete
@Bournvita1998

This comment has been minimized.

Copy link
Contributor Author

commented Jun 9, 2019

@shucon the same Travis build issue is still there. I will resolve that soon

Resolved Travis build errors
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
@Bournvita1998

This comment has been minimized.

Copy link
Contributor Author

commented Jun 9, 2019

I tried to resolve existing Travis build errors but now I am getting this error and I don't think I made any changes related to this is the file

Selection_043

Show resolved Hide resolved js/designer/history.js Outdated

Bournvita1998 added some commits Jun 10, 2019

Removed all travis error
Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>
Standard refactoring
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
@Bournvita1998

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2019

@williamdes @mauriciofauth @shucon @ibennetch

What else can we refactor here in history.js? Any suggestions?

@shucon

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

Fix failed tests 😛

@ibennetch
Copy link
Member

left a comment

Overall I think you're making good progress here. I'm worried that some of the lines are starting to get a little long and in general I'm not that concerned about turning two shorter lines in to one line line (such as around #94).

I don't see a whole lot more to change in this file.

Show resolved Hide resolved js/designer/history.js Outdated
Show resolved Hide resolved js/designer/history.js Outdated
Show resolved Hide resolved js/designer/history.js Outdated
Show resolved Hide resolved js/designer/history.js Outdated
Show resolved Hide resolved js/designer/history.js Outdated
@Bournvita1998

This comment has been minimized.

Copy link
Contributor Author

commented Jun 14, 2019

@ibennetch there is no specific reasoning behind merging 2 lines in 1, it's just that it is considered a good coding practice. But yeah the logical break is more important here.

Selection_044

By this way, it will satisfy both the situations mentioned here.
Should I do this or the earlier one (the one with the 2 lines) is fine?

@Bournvita1998

This comment has been minimized.

Copy link
Contributor Author

commented Jun 14, 2019

Any idea why CI is failing? (it's not failing for PHP7.1 but for all other versions it is)

@mauriciofauth

This comment has been minimized.

Copy link
Member

commented Jun 14, 2019

Any idea why CI is failing? (it's not failing for PHP7.1 but for all other versions it is)

It is fixed in master by 9102b98. You should rebase with master with want to fix these errors.

@Bournvita1998

This comment has been minimized.

Copy link
Contributor Author

commented Jun 14, 2019

Any idea why CI is failing? (it's not failing for PHP7.1 but for all other versions it is)

It is fixed in master by 9102b98. You should rebase with master with want to fix these errors.

Do we need to rebase this now itself or will we wait until the project gets completed?

@mauriciofauth

This comment has been minimized.

Copy link
Member

commented Jun 14, 2019

Do we need to rebase this now itself or will we wait until the project gets completed?

I forgot that this pull request is against a branch different than master, sorry for that.
Just ignore these errors for now.

@Bournvita1998

This comment has been minimized.

Copy link
Contributor Author

commented Jun 14, 2019

Do we need to rebase this now itself or will we wait until the project gets completed?

I forgot that this pull request is against a branch different than master, sorry for that.
Just ignore these errors for now.

Okay, So should I make the changes as per reviews and proceed further to other file?

logical division of single lines
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
@codecov

This comment has been minimized.

Copy link

commented Jun 14, 2019

Codecov Report

Merging #15318 into gsoc-db-designer will not change coverage.
The diff coverage is n/a.

@@                 Coverage Diff                 @@
##             gsoc-db-designer   #15318   +/-   ##
===================================================
  Coverage               52.72%   52.72%           
  Complexity              14071    14071           
===================================================
  Files                     484      484           
  Lines                   62131    62131           
===================================================
  Hits                    32760    32760           
  Misses                  29371    29371
@codecov

This comment has been minimized.

Copy link

commented Jun 14, 2019

Codecov Report

Merging #15318 into master will decrease coverage by 0.26%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #15318      +/-   ##
============================================
- Coverage     52.99%   52.72%   -0.27%     
- Complexity    14047    14071      +24     
============================================
  Files           481      484       +3     
  Lines         62011    62131     +120     
============================================
- Hits          32862    32760     -102     
- Misses        29149    29371     +222
@@ -141,8 +141,7 @@ DesignerHistory.andOr = function (index) {
} else {
historyArray[index].setAndOr(1);
}
var existingDiv = document.getElementById('ab');
existingDiv.innerHTML = DesignerHistory.display(0, 0);
$('#ab').innerHTML = DesignerHistory.display(0, 0);

This comment has been minimized.

Copy link
@devenbansod
@devenbansod
Copy link
Member

left a comment

@Bournvita1998 please fix all these changes w.r.t to our discussion on #15338

@@ -162,8 +161,7 @@ DesignerHistory.historyDelete = function (index) {
}
}
historyArray.splice(index, 1);
var existingDiv = document.getElementById('ab');
existingDiv.innerHTML = DesignerHistory.display(0, 0);
$('#ab').innerHTML = DesignerHistory.display(0, 0);

This comment has been minimized.

Copy link
@devenbansod
document.getElementById('query_where').style.zIndex = '103';
document.getElementById('query_where').style.visibility = 'visible';
document.getElementById('query_where').style.display = 'block';
$('#eQuery').value = historyArray[index].get_obj().getquery();

This comment has been minimized.

Copy link
@devenbansod

@Bournvita1998 Bournvita1998 changed the title Refactoring designer Refactoring history.js of the designer Jul 10, 2019

@phpmyadmin-bot

This comment has been minimized.

Copy link

commented on b5e1c45 Jul 10, 2019

This commit has an invalid Signed-Off-By line, please use your full name for legal compliance reasons.
Please check Developer's Certificate of Origin
Here is a valid example: Signed-off-by: Jane Smith <jane.smith@example.org>

@mauriciofauth mauriciofauth changed the base branch from gsoc-db-designer to master Jul 12, 2019

Removed hard-coded things and added jQuery
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.