-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 part of #9749: Migrate base-content #12371
Conversation
Hi @ashutoshc8101, the body of this PR is missing the required description, please update the body with a description of what this PR does. |
Hi, @ashutoshc8101, this pull request does not have a "CHANGELOG: ..." label as mentioned in the PR checkbox list. Assigning @ ashutoshc8101 to add the required label. PRs without this label will not be merged. If you are unsure of which label to add, please ask the reviewers for guidance. Thanks! |
Hi @ashutoshc8101, when creating WIP/Draft PRs, ensure that your commit messages are prefixed with [ci skip] or [skip ci] to prevent CI checks from running. You can learn more about it here. |
Hi @ashutoshc8101. Due to recent changes in the "develop" branch, this PR now has a merge conflict. Please follow this link if you need help resolving the conflict, so that the PR can be merged. Thanks! |
ac90c78
to
5c0d808
Compare
this.getHeaderText = () => { | ||
return this.pageTitleService.getPageTitleForMobileView(); | ||
}; | ||
|
||
this.getSubheaderText = () => { | ||
return this.pageTitleService.getPageSubtitleForMobileView(); | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why declare functions inside ngOnInit() ?
Because pageTitleService is undefined while declaring the functions in the conventional way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this in a comment above the two functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.oppia-sidebar-menu-open { | ||
box-shadow: 1px 0 3px rgba(0,0,0,0.12), 1px 0 2px rgba(0,0,0,0.24); | ||
height: 110vh; | ||
overflow-y: scroll; | ||
-ms-transform: translate(0, 0); | ||
-webkit-transform: translate3d(0, 0, 0); | ||
transform: translate3d(0, 0, 0); | ||
visibility: visible; | ||
} | ||
.oppia-sidebar-menu-open::after { | ||
height: 0; | ||
opacity: 0; | ||
-webkit-transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s; | ||
transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s; | ||
width: 0; | ||
} | ||
</style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move this css from oppia.css to component?
Because component's css was taking priority over the global css due to view encapsulation (unlike ajs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was causing issues showing sidebar
SidebarStatusService.toggleSidebar(); | ||
// SidebarStatusService.toggleSidebar(); | ||
// $scope.update = !$scope.update; | ||
$scope.toggle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is changed?
Due to change detection issues with upgradeComponent.
When toggleSidebar is called directly from there, change detection only occurs in ajs not in angular.
So, I changed this in such a way that both ajs and angular change detection work.
@@ -42,7 +42,7 @@ | |||
<nav class="navbar navbar-expand navbar-light oppia-navbar oppia-prevent-selection" role="navigation" | |||
headroom tolerance="0" offset="0"> | |||
<div class="navbar-container"> | |||
<top-navigation-bar></top-navigation-bar> | |||
<top-navigation-wrapper></top-navigation-wrapper> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to fix the side effects of the changes which were made to fix change detection.
Unassigning @brianrodri since they have already approved the PR. |
Unassigning @nithusha21 since they have already approved the PR. |
@sagangwee PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashutoshc8101 LGTM for codeowners.
Unassigning @sagangwee since they have already approved the PR. |
This reverts commit 121ee3c.
Overview
PR is open for some dependencies (top navigation bar, footer) of base-content.
So, I used upgradeComponent for that dependencies. If those PRs get merged before this, I will update this PR to use the migrated components.
Essential Checklist
Proof that changes are correct
base-content:
base-content-2021-03-31_21.54.49.mp4
PR Pointers