PublicLab.Editor icon indicating copy to clipboard operation
PublicLab.Editor copied to clipboard

Adding new module for Custom Inserts on PublicLab.org

Open keshav234156 opened this issue 4 years ago • 6 comments

As mentioned https://publiclab.org/wiki/inline-maps I think embedding it in

keshav234156 avatar Mar 12 '20 19:03 keshav234156

@jywarren Can you please give me a rough idea of how we can implement Maps with preset layers, Zoom level.

Because in the above example you have hosted a map on the Github page for the Unearthing layer. Do we need host Github page for every layer or is there another way around?

keshav234156 avatar Mar 12 '20 19:03 keshav234156

Also, how will we implement like Zoom level, Tag-filtered maps?

keshav234156 avatar Mar 12 '20 19:03 keshav234156

HI, I WANT TO ASK ARE U APPLYING TO OUTREACHY @keshav234156

developer22-university avatar Mar 14 '20 11:03 developer22-university

So, on https://publiclab.org/wiki/inline-maps it shows that there are Markdown extensions that we call "inline grids" on plots2, that look like: [map:_______] -- these get auto-converted along with Markdown into the interactive features. So, really what we need is a UI for generating these and inserting these strings. For a simple example, you can look at the button/popup for generating tables; it's a submodule of the Rich Text module here: https://github.com/publiclab/PublicLab.Editor/blob/master/src/modules/PublicLab.RichTextModule.Table.js

You click the button, choose height and width, and then it inserts the string for a Markdown table. In our case, we'd have a more complex UI to show the types of inline features we want, and then you'd click OK and it'd insert the corresponding string in the format specified in /inline-maps, that is, [map:________] where it'd substitute in the parameters that were selected in the form.

This is a bit convoluted i know but think of it as a "helper" which helps you write Markdown, essentially. The part for displaying the maps is already done and works, it's just hard for non-programmers to know the exact formatting and parameters for the inline grid "markdown extensions" so we are helping people step by step configure this stuff by choosing a map region, etc.

I'd probably start by just having people input the values in <input>s and get that working before doing a more complex UI which could include a draggable map. That way you could tackle the problem in separate modular parts, you know? Likewise, just focus on one basic type of inline content first, and build on that to add additional types.

Thanks!

jywarren avatar Mar 24 '20 14:03 jywarren

@shreyaa-s @NitinBhasneria @Shulammite-Aso I have made a wireframe to what @jywarren said. We can refine it more Screenshot_from_2020-03-26_00-13-16

For maps

Screenshot_from_2020-03-26_00-56-51

keshav234156 avatar May 07 '20 09:05 keshav234156

😄 awesome. and can draw on mockups from peoples' proposals as well - can someone copy those into here? Eventually (but not too fast!) you could move beyond wireframes to more interactive mockups using a tool like this: https://www.layoutit.com/build

jywarren avatar May 12 '20 21:05 jywarren