Correct two headers that still called the shared rollup a copy
Some checks are pending
build-gate / build (push) Waiting to run
Some checks are pending
build-gate / build (push) Waiting to run
Both tab components' file headers said the region grouping was a COPY of DX-life's countries-meta.ts "not an import", one of them attributing it to the other tab. That was true when it was written — their file is a .ts module with a Nuxt-only COUNTRIES import that cannot resolve outside that app — and it stopped being true when the file was ported to library/utils/countries-meta.js. Both tabs import summarizeRegions and PEOPLE_GROUP_LIST_FIELDS from there now, and grep finds exactly one definition in the repo. Worth the edit because a comment that still describes the old shape is worse than no comment: the next reader would have duplicated the rollup a third time on its authority, and one of the headers told them to copy it from the other tab. "Kept field-for-field identical so both tabs roll up the same way" is also no longer a discipline anyone has to maintain — it is the same function.
This commit is contained in:
parent
6d4abe58cc
commit
dfe49b4685
2 changed files with 16 additions and 5 deletions
|
|
@ -18,9 +18,11 @@
|
|||
* WITH NO SELECTION it shows every region compared against each other, so the tab is meaningful
|
||||
* standalone (and on first paint, before anything has been clicked) rather than an empty state.
|
||||
*
|
||||
* SOURCE for the grouping logic: regions-list.vue's summarizeRegions(), itself a copy of DX-life's
|
||||
* config/countries-meta.ts. Copied rather than imported for the same reason stated there — and
|
||||
* kept field-for-field identical so both tabs roll up the same way.
|
||||
* SOURCE for the grouping logic: library/utils/countries-meta.js — the port of DX-life's
|
||||
* config/countries-meta.ts. BOTH tabs import summarizeRegions and PEOPLE_GROUP_LIST_FIELDS from
|
||||
* there, so "kept field-for-field identical" is no longer a discipline anyone has to maintain: it
|
||||
* is the same function. This paragraph previously said the logic was copied from regions-list.vue
|
||||
* rather than imported, which was true before the port and false afterwards.
|
||||
*/
|
||||
import { inject, ref, computed, onMounted, onBeforeUnmount, watch } from 'vue'
|
||||
import { useShadowStyles } from '@map/composables/useShadowStyles.js'
|
||||
|
|
|
|||
|
|
@ -19,8 +19,17 @@
|
|||
* the same wagf_region / country_code fields the Nuxt route reads, so grouping happens here,
|
||||
* client-side, using the identical fields (PEOPLE_GROUP_LIST_FIELDS) and the identical rollup
|
||||
* shape (one row per country, rolled into one card per region) as countries-meta.ts's
|
||||
* summarizeRegions(). This is a COPY of that grouping logic, not an import — DX-life's file is
|
||||
* a .ts module with a Nuxt-only COUNTRIES import that cannot resolve outside that app.
|
||||
* summarizeRegions().
|
||||
*
|
||||
* ★ AND IT IS NOW ONE IMPLEMENTATION, NOT A COPY. This paragraph used to say the grouping was a
|
||||
* COPY of countries-meta.ts "not an import", because DX-life's file is a .ts module with a
|
||||
* Nuxt-only COUNTRIES import that cannot resolve outside that app. That was true when it was
|
||||
* written and it stopped being true when the file was ported to
|
||||
* library/utils/countries-meta.js: BOTH tabs now import summarizeRegions and
|
||||
* PEOPLE_GROUP_LIST_FIELDS from there, and grep finds exactly one definition in the repo.
|
||||
* Corrected because a comment that still describes the old shape is worse than no comment — the
|
||||
* next reader would have duplicated the rollup a third time on its authority. When a comment and
|
||||
* the code disagree, the comment is the one to distrust.
|
||||
*
|
||||
* EVENT CONTRACT (for the shell that nests this element — see RESULT-regions-list-element.md):
|
||||
* region-selected { slug, value, label, countryCount, count } — region heading clicked
|
||||
|
|
|
|||
Loading…
Reference in a new issue