Add custom Request card component#67
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a new standalone custom request card web component (custom-mit-request-card) intended to replace the out-of-the-box nde-request-card UI so the entire card is clickable, while delegating request behavior back to the host component.
Changes:
- Added
MitRequestCardComponent(template/styles/logic) that renders a fully clickable card and delegates actions to the host card instance. - Added unit tests covering click delegation logic and SVG cloning behavior.
- Registered the custom component mapping and hid the original
nde-request-cardvia theme styling.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/styles/mit-theme.scss | Hides the OOTB nde-request-card to avoid duplicate UI when the custom card is injected. |
| src/app/mit-request-card/mit-request-card.component.ts | Implements custom request card behavior, including click delegation and SVG extraction from host. |
| src/app/mit-request-card/mit-request-card.component.html | New card template making the full card keyboard/click interactive. |
| src/app/mit-request-card/mit-request-card.component.scss | New styling for the clickable card and icon. |
| src/app/mit-request-card/mit-request-card.component.spec.ts | Adds unit tests for click behavior and SVG cloning on init. |
| src/app/custom1-module/customComponentMappings.ts | Registers the new request card component mapping (nde-request-card-after). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Why these changes are being introduced: We wanted to change how the request card component displays so that the entire card is clickable rather than having a separate button inside the card for the request action. How this addresses that need: Adds a new custom request card component to replace the original. This new component receives an instance of the original request card component. This new component passes the original request card component's properties to its template and calls the parent component's methods to handle the request actions.
adamshire123
force-pushed
the
request-card
branch
from
July 15, 2026 16:23
96da231 to
398c07d
Compare
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
adamshire123
force-pushed
the
request-card
branch
from
July 15, 2026 18:28
f2f6dc5 to
925a131
Compare
Author
|
@djanelle-mit these changes are live here https://mit.primo.exlibrisgroup.com/nde/home?vid=01MIT_INST:NDE_DEV&lang=en |
djanelle-mit
approved these changes
Jul 16, 2026
djanelle-mit
left a comment
There was a problem hiding this comment.
Only two small non-blocking musings, but nothing critical.
This looks good to me otherwise!
moves the styles hiding the original request card to the component css. uses ng-deep to make this particular style apply globally
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.
Why these changes are being introduced:
We wanted to change how the request card component displays
so that the entire card is clickable rather than
having a separate button inside the card for the request action.
How this addresses that need:
Adds a new custom request card component to replace the original.
This new component receives an instance of the original request card component.
The original request card component's properties are passed to the new component's template and calls the parent component's methods to
handle the request actions.
Side effects of this change
Changes to the original request card component's properties and methods may prevent this component from displaying properly.
Relevant ticket(s)
https://mitlibraries.atlassian.net/browse/NDE-155