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

Unavailable videos comparisons list #1522

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

OoIwazaruoO
Copy link
Collaborator

@OoIwazaruoO OoIwazaruoO commented Apr 23, 2023

Related to #1070


This PR has for goal the display of unavailable entity on the comparisons list page.
The unavailable video must be highlighted with a message overlay on top of the image like for the comparison page

  • Fix entity card uneven size on the comparisons list
  • Fix video duration timer overflow from image for unavailable entity

image

@OoIwazaruoO OoIwazaruoO marked this pull request as ready for review April 24, 2023 11:29
Copy link
Collaborator

@GresilleSiffle GresilleSiffle left a comment

Choose a reason for hiding this comment

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

It looks good to me.

I'm going to refactor a duplicate piece of code before merging.

Comment on lines 119 to 140
<Box
display="flex"
justifyContent="center"
alignItems="center"
position="absolute"
top="0"
color="white"
bgcolor="rgba(0,0,0,.6)"
width="100%"
height="100%"
sx={{
[theme.breakpoints.down('sm')]: {
fontSize: '0.6rem',
},
}}
>
<Typography textAlign="center" fontSize="inherit">
{entity.type == TypeEnum.VIDEO
? t('video.notAvailableAnymore')
: t('entityCard.thisElementIsNotAvailable')}
</Typography>
</Box>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same components are also used by <EntitySelectorInnerAuth>.

Let's factorize them in their own component.

@GresilleSiffle GresilleSiffle self-requested a review May 8, 2023 13:43
Copy link
Collaborator

@GresilleSiffle GresilleSiffle left a comment

Choose a reason for hiding this comment

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

I just realized that those changes break the visual of the My comparisons page on the presidentielle2022 poll.

We should fix it.

@GresilleSiffle GresilleSiffle added Frontend Front-end code of Tournesol UX labels May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Front-end code of Tournesol UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants