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

Align PR handling of default values #346

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

krocard
Copy link
Contributor

@krocard krocard commented Dec 6, 2023

Problem (PRN-92)

Most of the RN SDK relies on the default value from the native side.
The 2 exceptions where fullscreen and PiP, where the default is set in TS.

Nevertheless this is not necessary because the defaults are the same in both native SDK.

Changes

Align the default. Don't send the command if the value is undefined.

📚 Other PRs for this issue

@krocard krocard self-assigned this Dec 6, 2023
@krocard krocard changed the title refactor: align handling of default values Align PR handling of default values Dec 6, 2023
@krocard krocard requested review from rolandkakonyi, matamegger and zigavehovec and removed request for matamegger December 6, 2023 16:59
@krocard krocard marked this pull request as ready for review December 6, 2023 16:59
Copy link
Contributor

@rolandkakonyi rolandkakonyi left a comment

Choose a reason for hiding this comment

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

I tested your changes and once entering fullscreen or PiP.

Nit: I assume you meant "RN" instead of "PR" in the title of this Pull Request.

src/components/PlayerView/index.tsx Outdated Show resolved Hide resolved
Comment on lines 142 to 143
if (node && isPictureInPictureRequested) {
dispatch('setPictureInPicture', node, isPictureInPictureRequested);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: d071e78

Base automatically changed from PRN-74/refactor--improve-null-safety to development December 7, 2023 08:36
@@ -125,21 +125,21 @@ export function PlayerView({

useEffect(() => {
const node = findNodeHandle(nativeView.current);
if (node) {
if (node && isFullscreenRequested != undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use !== instead as the Check warning indicated!

Suggested change
if (node && isFullscreenRequested != undefined) {
if (node && isFullscreenRequested !== undefined) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. Which tool is emitting those warning? If we need to avoid them, should it be part of the CI? (I don't have any warning on my side)

Copy link
Contributor

Choose a reason for hiding this comment

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

yarn lint

It already runs on the CI and you can see the warnings only on the Files changed tab.

This should be executed as pre-commit hook if you have husky installed.

Copy link
Contributor Author

@krocard krocard Dec 7, 2023

Choose a reason for hiding this comment

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

Can we make them errors? #348

Copy link
Contributor

Choose a reason for hiding this comment

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

Thx for changing it!

src/components/PlayerView/index.tsx Outdated Show resolved Hide resolved
src/components/PlayerView/index.tsx Outdated Show resolved Hide resolved
Co-authored-by: Roland Kákonyi <[email protected]>
Copy link
Contributor

@zigavehovec zigavehovec left a comment

Choose a reason for hiding this comment

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

Nice!

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.

3 participants