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

fix(FEC-11707): V3 - cast on multiple players - when casting started by some player, "Cast" buttons become enabled on all players #642

Merged
merged 3 commits into from
Nov 22, 2021

Conversation

SivanA-Kaltura
Copy link
Collaborator

@SivanA-Kaltura SivanA-Kaltura commented Nov 21, 2021

Description of the Changes

Change cast button styles so that cast button would be highlighted only in actively casting player.
Fixes FEC-11707.

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

@SivanA-Kaltura SivanA-Kaltura requested a review from a team November 21, 2021 16:21
.cast-button:hover {
--disconnected-color: #{$white};
--connected-color: #{$brand-color};
.cast-button.cast-button-active {
Copy link
Contributor

Choose a reason for hiding this comment

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

can move this to the .player block? and just use .cast-button-active ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can use &.cast-button-active inside the cast-button block, is that what you mean ?
wanted to separate because it seemed more readable but not critical

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

--connected-color: #{$brand-color};
.cast-button.cast-button-active {
--connected-color: rgba(1, 172, 205, 0.8);
--disconnected-color: #{$grayscale4};
Copy link
Contributor

Choose a reason for hiding this comment

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

why is needed? same for hover

Copy link
Collaborator Author

@SivanA-Kaltura SivanA-Kaltura Nov 22, 2021

Choose a reason for hiding this comment

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

why is what needed ?

Copy link
Contributor

Choose a reason for hiding this comment

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

--disconnected-color: #{$grayscale4}; already set

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh, you're right

@@ -73,6 +73,7 @@ class Cast extends Component {
*/
render(props: any): ?React$Element<any> {
if (props.isCasting || props.isCastAvailable) {
const className = props.isCasting ? `${style.castButton} ${style.castButtonActive}` : style.castButton;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const className = props.isCasting ? `${style.castButton} ${style.castButtonActive}` : style.castButton;
const className = props.isCasting ? [style.castButton, style.castButtonActive].join(' ') : style.castButton;

we used to write it like this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think template string is more readable than using join()

Copy link
Contributor

Choose a reason for hiding this comment

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

better to be aligned but not critical

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I care more about readability :)

@SivanA-Kaltura SivanA-Kaltura merged commit 0f0a708 into master Nov 22, 2021
@SivanA-Kaltura SivanA-Kaltura deleted the FEC-11707-mark-active-cast-button branch November 22, 2021 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants