Skip to content

Add department 21T (Theater Arts) to DEPARTMENTS - #212

Open
zawan-ila wants to merge 3 commits into
mainfrom
anawaz/add-dept-21t
Open

Add department 21T (Theater Arts) to DEPARTMENTS#212
zawan-ila wants to merge 3 commits into
mainfrom
anawaz/add-dept-21t

Conversation

@zawan-ila

@zawan-ila zawan-ila commented Jul 23, 2026

Copy link
Copy Markdown

What are the relevant tickets?

Part of https://github.com/mitodl/hq/issues/5616

Description (What does it do?)

Adds 21TTheater Arts to the DEPARTMENTS constant so the department facet label renders for the new department.

Needs mitodl/mit-learn#3668 to go out before so that we can update mit-learn-api-axios properly.

How can this be tested?

To be tested with mitodl/mit-learn#3668. See the testing instructions for that PR

Additional Context

Once this is merged, we'll bump the version of course-search-utils in mitodl/mit-learn#3668 to include this change.

Add the 21T -> Theater Arts mapping so the department facet label
renders for the new department.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWziwfKikfpbH3DpfZUABM
@zawan-ila
zawan-ila marked this pull request as ready for review July 24, 2026 18:52
@zawan-ila
zawan-ila requested a review from Copilot July 24, 2026 19:04

Copilot AI 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.

Pull request overview

Adds a new MIT department code-to-label mapping so downstream consumers can render the department facet label for OCW courses tagged with 21T.

Changes:

  • Extend DEPARTMENTS with 21TTheater Arts for facet label rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The department validator checks against DepartmentEnum from the published
@mitodl/mit-learn-api-axios, which does not include 21T yet (the mit-learn
release that publishes it is blocked on this package - a circular
dependency). Allow 21T via PATCHED_DEPARTMENT_VALUES, cast to the expected
validator type. A cast is used rather than @ts-expect-error: a suppressed
error inside this object literal disables TypeScript's excess-property check
and would break the existing resource_category directive. Revert once
mit-learn-api-axios is published with the 21T department.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ktaufxca3bmtQ3L4qVwmsU
@zawan-ila
zawan-ila force-pushed the anawaz/add-dept-21t branch from d6d8615 to 7439b49 Compare July 31, 2026 11:40
The per-line cast made the department validator a multi-line value, which
broke key-spacing alignment (eslint) and fmt:check. Cast the const to the
DepartmentEnum value type instead, so the department entry stays a normal
single-line validator and passes lint / fmt:check / build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ktaufxca3bmtQ3L4qVwmsU

@mbertrand mbertrand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants