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

Sidebar show type #590

Merged
merged 6 commits into from
Nov 17, 2023
Merged

Sidebar show type #590

merged 6 commits into from
Nov 17, 2023

Conversation

cosmicpotato137
Copy link
Contributor

closes #546

I am having trouble with getting the default show cover image to appear. Is there something that needs to be done on the back end to return a node with the default png if it doesn't have one? And if so, where does that happen? Also, I couldn't find any show producer name, so I'm just using the name of the show for now.

For now, the UI styling is done!

Screenshot 2023-11-12 132657

@tomsmith8
Copy link
Contributor

@cosmicpotato137 Let's remove 'By show title' for now until the backend returns the hosts name.

@kevkevinpal
Copy link
Collaborator

pushed prettier changes to this commit e40d4d5

Comment on lines 109 to 110
{Boolean(showTitle) && type !== 'show' && <Title>{showTitle}</Title>}
{Boolean(showTitle) && type === 'show' && <ShowTitle>{showTitle}</ShowTitle>}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure we can merge these two into one ternary operator

Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if we even need new component for that, we can use something like className={clsx({'is-show': type === 'show'})}

@Rassl
Copy link
Collaborator

Rassl commented Nov 13, 2023

I am having trouble with getting the default show cover image to appear. Is there something that needs to be done on the back end to return a node with the default png if it doesn't have one? And if so, where does that happen? Also, I couldn't find any show producer name, so I'm just using the name of the show for now.

take a look to Avatar component, you should add default image there

@Rassl Rassl assigned Rassl and unassigned Rassl Nov 13, 2023
@Rassl Rassl self-requested a review November 13, 2023 19:08
Copy link
Collaborator

@Rassl Rassl left a comment

Choose a reason for hiding this comment

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

Please take a look to my comments, feel free to ping me, if anything is not clear

Comment on lines 109 to 110
{Boolean(showTitle) && type !== 'show' && <Title>{showTitle}</Title>}
{Boolean(showTitle) && type === 'show' && <ShowTitle>{showTitle}</ShowTitle>}
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if we even need new component for that, we can use something like className={clsx({'is-show': type === 'show'})}

@@ -102,16 +102,19 @@ export const Episode = ({
) : null}
</Flex>

<Description data-testid="episode-description">{episodeTitle}</Description>
{type !== 'show' && <Description data-testid="episode-description">{episodeTitle}</Description>}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should pass showTitle here, and get rid of ShowTitle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what you mean by this. Should I just revert this change?

Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry for screenshot, it was faster :)

basically all we need for this file can be done like this:
image

@cosmicpotato137
Copy link
Contributor Author

@Rassl finished updating based on your review in case you hadn't already :)

@Rassl Rassl self-requested a review November 15, 2023 17:29
@@ -86,7 +86,7 @@ export const Episode = ({
<Flex direction="row">
{!isSelectedView && (
<Flex align="center" pr={16}>
<Avatar size={64} src={imageUrl} type={type || ''} />
<Avatar size={64} src={imageUrl !== '' ? imageUrl : } type={type || ''} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is supposed to be after : ?

you should change not here, and inside Avatar component, just add new type 'show'

Copy link
Collaborator

@Rassl Rassl left a comment

Choose a reason for hiding this comment

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

LGTM

@Rassl Rassl merged commit 575d0d8 into stakwork:master Nov 17, 2023
4 checks passed
@cosmicpotato137 cosmicpotato137 deleted the sidebar-show-type branch November 18, 2023 15:15
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.

Sidebar result for Show Type
4 participants