Glossary Added#370
Conversation
|
Looking at potential conflicts (running
Things to do in reusable branch and other repos:
For the /glossary route and menu item:
|
|
@Abhishekfm Thanks for the changes. I've squashed your commits. I also for now added the user manual link directly into glossary-header-nav, to avoid the conflict with consts.ts. If you don't want these changes, we can re-push 7165c83 to restore the previous history. |
|
I updated my above comment with the to-do list for the reusable branch, and pre-emptively made a few changes to that branch, and to https://github.com/open-contracting/ids-drr-branding-types and https://github.com/open-contracting/ids-drr-india-branding, so that once this is merged it'll be easier to integrate. |
|
@jpmckinney Thanks this is a big help. I’m fine keeping the user manual link hardcoded in glossary-header-nav for now. Also, thanks for squashing the commits; I’ll sync my local branch |
|
I've resolved the conflicts and added a commit for the to-do items in my earlier message. I followed this style guide for message keys: https://github.com/CivicDataLab/IDS-DRR-Frontend/blob/dev/locales/STYLE.md |
…analytics components and tailwind config update for node_modules ids-drr-branding
…analytics components and tailwind config update for node_modules ids-drr-branding
…c for branding-stub, and clean up glossary types and functions
|
@Abhishekfm I'm thinking about how to make the glossary configurable. I think the simplest approach is for the branding packages to read a CSV into a string, which this repo then parses, etc. I have a draft solution locally, but we'll need to coordinate development since we're touching the same files. |
|
Also, are you running an old version of data-management? You changed There are changes that are unrelated to the glossary in these files that relate to that String -> Int change:
Ideally we would keep the PR focused on the glossary and make a separate PR for other changes. |
|
By the way, you added public/robots.txt and public/sitemap*.xml to .gitignore, but those files are no longer generated, as we moved off of next-sitemap in 688b759. You can just delete those files from your local development copy. |
|
Since we are on very different time zones, to help keep things moving, I'm committing my draft solution to making the glossary configurable, but we can revert it by rewriting history if needed. If you pull ids-drr-india-branding, you'll get the glossary.csv which is now committed there. (By the way, I can transfer that repo whenever - I just need to know who is doing the transfer so I can give you permission to move it.) We should still address the issues about the data-management integration in my earlier comment. |
This replaces the previous CSV pipeline. Branding packages now ship a glossaryCsv string, and the frontend reads, parses, and statically renders it. Future deployments only need a CSV in their branding's data/: no generator script, no committed generated file. Refactor scripts/generate-glossary.ts - Refactor main() into parseGlossary() - Move parseCsv() to lib/glossary.ts - Inline toRelatedTerms() into parseGlossary() - Rename buildDisasterDifferences() to buildDisasterMethodology() Refactor glossary/index.tsx - Move slugifyGlossaryTerm() to lib/glossary.ts - Move glossaryTags computation into uniqueTags() in components/glossary/glossary-client.tsx - Drop the GlossaryIndexItem/GlossaryItem split; the client component consumes the full GlossaryTerm[] directly Other: - The GlossaryTerm contract moves to ids-drr-branding-types with fields mirroring the section headings (summary, definition, methodology, usage, significance, interpretation, disasterMethodology, related, misinterpretation) - features.glossary is now derived from glossaryCsv truthiness rather than being a separate boolean in the branding config - Remove the dead "couldn't load details" error UI and its glossary.detail.error message key - Drop ts-node dev dependency and its knip ignoreDependencies entry (its only consumer was the deleted generate:glossary script) - Drop the branding-stub/src/index.ts knip ignore entry; knip can trace the file: link without help
|
Thanks @jpmckinney for the updates and for pushing the branding CSV approach on feat/glossary.
|
|
@jpmckinney For branding repos, Please Grant repo permission to @saurabhlevin or @Deepthi-Chand . |
No description provided.