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-11537): Need to re-add fontScale to textStyle config for backward compatability #605

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

SivanA-Kaltura
Copy link
Contributor

@SivanA-Kaltura SivanA-Kaltura commented Sep 14, 2021

Description of the Changes

Re-add fontScale to textStyle for backward compatibility.
Fixes FEC-11537.

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 September 14, 2021 09:22
@@ -148,6 +148,7 @@ class TextStyle {
let textStyle = new TextStyle();
textStyle.fontEdge = getValue(setting.fontEdge, textStyle.fontEdge);
textStyle.fontSize = getValue(setting.fontSize, textStyle.fontSize);
textStyle.fontScale = getValue(setting.fontScale, textStyle.fontScale);
Copy link
Contributor

@yairans yairans Sep 14, 2021

Choose a reason for hiding this comment

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

so if app overrides the fontSize only, the fontScale wiill override it and it won't be changed no?
same Q for cvaa changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case, getValue will receive settings.fontScale=undefined, and will fallback to textStyle.fontScale (which was set by fontSize)

Copy link
Contributor

Choose a reason for hiding this comment

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

great. do we have unit tests for both fontSize and fontScale overrriding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, see my changes to player.spec.js

@SivanA-Kaltura SivanA-Kaltura merged commit b56f18e into master Sep 14, 2021
@SivanA-Kaltura SivanA-Kaltura deleted the FEC-11537-restore-textstyle-fontscale branch September 14, 2021 11:34
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