Git Product home page Git Product logo

Comments (19)

vidurangaw avatar vidurangaw commented on June 30, 2024

This is already there. Isn't it?

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

It asks for a combined one:

Map title/URL (you won't be able to change this)

additionally if we separate them, users will be able to change the title
although not the URL.

On Tue, Dec 23, 2014 at 4:57 PM, Viduranga Wijesooriya <
[email protected]> wrote:

This is already there. Isn't it?


Reply to this email directly or view it on GitHub
#43 (comment).

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

Ahh okay got it. When should I take the approval of the user for the url? What's the workflow?

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

So, perhaps:

  • user enters text title with fewer formatting rules
  • as theyre typing, javascript cleans and reformats the title text into a
    URL-compatible string that'll pass the validation:
    https://github.com/publiclab/mapknitter/blob/master/app/models/map.rb#L7
  • user tabs to or select next field -- the URL field -- and can adapt/edit
    it to their liking
  • user enters a location (this interaction itself needs some work)
  • save

On Tue, Dec 23, 2014 at 5:05 PM, Viduranga Wijesooriya <
[email protected]> wrote:

Ahh okay got it. When should I take the approval of the user for the url?
What's the workflow?


Reply to this email directly or view it on GitHub
#43 (comment).

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

Okay got it. I will do it. Can you assign me to this.

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

Hi Jeff,
I added this function by introducing new field called "url" to the map model. But there are lot of places in the app where it uses map.name to identify the maps, create images, in rxml files etc. We need to fix all of them. I may need your help regarding some of them.

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

Hi Vidurqnga, @manleyjster and I were talking about using the friendly_url
gem to do this... There's more discussion of it in the comments here:
justinmanley#1

And I also want to be sure you're working off the latest branch:

jywarren#181

This is a big integration project and I apologize if it wasn't clear what
our plans for the codebase were.
On Jan 11, 2015 2:06 AM, "Viduranga Wijesooriya" [email protected]
wrote:

Hi Jeff,
I added this function by introducing new field called "url" to the map
model. But there are lot of places in the app where it uses map.name to
identify the maps, create images, in rxml files etc. We need to fix all of
them. I may need your help regarding some of them.


Reply to this email directly or view it on GitHub
#43 (comment).

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

I followed your instructions in above comment in order to implement it.
So is it already implemented?
If you want, you can look at my implementation too. I can make a pull request.
I think I also have to merge the latest code

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

Its not already implemented, but I will take a look in a little bit and see
what we can do. Thanks!
On Jan 11, 2015 10:26 AM, "Viduranga Wijesooriya" [email protected]
wrote:

I followed your instructions in above comment in order to implement it.
So is it already implemented?
If you want, you can look at my implementation too. I can make a pull
request.
I think I also have to merge the latest code


Reply to this email directly or view it on GitHub
#43 (comment).

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

Hi, Viduranga - I can't find your code -- it doesn't seem to be here: https://github.com/vpowerrc/mapknitter/tree/viduranga could you make a branch with it called "map-url-fields" or something?

I'm sorry, when you didn't respond last time I didn't realize you were going to continue work on this branch. I think it's plausible (although I would have to look at the code) that you could:

a) pull the https://github.com/jywarren/mapknitter/tree/annotation-interface branch into a fresh local branch,
b) cherry-pick your map URL commits and merge them in on top of annotation-interface
c) submit a pull request

Or perhaps @manleyjster can suggest a better way.

The other issue is whether:

  1. we should adopt your code and ditch the friendly_id based plan
  2. we can integrate all or parts of friendly_id into your code, perhaps by letting friendly_id handle slug generation but using map.url to store it? Hard to say without seeing your code.
  3. we could substantially rewrite your code around friendly_id
  4. either approach can easily preserve old URLs with a database migration, where we save the currently auto-generated routes /maps/foo into either map.url or friendly_id-based saved URLs.

Apologies again, but if we adopt @manleyjster's recommendation to treat publiclab/mapkniter master as our edge branch (and the stable branch as the deployed code) , it'll be more clear to new contributors what to base their pull requests on. His suggestion makes a lot of sense in light of this situation. However, in the future, can I ask you to check in on the plots-dev discussion list as you work, which should also help to keep synced? Thanks so much for your work.

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

Hi Jeff,
I pushed my current changes without merging with https://github.com/jywarren/mapknitter/tree/annotation-interface to "map-url-fields" branch for now.
I will do the merge tomorrow.

As I said before there are lot places still need to be changed since now map is identified by the url column, not by the name column. I changed it in most of the places which I could understand. But I need help in some areas of the app.

No problem. First you can take a look at my code, then we can decide what to do.

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

Hi, Viduranga - i hope you saw my email to plots-dev -- I think the best
thing to do may be to rebase your changes on top of the upcoming
mapknitter2 code:

https://groups.google.com/forum/#!topic/plots-dev/9dWJqchfGPM

I also think it's worth it to use friendly_id, and after browsing the
documentation
, it
seems like that's possible. That means you could just use
Map.find('my-map') directly, which is cool. If you can rebase your changes,
would you consider attempting to integrate friendly_id also? Keep an eye
also on the "parameterize" function in ActiveRecord -- we def. want the
client-side slug generation you've written to work the same as
ActiveRecord's conversion if that's possible.

Jeff

On Sun, Jan 11, 2015 at 2:20 PM, Viduranga Wijesooriya <
[email protected]> wrote:

Hi Jeff,
I pushed my current changes without merging with
https://github.com/jywarren/mapknitter/tree/annotation-interface to
"map-url-fields" branch for now.
I will do the merge tomorrow.

As I said before there are lot places still need to be changed since now
map is identified by the url column, not by the name column. I changed it
in most of the places which I could understand. But I need help in some
areas of the app.

No problem. First you can take a look at my code, then we can decide what
to do.


Reply to this email directly or view it on GitHub
#43 (comment).

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

Great I will integrate friendly_id

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

Hi Jeff,
Map.find('my-map') kind of queries only work with friendly_id 5.0 or greater. Otherwise we need to use Map.friendly.find('my-map')
But friendly_id 5.0 depends on active-record 4.0
How should I proceed?

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

Map.friendly.find is fine! Thanks.
On Jan 15, 2015 1:13 AM, "Viduranga Wijesooriya" [email protected]
wrote:

Hi Jeff,
Map.find('my-map') kind of queries only work with friendly_id 5.0 or
greater. Otherwise we need to use Map.friendly.find('my-map')
But friendly_id 5.0 depends on active-record 4.0
How should I proceed?
Also shall I keep a separate column like "url" for the slug(like I already
did) or use the same "name" column and use friendly_id to parameterize it
whenever we want?


Reply to this email directly or view it on GitHub
#43 (comment).

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

Hi again
I was able to integrate friendly_id successfully. Then I cherry picked my commits like you suggested. But there were about 25 conflicts. So I decided to redo my changes on the new branch since some views were also changed. I will send a pull request as soon as possible.
Cheers

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

super!

On Thu, Jan 15, 2015 at 2:04 PM, Viduranga Wijesooriya <
[email protected]> wrote:

Hi again
I was able to integrate friendly_id successfully. Then I cherry picked my
commits like you suggested. But there were about 25 conflicts. So I decided
to redo my changes on the new branch since some views were also changed. I
will send a pull request as soon as possible.
Cheers


Reply to this email directly or view it on GitHub
#43 (comment).

from mapknitter.

vidurangaw avatar vidurangaw commented on June 30, 2024

I made a pull request jywarren#182

from mapknitter.

jywarren avatar jywarren commented on June 30, 2024

merged into the master development branch, thanks!

from mapknitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.