Skip to content

Show term sets, shorten long choice lists, and edit descriptions in the Contents summary - #41

Merged
Gabriel Mongefranco (gabrielmongefranco) merged 4 commits into
mainfrom
fix/columns-and-descriptions
Oct 23, 2026
Merged

Gabriel Mongefranco (gabrielmongefranco) merged 4 commits into
mainfrom
fix/columns-and-descriptions

Conversation

@gabrielmongefranco

@gabrielmongefranco Gabriel Mongefranco (gabrielmongefranco) commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request fixes three problems in Contents and updates the data dictionary to format 1.1. The new format adds a sheet that describes each value set and adds generic columns that other data sources can use, not only SharePoint. The format is described in the new docs/data-dictionary.md.

Fixes #36
Fixes #37
Fixes #38

Changes

Managed metadata columns (#37)

  • Lookup list showed a list ID for managed metadata and Enterprise Keywords columns. They read from TaxonomyHiddenList, a hidden list that the report leaves out. Sitenalyzer now also reads the names of the site's hidden lists, and TaxonomyHiddenList from the top-level site, because a subsite doesn't have its own copy. Lookup list now shows the list's name.
  • The Columns tab has a new Term set column. It appears only for lists that have a managed metadata column.
    • A term set in the site collection's term groups links to that term set in Taxonomy.
    • Other term sets are shown by name without a link, because Taxonomy doesn't show them. Sitenalyzer reads their names from the term store, up to 50 per report.
    • Enterprise Keywords shows Keywords, with no link.
    • A term set that can't be read shows Not read.
    • When a column offers only the terms under one term, a second line names that term, such as "Starts at Treatment".
  • With Show technical details on, a Term set ID column shows each term set's ID.
  • The printed report adds a Term set column for lists that have a managed metadata column, and a Term set ID column to the technical details of their columns.

Term names and synonyms

  • Terms are named by their label in the term store's default language. Before, a term store with several languages could show a translation as a term's name.
  • A term set's terms table has a Synonyms column when any term has synonyms. The printed report has it too, and Search this report finds a term by its synonyms. Values that look like personal information are hidden in synonyms, as in names.

Data dictionary format 1.1 (#37)

The change only adds things, so tools that find sheets and columns by name keep working. format_version in Export_Info is now 1.1.

  • New sheet Value_Set_Definitions, right after Value_Sets, with one row per value set. Stewards stays the last sheet. Its columns are: value_set_id, value_set_name, description, asset_id (where the values are kept), values_listed and hierarchy_listed (All, Some, or None), standard_code_system, status, and notes.
  • Every coded column has a value_set_id, and every value_set_id has a definition row.
    • A term set uses its own ID instead of a made ID such as VS_000003.
    • The site collection's own term sets are listed in full, even when empty, so a term set can be made again on another site.
    • Shared term sets, Keywords, a term set whose name couldn't be read, and a column whose term set couldn't be read get a definition with values_listed None. Their terms aren't listed, and notes says why.
  • Fields adds three columns at the end:
    • multi_valued: Y for MultiChoice, LookupMulti, UserMulti, and multi-value managed metadata columns.
    • value_set_root_code: the term a managed metadata column starts at.
    • allows_other_values: from a choice column's fill-in setting, Y for Enterprise Keywords, and blank for other columns.
  • Value_Sets adds parent_value_code and synonyms at the end.
    • A pinned term lists both parents, first the one it is listed under.
    • hierarchy_listed says when parents couldn't be read, so a blank parent isn't mistaken for a top-level term.
  • The term set is no longer written into Fields notes.
  • TaxonomyHiddenList: each managed metadata column has a Lookup relationship to TaxonomyHiddenList, and TaxonomyHiddenList has an Assets row. The term store asset row is now written whenever a value set is kept there, even when the site has no term groups of its own.
  • Fix: Fields rows wrote Unknown in sensitivity and left contains_pii blank, one column off from Sources and Assets. They now leave sensitivity blank and write Unknown in contains_phi and contains_pii.
  • Rows for Fields, Value_Sets, Value_Set_Definitions, and Relationships are now built by column name, so a value can't land in the wrong column.

Long choice lists (#38)

  • Choices now appears only when Show technical details is on.
  • A column with more than 5 choices shows the first 5, then a Show all 7 button (the number is the column's total). That button changes to Show fewer. It keeps keyboard focus, sets aria-expanded, and has a hidden label that names the column for screen readers.
  • The printed report still shows every choice.

Descriptions in the Contents summary (#36)

  • The tables for document libraries, lists, and system lists in the Contents summary now have an edit button for each description. The button uses the same editor as the Overview tab, and it appears only for people who can manage the site.

Docs

  • New docs/data-dictionary.md, linked from README.md and docs/README.md, describes every sheet and column. It covers the rules for reading the format, the versioning rules, what changed in 1.1, the 1.0 correction, and how SharePoint fills the format.
  • docs/usage.md covers the Term set column and its starting term, synonyms, choices, and editing descriptions from the summary.
  • docs/architecture.md lists the new requests and how the data dictionary is built.
  • docs/development.md lists the new tests.

What I checked

  • Ran bash build.sh and .\build.ps1. They write the same sitenalyzer.js and sitenalyzer.css.
  • Ran npx playwright test.
    • 206 passed with 4 workers.
    • With the default number of workers, a different unrelated test timed out on each of two runs. Each passed when run again alone. These tests use no data dictionary or taxonomy code.
  • The tests cover:
    • The lookup list name, each kind of term set, the term set link, the starting term on screen and in print, and the Term set ID column.
    • Synonyms on screen, in search, in print, and in the workbook, the main label's language, and hidden values in synonyms.
    • The 1.1 headers, the privacy column fix, and multi_valued and allows_other_values.
    • Parent codes with a pinned term, and hierarchy_listed and values_listed when terms or parents were only partly read.
    • Keywords, an unreadable term set name, a column whose term set couldn't be read, and term groups that couldn't be read.
    • That every value_set_id has one definition and every definition's asset is in Assets.
    • Show all and Show fewer, and the summary's description editor.
  • CSP check: the code adds no inline scripts, no inline event handlers, and no javascript: links.
  • git diff --check found no problems.

Needs a check on a real site

I couldn't test this on a real SharePoint Online site. Someone should open one and check:

  • Enterprise Keywords and a managed metadata column from a shared term set, on a top-level site and on a subsite: what Lookup list and Term set show, and the TaxonomyHiddenList row in the data dictionary.
  • Whether the Enterprise Keywords column names a term set. If it does, its value set uses that term set's ID instead of a made ID.
  • That adding FillInChoice to the columns request works on a real site. It belongs to the same column type as Choices, which the request already reads.

Already checked on SharePoint Online: a column limited to one term lets people choose only the terms under it, not that term itself. The format reference says so.

Follow-ups

  • allows_other_values for managed metadata columns other than Enterprise Keywords. This needs the column's fill-in setting, which Sitenalyzer doesn't read yet.
  • A way to tell a list whose columns couldn't be read from a list with no columns in the data dictionary.
  • enforced on Relationships is always Y. SharePoint enforces a lookup only when the lookup's relationship setting says so.

…he Contents summary

Managed metadata columns showed a list ID in Lookup list, because the list
they read from, TaxonomyHiddenList, is hidden and the report leaves hidden
lists out. Sitenalyzer now reads the names of the site's hidden lists, and
TaxonomyHiddenList from the top-level site, so Lookup list shows a name.

The Columns tab has a new Term set column for lists with managed metadata
columns. A term set in the site collection's term groups links to it in
Taxonomy. Other term sets, such as the Keywords term set of Enterprise
Keywords, are named without a link, and a term set that can't be read says
Not read. With technical details on, Term set ID shows the ID. The printed
report adds a Term set column for those lists.

Choices now show only with technical details on. A column with more than 5
choices shows the first 5 and a Show all button. The printed report still
shows every choice.

The document library, list, and system list tables in the Contents summary
now have the same edit button for descriptions as the Overview tab, for
people who can manage the site.

The data dictionary's sheets and columns are unchanged.

Fixes #36, #37, and #38.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T19:40:09.217739Z 2671c80 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4652f9718

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread src/sitenalyzer.js Resolved
…ts in the data dictionary

The data dictionary had no link from a managed metadata column to the
hidden list it reads from, and it named a column's term set only when the
term set was in the site collection's term groups.

- Assets gets one row for TaxonomyHiddenList when a managed metadata
  column reads from it. Its address is in the top-level site when the
  site is a subsite.
- Relationships gets one Managed metadata row for each managed metadata
  column, to that list: M-1, or M-M for a column that allows several
  values.
- The Fields notes column names each managed metadata column's term set
  and gives its ID. For a term set outside the site collection's term
  groups, such as a shared term set or Keywords, the note says its terms
  aren't listed in Value_Sets. Values that look like personal information
  are hidden in the term set name.

Value_Sets is unchanged: it lists the terms of the site collection's own
term sets only. The sheets and their columns are unchanged.

The printed technical details of a list's columns now include each
column's term set ID when the list has a managed metadata column.
…y columns

The data dictionary wrote each managed metadata column's term set into the
Fields notes as text, and it could not show nested terms, a column that
starts at one term, or a term set whose terms aren't listed. This change
moves that information into real columns, named so that other data sources
can use the same format. The format is now version 1.1, described in the
new docs/data-dictionary.md.

Data dictionary (format 1.1):
- A new Value_Set_Definitions sheet, right after Value_Sets, has one row
  per value set: its ID, name, description, the asset that keeps it, and
  whether its values and parents are listed (values_listed and
  hierarchy_listed: All, Some, or None). Stewards stays the last sheet.
- Every coded column now has a value_set_id. A term set uses its own ID.
  Shared term sets, Keywords, and term sets that couldn't be read get a
  definition with values_listed None, and their terms aren't listed.
- Fields adds multi_valued, value_set_root_code (the term a column starts
  at), and allows_other_values (a choice column's fill-in setting, and Y
  for Enterprise Keywords). The notes column no longer holds the term set.
- Value_Sets adds parent_value_code and synonyms.
- Managed metadata relationships use the type Lookup.
- Fields rows now write Unknown in contains_phi and contains_pii and leave
  sensitivity blank. Version 1.0 wrote these one column off.
- Rows for Fields, Value_Sets, Value_Set_Definitions, and Relationships
  are built by column name, so a value can't land in the wrong column.

On screen and in print:
- Terms take their name in the term store's default language. A term
  set's terms table has a Synonyms column when any term has synonyms,
  and search finds a term by its synonyms.
- The Columns tab says which term a managed metadata column starts at,
  such as "Starts at Treatment".
A test on SharePoint Online showed that a managed metadata column limited to
one term lets people choose only the terms under it, not that term itself.
The data dictionary format reference now says so for value_set_root_code.
@gabrielmongefranco
Gabriel Mongefranco (gabrielmongefranco) merged commit d911699 into main Oct 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

1 participant