-
Notifications
You must be signed in to change notification settings - Fork 206
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
Implementgroup #959
Implementgroup #959
Conversation
Code Climate has analyzed commit 3bdd866c and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## main #959 +/- ##
=========================================
+ Coverage 72.3% 73.34% +1.03%
=========================================
Files 40 40
Lines 1394 1388 -6
=========================================
+ Hits 1008 1018 +10
+ Misses 386 370 -16
|
implementation not done yet - but core part should be fixed |
current bug - images are unplacing from map on reload. I think because this ajax call isnt working. Have been receiving an error about since before I made any modifications saveImage: function () {
var img = this;
// reset change state string:
img._corner_state = JSON.stringify(img._corners);
// send save request
$.ajax('/images', {
type: 'PATCH',
data: {
warpable_id: img.warpable_id,
locked: (img.editing._mode == 'lock'),
points:
img.getCorner(0).lng + ',' + img.getCorner(0).lat + ':' +
img.getCorner(1).lng + ',' + img.getCorner(1).lat + ':' +
img.getCorner(3).lng + ',' + img.getCorner(3).lat + ':' +
img.getCorner(2).lng + ',' + img.getCorner(2).lat,
},
beforeSend: function (e) {
$('.mk-save').removeClass('fa-check-circle fa-times-circle fa-green fa-red').addClass('fa-spinner fa-spin')
},
complete: function (e) {
$('.mk-save').removeClass('fa-spinner fa-spin').addClass('fa-check-circle fa-green')
},
error: function (e) {
$('.mk-save').removeClass('fa-spinner fa-spin').addClass('fa-times-circle fa-red')
}
})
}, |
ok after updating the route to bug 2: after placing 2 images on the map, the first one you drag, regardless of placement order, is draggable immediately. the 2nd one will propagate to map it looks like and drag map instead. Then the 2nd time you click it it will drag. ^^ these 2 bugs are fixed here |
6e08d68
to
739d8c6
Compare
@jywarren this is ready for review! Can we try pushing this fix and then checking if it works because unstable is down? Fairly certain it will, and at the very least it fixes the feature group and really cleans up |
@jywarren ok so after watching your export demo I realized its obvious its not working when it says "warping 1 of 1" for what we thought should be multiple.. and I can confirm if that's fixed locally.. which it is! Had to make one small update but this is actually ready now. |
OMG this is awesome. It looks like you really dug into it and found another bug at I'm headed to Boston tomorrow to inspect the testing servers in person and get them online. In the meantime, if @cesswairimu @kaustubh-nair @alaxalves anyone else @publiclab/mapknitter-reviewers has any availability to test this out, as it's pretty big, I'd love some extra confirmations from local runs! Thank you and we'll aim to get this online in a test server tomorrow, and if that /doesn't/ happen, I'll test locally myself too and we'll merge. Thank you!!! |
@jywarren 🚀more changes to come after this (see pending) 👍 I am a little rusty on rails. |
@jywarren @alaxalves @kaustubh-nair @gauravano also this popper.js error won't go away but it doesn't prevent any functionality seems like any ideas what to do? Not urgent to solve here. |
Hi @sashadev-sky -- just checking if you're stuck here? Wasn't sure if your last comment meant we needed to wait. And now there is a conflict -- let's get that resolved and merge this? Thank you! |
@jywarren oh no this has been ready to merge for a while now!! As long as you reviewed it confirmed all functionality. I will rebase right now. The popper.js problem isnt from this PR and I was just asking a conceptual question. Also please note in publiclab/Leaflet.DistortableImage#425 I fixed an event propagation problem that came up when i started listening for singleclicks for the google mutant layer. Box selector is not currently working right without it. I would be happy to merge it and bump the version in this PR, or I can just fix in a new one. let m know! |
6eefdbe
to
3410ce6
Compare
@jywarren this is ready. just pushed to unstable to check it out. |
Great! Thank you, this is awesome. Let's let this go to stable, and on Friday Sebastian and I will try publishing it to production. Great work! |
@jywarren I made you a little summary page explaining why, in the end, I didnt add any validation hooks or anything besides a new migration to remove the defaults: |
this PR was driving me crazy ln because I didn't know we merged #777 so Travis was failing my build on tests that didn't exist for me locally 🤕 |
Yikes! Sorry about that Sasha, I am hoping we have fewer and fewer big
conflicting PRs now that a lot of the heavy lifting is complete. Thank you
so much for the summary and I'm glad we got this worked out. Do you think
now we've merged the login issue fix, we can publish this to production on
Friday? @alaxalves @kaustubh-nair @cesswairimu @divyabaid16 what do you
think? I'd like to see if the live synchronous editing comes online then.
…On Tue, Sep 10, 2019 at 6:48 PM Sasha Boginsky ***@***.***> wrote:
this PR was driving me crazy ln because I didn't know we merged #777
<#777> so Travis was failing
my build on tests that didn't exist for me locally 🤕
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#959?email_source=notifications&email_token=AAAF6J2G25LHGNMYJUKE3S3QJAPYTA5CNFSM4IOZOCZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6MXCCI#issuecomment-530149641>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J5IAIQIBLBGH46JOI3QJAPYTANCNFSM4IOZOCZA>
.
|
Yeeih 🙌 production on Friday sounds good.. Great work @sashadev-sky 🎈 |
Sounds nice to me!! |
@jywarren I think will be ready on Friday! Live synchronous editing will not work I am fairly sure. The code itself has a lot of bugs and it throws errors. Also a lot of code smells, it recopied the code in Map.js that was there before I updated it here. Mainly, heres the most problematic part: mapknitter/app/assets/javascripts/mapknitter/Map.js Lines 512 to 528 in bdab16c
The If i were to try to fix this, how would I test synchronous editing? Not familiar with how this works |
* h * h * updates * Fix featuregroup * checkout randomly modified file * Implementation * setupToolbar working * readOnly mode working * remove googleMutant * finalize * group.editing call * fix puma pidfile path, set it for development * review rebase * update schema.rb to fix DB setup and commands like migrate, setup, etc * delete obsolete config file * update example file * readd new line at end of file * remove left behind comment * add new line to file * bump ldi to 0.7.6 * commit data dump * remove db dump * update prod * return puma back to production * add new migration to avoid potential corruption * delete extra whitespace * re-run all edited migrations * update routes * remove defaults and set before_validations * update u to self * fix ||= space * reverse order reversal * bump LDI to 0.7.7 * remove warpable update hook * try now * before * modifications * update * remove before_validation hook for map * update incorrect syntax in tests
Didn't completely get this. I believe data function is necessary only when save request is completed. Only then should we go for the synchronisation part, right? The data which is being sent to the "success function" is required by the speak method...
|
what may be problematic in this part, is that when the synch editing code was being written the only change in the above that we were using the _corners[x] instead of getCorners(x). |
@sashadev-sky what do you think? |
Fixes #919 (<=== Add issue number here)
Fixes publiclab/Leaflet.DistortableImage#386
Fixes #996
Fixes #982
Fixes #703
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test
@publiclab/mapknitter-reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!
===========
changes:
setup is now just
this.setupMap()
andmap.addGoogleMutant()
from LDI.we initialize a collection group immediately after map setup with
this.setupCollection()
, and this is the only time we initialize it. Before our images were ending up in separate collection groups bc we were making a new one each time.we use the newly added
editable
option from LDIupdated
rotateBy
,scaleBy
to be called onimg
now instead of edit since we moved themfix Puma configuration file:
rails s
will run puma). I personally like puma its Rails 5 default need confirmation on this though! @jywarren @alaxalves @kaustubh-nairpidfile
path from pidfileapp/tmp/pids/puma.pid
->tmp/pids/puma.pid
manually updated db migrations that threw errors for mySQL. Dropped the database through mysql and ran
db:create db:migrate
to refresh theschema.rb
. This has fixed the errors associated withdb:migrate
rake db:migrate does not work #703 @kaustubh-nairApparently these were all broken bc a schema.rb created in Rails 4 has some internal settings that won't work with Rails 5: https://stackoverflow.com/questions/45925383/activerecordnoenvironmentinschemaerror#49651887
pending:
keydown
only fires when the first item in path is the map pane, then get rid of sidebar listener heresetCorners()
API instead of justimg._corners =
. Then standardize thesetCorner()
andsetCorners()
methods to fireedit
each time they are triggered. Remove theedit
fire fromonHandleDrag
. Doc this as event for customizing downstream.click
,mouseup
,touchend
to decide if image needs to be saved.setupEvents()
, I use theedit
event fired from LDIonHandleDragEnd
notes
=======