Skip to content

7.8.x#22

Open
mathewchris96 wants to merge 6 commits intomainfrom
7.8.x
Open

7.8.x#22
mathewchris96 wants to merge 6 commits intomainfrom
7.8.x

Conversation

@mathewchris96
Copy link
Owner

small version change

gkatsev and others added 6 commits May 26, 2020 17:14
…(#6671)

This is #6644 but against the 7.8.x release line.

Co-authored-by: mister-ben <git@misterben.me>
Backport #6673 against 7.8.x release line.

Fixes #6640
The Fullscreen API is unsupported in iOS, so self.fsApi_.fullscreenerror and self.fsApi_.fullscreenchange are undefined, which was breaking the player after entering fullscreen by removing all bound player events.

Fixes #6707, fixes #6684, fixes #6645.
@phronetic-pr-reviewer
Copy link

🤖 AI Code Review

📋 Code Review Table

Category Status / Notes
Summary of Changes Version bump, bug fixes, test added
Tests & Correctness OK, new test added
Security OK
Performance OK
Architecture & Design Minor improvements suggested
Code Quality & Style Minor improvements suggested
Docs & Observability Changelog updated, no other issues
Overall Recommendation Merge with minor changes suggested

PR Review — Summary

  • Goal: This PR updates the version of the project to 7.8.4, includes bug fixes, and adds a test for component child handling.
  • Risk: Low
  • Recommendation: Merge with minor changes suggested

⚠️ Major Issues (should fix)

  • [src/js/component.js:526-536]Improve Child Element Handling Logic
    Why: The current logic for determining the reference node for inserting a child element could be simplified and made more robust.
    How to fix: Consider using a single conditional that checks for both component and element types in a more streamlined manner.
    Notes: This change will improve readability and maintainability.

    if (this.children_[index + 1]) {
      refNode = this.children_[index + 1].el_ || (Dom.isEl(this.children_[index + 1]) ? this.children_[index + 1] : null);
    }

🟡 Minor Issues (suggested)

  • [src/js/player.js:2789-2870]Consistency in Event Handling
    Why: The use of self.fsApi_ for event names was removed, but ensure that this change is consistent across the codebase.
    How to fix: Verify that all event handling uses the same string literals for event names.

💡 Suggestions & Improvements

  • [src/css/components/_layout.scss:113-118]CSS Selector Improvement
    Why: The addition of :not(.vjs-ios-native-fs) improves specificity, but consider if other similar selectors need updates.
    How to fix: Review other CSS rules for similar patterns and apply consistent logic.

✅ Positives

  • The PR includes a well-documented changelog entry.
  • A new unit test was added to cover the new functionality, ensuring correctness.
  • The changes are well-contained and do not introduce significant risk.

Suggested PR checklist (add these items to the PR description)

  • Unit/integration tests added
  • Security review performed for external inputs
  • Docs and changelog entry

Additional requirements & heuristics:

  • Always include specific file references and approximate line numbers or hunk context.
  • Where helpful, include a tiny unified-diff (diff ... block) or a short snippet that can be copy-pasted.
  • If a suggestion is speculative because context is missing, prefix with "Assuming X, …".
  • Provide a confidence level per major finding: High/Medium/Low.
  • If multiple fixes are possible, list a recommended minimal fix and an optional larger refactor.
  • If an issue touches security, mark it Critical and explain attack scenarios and remediation steps.

Tone: collaborative and educational — enable fast fixes with clear, testable changes.


📊 Review Summary

🔍 This is an automated AI review. Please use your judgment and verify all suggestions before implementing them.

@mathewchris96
Copy link
Owner Author

what are the signigficant changes here?

@phronetic-pr-reviewer
Copy link

🤖 AI Code Review

📋 Code Review Table

Category Status / Notes
Summary of Changes Version bump, bug fixes, and test additions
Tests & Correctness OK, new tests added for element children
Security OK, no security issues identified
Performance OK, no performance concerns
Architecture & Design OK, minor improvements in handling fullscreen
Code Quality & Style OK, consistent with existing codebase
Docs & Observability OK, changelog updated
Overall Recommendation Merge

PR Review — Summary

  • Goal: This PR updates the version to 7.8.4, includes bug fixes for fullscreen issues, and adds tests for handling children elements.
  • Risk: Low
  • Recommendation: Merge

🔴 Critical Issues (must fix before merge)

None identified.

⚠️ Major Issues (should fix)

None identified.

🟡 Minor Issues (suggested)

  • [src/js/player.js:line-2076]Improve readability of conditionals
    Why: The conditional logic for handling fullscreen changes could be made more readable by separating the concerns of toggling classes and setting fullscreen state.
    How to fix: Consider refactoring the method to separate the logic into smaller, named functions for clarity.
handleTechFullscreenChange_(event, data) {
  if (!data) return;
  
  this.handleIOSFullscreen(data.nativeIOSFullscreen);
  this.isFullscreen(data.isFullscreen);
}

handleIOSFullscreen(isIOSFullscreen) {
  if (isIOSFullscreen) {
    this.toggleClass('vjs-ios-native-fs');
  }
}

💡 Suggestions & Improvements

  • Consider adding more detailed comments in the component.js file to explain the logic behind checking if a child is an element or a component.

✅ Positives

  • The PR includes a comprehensive changelog update, which is crucial for tracking changes and understanding the context of the version bump.
  • New tests have been added to ensure that the changes do not break existing functionality and to cover new use cases.

Suggested PR checklist (add these items to the PR description)

  • Unit/integration tests added
  • Security review performed for external inputs
  • Benchmarks / perf numbers if relevant
  • Docs and changelog entry

Additional requirements & heuristics:

  • The PR is well-structured, and the changes are consistent with the existing codebase.
  • The added tests improve the robustness of the code by ensuring that new functionality is covered.
  • The changelog is updated appropriately, providing a clear history of changes for future reference.

📊 Review Summary

🔍 This is an automated AI review. Please use your judgment and verify all suggestions before implementing them.

@phronetic-pr-reviewer
Copy link

🤖 AI Code Review

📋 Code Review Table

Category Status / Notes
Summary of Changes Version bump, bug fixes, CSS adjustments
Tests & Correctness OK, new test added for child element handling
Security OK, no security concerns identified
Performance OK, no performance issues detected
Architecture & Design OK, minor improvements in method handling
Code Quality & Style OK, follows project conventions
Docs & Observability OK, changelog updated
Overall Recommendation Merge

PR Review — Summary

  • Goal: Update to version 7.8.4 with bug fixes and minor enhancements.
  • Risk: Low
  • Recommendation: Merge

🔴 Critical Issues (must fix before merge)

None identified.

⚠️ Major Issues (should fix)

None identified.

🟡 Minor Issues (suggested)

  • [src/js/player.js:line-2079]Use of toggleClass without condition check
    Why: When toggling a class, it's often beneficial to ensure the class is applied or removed based on a condition to avoid unnecessary DOM operations.
    How to fix: Consider checking if the class is already present before toggling.
    if (data.nativeIOSFullscreen && !this.hasClass('vjs-ios-native-fs')) {
        this.addClass('vjs-ios-native-fs');
    }

💡 Suggestions & Improvements

  • [src/js/component.js:line-530] — Consider using a utility function to determine if an object is a DOM element to improve readability and maintainability.

✅ Positives

  • The changelog is updated, providing clear documentation of changes.
  • Tests have been added to ensure new functionality works as expected.
  • Code changes are concise and adhere to existing style and conventions.

Suggested PR checklist (add these items to the PR description)

  • Unit/integration tests added
  • Security review performed for external inputs
  • Benchmarks / perf numbers if relevant
  • Docs and changelog entry

Additional requirements & heuristics:

  • Always include specific file references and approximate line numbers or hunk context.
  • Provide a confidence level per major finding: High/Medium/Low.
  • If multiple fixes are possible, list a recommended minimal fix and an optional larger refactor.
  • If an issue touches security, mark it Critical and explain attack scenarios and remediation steps.

Tone: collaborative and educational — enable fast fixes with clear, testable changes.


📊 Review Summary

🔍 This is an automated AI review. Please use your judgment and verify all suggestions before implementing them.

@phronetic-pr-reviewer
Copy link

🤖 AI Code Review

📋 Code Review Table

Category Status / Notes
Summary of Changes Version bump, bug fixes, and test additions for fullscreen handling in iOS.
Tests & Correctness OK, new tests added for element handling.
Security OK, no security issues identified.
Performance OK, no performance issues identified.
Architecture & Design Minor improvements suggested for code clarity.
Code Quality & Style Minor improvements suggested for code clarity and consistency.
Docs & Observability OK, changelog updated; consider adding more detailed comments in code.
Overall Recommendation Merge after addressing minor code quality suggestions.

PR Review — Summary

  • Goal: This PR updates the version from 7.8.1 to 7.8.4, fixes fullscreen issues on iOS, and adds tests for handling children that are elements.
  • Risk: Low
  • Recommendation: Merge after addressing minor code quality suggestions.

⚠️ Major Issues (should fix)

  • [src/js/component.js:526-533]Code Clarity Improvement
    Why: The logic for determining refNode could be simplified for better readability and maintainability.
    How to fix: Consider using early returns or a clearer conditional structure to handle the different cases for setting refNode.

    let refNode = null;
    const nextChild = this.children_[index + 1];
    
    if (nextChild) {
      refNode = nextChild.el_ || (Dom.isEl(nextChild) ? nextChild : null);
    }

🟡 Minor Issues (suggested)

  • [src/js/player.js:2789-2870]Consistency in Event Handling
    Why: The event names are hardcoded, which might lead to inconsistencies if the API changes.
    How to fix: Consider defining the event names as constants at the top of the file or within a configuration object for better maintainability.

💡 Suggestions & Improvements

  • Documentation: Consider adding inline comments in src/js/component.js and src/js/player.js to explain the logic behind handling different types of children and fullscreen changes, respectively. This will help future developers understand the intent behind these changes.

✅ Positives

  • The changelog is well-updated, providing clear documentation of the changes.
  • Tests have been added to cover new functionality, ensuring robustness against regressions.

Suggested PR checklist (add these items to the PR description)

  • Unit/integration tests added
  • Security review performed for external inputs
  • Benchmarks / perf numbers if relevant
  • Docs and changelog entry

Additional requirements & heuristics:

  • Always include specific file references and approximate line numbers or hunk context.
  • Where helpful, include a tiny unified-diff (diff ... block) or a short snippet that can be copy-pasted.
  • If a suggestion is speculative because context is missing, prefix with "Assuming X, …".
  • Provide a confidence level per major finding: High/Medium/Low.
  • If multiple fixes are possible, list a recommended minimal fix and an optional larger refactor.
  • If an issue touches security, mark it Critical and explain attack scenarios and remediation steps.

Tone: collaborative and educational — enable fast fixes with clear, testable changes.


📊 Review Summary

🔍 This is an automated AI review. Please use your judgment and verify all suggestions before implementing them.

@phronetic-pr-reviewer
Copy link

🤖 AI Code Review

📋 Code Review Table

Category Status / Notes
Summary of Changes Version bump, bug fixes, test additions
Tests & Correctness OK, new tests added
Security OK
Performance OK
Architecture & Design OK
Code Quality & Style Minor improvements suggested
Docs & Observability OK, changelog updated
Overall Recommendation Merge

PR Review — Summary

  • Goal: This PR updates the version to 7.8.4, includes bug fixes related to fullscreen handling, and adds a test for handling children elements.
  • Risk: Low
  • Recommendation: Merge

🔴 Critical Issues (must fix before merge)

None.

⚠️ Major Issues (should fix)

None.

🟡 Minor Issues (suggested)

  • [src/js/component.js:line-528]Improve readability of conditional logic
    Why: The nested if conditions can be simplified for better readability.
    How to fix: Use a single conditional statement with logical operators.
    if (this.children_[index + 1] && (this.children_[index + 1].el_ || Dom.isEl(this.children_[index + 1]))) {
      refNode = this.children_[index + 1].el_ || this.children_[index + 1];
    }

💡 Suggestions & Improvements

  • Consider adding more detailed comments in the handleTechFullscreenChange_ function to explain the logic behind toggling the vjs-ios-native-fs class.

✅ Positives

  • The changelog has been updated appropriately to reflect the version change and bug fixes.
  • The added test in component.test.js increases coverage for handling children that are elements, which is a positive step for robustness.

Suggested PR checklist (add these items to the PR description)

  • Unit/integration tests added
  • Security review performed for external inputs
  • Benchmarks / perf numbers if relevant
  • Docs and changelog entry

Additional requirements & heuristics:

  • Specific file references and line numbers are included for clarity.
  • Suggestions are provided with code snippets for easy application.
  • The review is collaborative and educational, focusing on enabling fast fixes with clear, testable changes.

📊 Review Summary

🔍 This is an automated AI review. Please use your judgment and verify all suggestions before implementing them.

@phronetic-pr-reviewer
Copy link

🤖 AI Code Review

📋 Code Review Table

Category Status / Notes
Summary of Changes Version bump, bug fixes, minor feature enhancements
Tests & Correctness OK, test added for new feature
Security OK
Performance OK
Architecture & Design OK
Code Quality & Style OK
Docs & Observability OK, changelog updated
Overall Recommendation Merge

PR Review — Summary

  • Goal: This PR updates the version from 7.8.1 to 7.8.4, includes bug fixes related to fullscreen handling, and adds a test for handling children that are elements.
  • Risk: Low
  • Recommendation: Merge

🔴 Critical Issues (must fix before merge)

No critical issues identified.

⚠️ Major Issues (should fix)

No major issues identified.

🟡 Minor Issues (suggested)

  • [src/css/components/_layout.scss:line-114]CSS Selector Specificity
    Why: The selector .video-js.vjs-fullscreen:not(.vjs-ios-native-fs) is more specific than the previous .video-js.vjs-fullscreen. Ensure this change does not unintentionally override other styles.
    How to fix: Verify the impact of this change on all supported browsers and devices.

💡 Suggestions & Improvements

  • Consider adding more detailed comments in src/js/player.js where native iOS fullscreen handling is toggled. This will help future developers understand the purpose of the nativeIOSFullscreen flag.

✅ Positives

  • The PR includes a well-documented changelog entry, which is crucial for tracking changes and understanding the evolution of the project.
  • The addition of a unit test for the new feature in component.test.js ensures that the new functionality is verified and helps prevent regressions.

Suggested PR checklist (add these items to the PR description)

  • Unit/integration tests added
  • Security review performed for external inputs
  • Benchmarks / perf numbers if relevant
  • Docs and changelog entry

Additional requirements & heuristics:

  • Always include specific file references and approximate line numbers or hunk context.
  • Where helpful, include a tiny unified-diff (diff ... block) or a short snippet that can be copy-pasted.
  • If a suggestion is speculative because context is missing, prefix with "Assuming X, …".
  • Provide a confidence level per major finding: High/Medium/Low.
  • If multiple fixes are possible, list a recommended minimal fix and an optional larger refactor.
  • If an issue touches security, mark it Critical and explain attack scenarios and remediation steps.

Tone: collaborative and educational — enable fast fixes with clear, testable changes.


📊 Review Summary

🔍 This is an automated AI review. Please use your judgment and verify all suggestions before implementing them.

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