DigitalCommons / mykomap

A web application for mapping initiatives in the Solidarity Economy
3 stars 0 forks source link

Update pop up dialog contents for workers.coop #233

Closed ColmDC closed 4 months ago

ColmDC commented 5 months ago

Description

[workers.coop] Code the workers.coop pop up dialogs to display the data available for each co-op as follows

Left Side [Name] “Website” https://

“Industry” [Organisation extras: Industry Sector] “Sic Code” [Sic Code] “Ownership type” [Organisation extras: Ownership type] “Legal form” [Organisation extras: Legal Form] “Registered Number” [Registered Number] “Status” [Organisation extras: Registered Status]

[Organisation extras: Description]

Right Side Contact Street Address Supplemental Address 1
Supplemental Address 2
City
Postal Code Email

lin-d-hop commented 4 months ago

This sounds like it might be a good one to pair on for Marcel or Rohit to dive into MykoMaps.

Out of interest @wu-lee, does this happen in a config? How does this impact the intention of bringing together different MykoMaps under the same codebase?

wu-lee commented 4 months ago

Out of interest @wu-lee, does this happen in a config? How does this impact the intention of bringing together different MykoMaps under the same codebase?

Mykomap has a default pop-up dialogue, which because the base configuration is only a few fields like name, location and (possibly) description, can only really show those cases.

They way the pop-up is customised currently is to implement a call-back function. This accepts a reference to an object delivering access to most of Mykomap's internal APIs, and another representing the "initiative" for the pin in question (AKA the entity, typically an organisation). This call-back returns an HTML string which is then stuffed into the dialogue verbatim, and should use the appropriate CSS classes and styles accordingly.

In other words, it's a bit like programming your VCR via a panel which opens and exposes the wiring and PCBs - Good luck making sense of that! And remember to use rubber gloves.

Consequentially it's a typical pain-point for any new map. And upgrading any map, when that API changes. Plus some things are not trivial to implement. So there's a log of cut-and-pasting between maps, various bits of code get cannibalised from one project to another. Also, there's no documentation.

I've no love for it, but implementing something which can replace that - i.e what I think you mean by "bring together different Mykomaps" - needs to be able to cover all of (or a lot of the main) current and upcoming use-cases for field combinations: single and multi value; literal values and taxonomies; addresses comprised of multiple fields from a historical "normal" case which may in future cases be dependent on the source data; telephone numbers, emails and social media links, website URLs, descriptions in plain text, rich text, HTML. And so on.

Therefore it needs a bit of chin-stroking cogitation to tame this spiky free-for-all into something which is less of a nightmare and also delivers a pop-up which could replace most of the custom ones. I have some ideas, but I don't expect it to be a small amount of work.

ColmDC commented 4 months ago

So I think for the workers.coop dialog, would it not still be useful for one of them to follow you implementing it, so they have eyes on the current method. So not quite pair programming, but some knowledge sharing?

wu-lee commented 4 months ago

With the disclaimer that this might be hard to do quickly and clearly, I'm okay doing this if everyone else is.

ColmDC commented 4 months ago

With the disclaimer that this might be hard to do quickly and clearly, I'm okay doing this if everyone else is.

Given that the workers.coop project is way late and the ball is now in our court, I'd rather not do anything that slows it down much more. So @wu-lee please implement the workers.coop dialog but with someone looking over your shoulder if you can coordinate in next couple of days, but not necessarily them expecting to follow all your steps.

ColmDC commented 4 months ago

@wu-lee should this be in InProgress, or at least Dev Ready?

wu-lee commented 4 months ago

Yes - sorry. Discussion implied it was dev-ready I thought? Is it not?

wu-lee commented 4 months ago

Anyway, there is a map with populated pop-ups here now. Note, it has a link to a form for reporting errors, but the form is not there.

https://dev.maps.coop/workers-coop/

ColmDC commented 4 months ago

Yes - sorry. Discussion implied it was dev-ready I thought? Is it not?

From discussion, yes, but we are trying to keep the Kanban reflecting where each piece of work is at.

ColmDC commented 4 months ago

Did anyone shadow you working on the popup?

wu-lee commented 4 months ago

No, I just got on with it. Took some fiddling around, an attempt to tidy the code, and I needed to create the vocabs file(s), doesn't seem to be a SIC vocab, lots of lose ends. Not a great pedagogical opportunity, filing lots of rough corners.

wu-lee commented 4 months ago

SIC Code: this is listed as a required field on the panel. But: it has literally tens of thousands of terms. gov.uk use a slimmed down version, even then - thousands. So I'm inferring that probably it's the SIC Section field they actually want, which only has 20ish terms. But I still needed to make a vocab table for that, because I don't think that's a category Graham sent labels for.

ColmDC commented 4 months ago

So I'm inferring that probably it's the SIC Section field they actually want,

Assume that.

ColmDC commented 4 months ago

If an email is not present, the text undefined is displayed. Change to not displaying anything if no email is present.

wu-lee commented 4 months ago

If an email is not present, the text undefined is displayed. Change to not displaying anything if no email is present.

Ok, fix applied, try again.

I've also added the "about" text spec'ed in the document here. Is there a separate issue for that?

ColmDC commented 4 months ago

I've also added the "about" text spec'ed in the document here. Is there a separate issue for that?

I think only as tick boxed item half way down https://github.com/DigitalCommons/mykomap/issues/207#issuecomment-1836440395.

ColmDC commented 4 months ago

Happy for this to move to review.

ColmDC commented 4 months ago

4) Dialog size. On smaller (but not mobile) screens or when email addresses are long the email wraps. Should we reposition it to the wider panel, or widen the right panel, or increase the overal size of the dialog?

Yes- position just under the web address? then it may make more sense to change "contact" to "Address"

wu-lee commented 4 months ago

Email moved, title changed.

ColmDC commented 4 months ago

Great closing this.