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

Closed

Conversation

@Bournvita1998
Copy link
Contributor

@Bournvita1998 Bournvita1998 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.
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
@Bournvita1998 Bournvita1998 mentioned this pull request Jun 9, 2019
6 tasks
@Bournvita1998
Copy link
Contributor Author

@Bournvita1998 Bournvita1998 commented Jun 9, 2019

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

Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
@Bournvita1998
Copy link
Contributor Author

@Bournvita1998 Bournvita1998 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

js/designer/history.js Outdated Show resolved Hide resolved
Signed-off-by: Bournvita1998 <mohit.kuri@research.iiit.ac.in>
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
@Bournvita1998
Copy link
Contributor Author

@Bournvita1998 Bournvita1998 commented Jun 10, 2019

@williamdes @mauriciofauth @shucon @ibennetch

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

@shucon
Copy link
Contributor

@shucon shucon commented Jun 11, 2019

Fix failed tests 😛

Copy link
Member

@ibennetch ibennetch 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.

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 Show resolved Hide resolved
@Bournvita1998
Copy link
Contributor Author

@Bournvita1998 Bournvita1998 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
Copy link
Contributor Author

@Bournvita1998 Bournvita1998 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
Copy link
Member

@mauriciofauth mauriciofauth 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
Copy link
Contributor Author

@Bournvita1998 Bournvita1998 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
Copy link
Member

@mauriciofauth mauriciofauth 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
Copy link
Contributor Author

@Bournvita1998 Bournvita1998 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?

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

@codecov codecov bot 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
Copy link

@codecov codecov bot 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);
Copy link
Member

@devenbansod devenbansod Jul 7, 2019

@Bournvita1998 same here

Copy link
Member

@devenbansod devenbansod 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);
Copy link
Member

@devenbansod devenbansod Jul 7, 2019

@Bournvita1998 same here (ref: #15338)

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();
Copy link
Member

@devenbansod devenbansod Jul 7, 2019

@Bournvita1998 same here (ref: #15338)

@Bournvita1998 Bournvita1998 changed the title Refactoring designer Refactoring history.js of the designer Jul 10, 2019
@mauriciofauth mauriciofauth changed the base branch from gsoc-db-designer to master Jul 12, 2019
Signed-off-by: Mohit Kuri <mohit.kuri@research.iiit.ac.in>
@williamdes williamdes added this to To do in pull-requests Aug 20, 2019
@williamdes williamdes moved this from To do to To merge in pull-requests Aug 20, 2019
@williamdes williamdes moved this from To merge to GSOC in pull-requests Aug 20, 2019
@stale
Copy link

@stale stale bot commented Sep 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 16, 2019
@stale stale bot closed this Sep 23, 2019
pull-requests automation moved this from GSOC to Done Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
pull-requests
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants