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

refactor(TopBarComponent): Convert to standalone #2024

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

hirokiterashima
Copy link
Member

Changes

This pull request includes several changes primarily focused on refactoring and updating the TopBarComponent in the classroom monitor module. The changes involve convert to standalone, reorganization of imports, updates to the component's template, and modifications to the component's TypeScript and test files.

Changes to TopBarComponent:

  • Template Updates:

    • Simplified button and span elements using @if statements for conditional rendering. [1] [2] [3]
  • TypeScript Updates:

    • Converted TopBarComponent to a standalone component with updated imports and encapsulated properties. [1] [2]
    • Removed the getRunInfo method and inlined its logic directly in the ngOnInit method.
    • Removed unused properties and methods related to notifications.
  • Test File Updates:

    • Refactored test setup to use the standalone TopBarComponent and removed unnecessary imports. [1] [2]
    • Simplified the notification service spy setup.

These changes aim to improve the maintainability and readability of the TopBarComponent by leveraging Angular's standalone component feature and simplifying the template and logic.

Test

  • In Teacher Tools, the top bar works as before

@hirokiterashima hirokiterashima self-assigned this Dec 18, 2024
@hirokiterashima hirokiterashima added this to the Standalone Components milestone Dec 18, 2024
@hirokiterashima hirokiterashima marked this pull request as ready for review December 18, 2024 00:12
@hirokiterashima hirokiterashima merged commit 0494fd8 into develop Dec 18, 2024
4 of 5 checks passed
@hirokiterashima hirokiterashima deleted the convert-CM-TopBar-to-standalone branch December 18, 2024 00:24
@hirokiterashima
Copy link
Member Author

🎉 This issue has been resolved in version 5.164.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant