Add department 21T (Theater Arts) to DEPARTMENTS - #212
Open
zawan-ila wants to merge 3 commits into
Open
Conversation
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
There was a problem hiding this comment.
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
DEPARTMENTSwith21T→Theater Artsfor 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
force-pushed
the
anawaz/add-dept-21t
branch
from
July 31, 2026 11:40
d6d8615 to
7439b49
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
Part of https://github.com/mitodl/hq/issues/5616
Description (What does it do?)
Adds
21T→Theater Artsto theDEPARTMENTSconstant 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.