smrose / ps

Pattern Sphere application, part of the Public Sphere Project.
0 stars 0 forks source link

specify order of PG pattern languages? #21

Open publicsphere opened 2 months ago

publicsphere commented 2 months ago

Here's the pattern language order I'd prefer — if there's a relatively easy fix — and sufficient time to change it.

Framework / Ontology Post-Growth HCI Related Domains Liberating Voices Enabling Patterns PGHCI Member Proposals

smrose commented 2 months ago

I don't have a design for how to do this ATM, but I'll add to the context the details of how the assess() function does this now, having just investigated. TLDR: there is no explicit action taken to set the order of languages in the form.

This line fetches an array of arrays representing the planguage records for languages that are used in the project: $planguages = GetProjPLanguages($project['id']); There is no table that links planguage records to a project - rather, there is a projpattern table that links pattern records to a project, and as each pattern has an associated planguage, we get that information indirectly. Then, to build the form, we loop on planguage in an outer loop and pattern in an inner loop, skipping patterns that are in a different planguage.

Given that there is no process of explicitly selecting planguages, the obvious idea of selecting an order for them directly won't apply. There could be a sort of kludge where an ordered list of the planguage.title or planguage.id values are stored with a project and then used to specify the order. That would be fast to market but not in any way pretty.