feat: add ProvidedBy component for resource attribution#692
Open
icycoldveins wants to merge 6 commits intodevelopfrom
Open
feat: add ProvidedBy component for resource attribution#692icycoldveins wants to merge 6 commits intodevelopfrom
icycoldveins wants to merge 6 commits intodevelopfrom
Conversation
Add Provider type to ResourceEntry and create ProvidedBy component that displays organization attribution with logo/name support. Supports multiple providers with "+X more" overflow handling.
- Add Share Food Program logo as local asset for testing - Implement image fallback to Avatar when logo fails to load - Increase logo size to 40x40 for better visibility - Position ProvidedBy below Last Modified section
Logo resolution now checks both provider.logo_url and a local mapping by provider name. This allows storing logos as local assets while keeping provider data simple (just name and url).
Component now only displays when resource.providers has actual data.
RNR1
reviewed
Jan 28, 2026
|
@vontell FYI on the discussion above:
|
RNR1
reviewed
Feb 4, 2026
| return ( | ||
| <ListItem key={`${provider.name}-${index}`}> | ||
| <ListItemAvatar sx={{ minWidth: 48 }}> | ||
| {shouldShowImage(logoUrl) ? ( |
Contributor
There was a problem hiding this comment.
nit: The usage of box wrapping an img element is a bit non-standard, but it might make more sense as an implementation detail for an ImageWithInitialsAvatarFallback component
| <Stack gap={1}> | ||
| {visibleProviders.map((provider, index) => ( | ||
| <div key={`${provider.name}-${index}`}> | ||
| {renderProviderItem(provider)} |
Contributor
There was a problem hiding this comment.
once this is a separate component, call this as a JSX element instead of a function
Reviewers flagged that provider logos should come from the database, not static assets. This removes the hardcoded logo file and providerLogos utility. Also extracts ProviderItem and ProviderLogo as separate components, uses optional Provider[] prop with default, and replaces deprecated primaryTypographyProps with slotProps.primary.
MUI codemod flagged TextField's inputProps as deprecated. Migrating to slotProps.htmlInput aligns with the current MUI API.
gcardonag
reviewed
Feb 11, 2026
| </Typography> | ||
| </Stack> | ||
| ) : null} | ||
| <ProvidedBy providers={resource.providers} /> |
Contributor
There was a problem hiding this comment.
In order to make this work with the data structure we set up this week in Supabase, we'll look into making the following changes to this branch next week (if you're around to join the fun @icycoldveins !)
- Update this line to reference a
providersvariable - Add a
const providersvariable as this component is initializing that references a new database-querying export insrc/services/db.ts. - Add a database query that does a join across the resource and providers Tables using a many-to-many join and return a list of Provider-type objects: https://supabase.com/docs/guides/database/joins-and-nesting#many-to-many-joins
Then we can give this a test with the test datapoint we added to the beta site 🤞
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.
Summary
Adds "Provided By" feature to display organization attribution when viewing a resource.
Screenshot
Changes
src/types/ResourceEntry.ts- Added Provider typesrc/components/ProvidedBy/ProvidedBy.tsx- New component with extracted ProviderAvatar and ProviderLink subcomponentssrc/utils/providerLogos.ts- Logo mapping utilitysrc/assets/logos/share-food-program.png- Share Food Program logosrc/components/SelectedResourceDetails/SelectedResourceDetails.tsx- IntegrationRefactoring
ProviderAvatarcomponent to handle logo/fallback avatar renderingProviderLinkcomponent for conditional URL wrappingCloses #691
Co-authored-by: Claude claude@anthropic.com