Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the item title on the <SmallMediaCard /> component when rendered in the "Merge Media" > "Export" dialog. #2238

Conversation

caiosba
Copy link
Contributor

@caiosba caiosba commented Dec 20, 2024

Description

I think that the <SmallMediaCard /> component is consistent. It's a media card, not an item card, so the information displayed there is for the media.

But, under the context of the list of "Export" items under the "Merge Media" modal, it's harder to find a media when searching by the item title, since the card renders the media title, not the item title.

This PR fixes it by allowing the card to receive a custom title prop.

Reference: CV2-5868.

Type of change

  • Performance improvement and/or refactoring (non-breaking change that keeps existing functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Security mitigation or enhancement
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Automated test (add or update automated tests)

How has this been tested?

Manually. See reference ticket for details.

Things to pay attention to during code review

Please let me know if you think that this solution is consistent. I wanted to make sure that the <SmallMediaCard /> component is still a media card.

Checklist

  • I have performed a self-review of my own code
  • I've made sure my branch is runnable and given good testing steps in the PR description
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • If I implemented any new components, they are self-contained, their propTypes are declared and they use React Hooks and, if data-fetching is required, they use Relay Modern with fragment containers
  • If my components involve user interaction - specifically button, text fields, or other inputs - I have added a BEM-like class name to the element that is interacted with
  • To the best of my knowledge, any new styles are applied according to the design system
  • If I added a new external dependency, I included a rationale for doing so and an estimate of the change in bundle size (e.g., checked in https://bundlephobia.com/)
  • If I touched a file that included an eslint-disable-file header, I updated the code such that the disabler can be removed

…dered in the "Merge Media" > "Export" dialog.

I think that the `<SmallMediaCard />` component is consistent. It's a *media* card, not an *item* card, so the information displayed there is for the *media*.

But, under the context of the list of "Export" items under the "Merge Media" modal, it's harder to find a media when searching by the item title, since the card renders the media title, not the item title.

This PR fixes it by allowing the card to receive a custom `title` prop.

Reference: CV2-5868.
Copy link
Contributor

@brianfleming brianfleming left a comment

Choose a reason for hiding this comment

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

Yeah this makes sense. just thinking out loud here, but there is probably a future where we refactor some names of things around media and items to make it more clear whats going on...but 🤷

@caiosba caiosba merged commit 88f2dcf into develop Dec 20, 2024
11 checks passed
@caiosba caiosba deleted the fix/CV2-5868-item-title-for-small-media-card-on-merge-media-export-dialog branch December 20, 2024 13:59
caiosba added a commit that referenced this pull request Dec 20, 2024
…dered in the "Merge Media" > "Export" dialog. (#2238)

I think that the `<SmallMediaCard />` component is consistent. It's a *media* card, not an *item* card, so the information displayed there is for the *media*.

But, under the context of the list of "Export" items under the "Merge Media" modal, it's harder to find a media when searching by the item title, since the card renders the media title, not the item title.

This PR fixes it by allowing the card to receive a custom `title` prop.

Reference: CV2-5868.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants