Conversation
88c4681 to
754fd5e
Compare
jovyntls
left a comment
There was a problem hiding this comment.
Some comments on the types! Also, why are all the method call params (and anything comma-separated) split into a line of their own? Seems like an unnecessary change 😅
|
@ong6 could you remove the commit description in your adapt commit? |
a87e0cc to
fa7caf3
Compare
jovyntls
left a comment
There was a problem hiding this comment.
LGTM, just a rebase error!
d11d771 to
a56de11
Compare
|
Almost there now, let's try to get this one merged soon |
de51a91 to
231d39c
Compare
19d94b4 to
c71bbf9
Compare
packages/core/src/Page/index.ts
Outdated
| const doesLayoutHavePageNav = this.pageConfig.layoutManager.layoutHasPageNav( | ||
| this.layout ?? LAYOUT_DEFAULT_NAME); |
There was a problem hiding this comment.
Just checking, is there a change in behaviour here (and the other uses of ?? LAYOUT_DEFAULT_NAME below)?
There was a problem hiding this comment.
Thanks for the catch. I've adjusted the code for this instance as it may affect the behavior. However, for the instances below, there is no change in the intended behavior as LAYOUT_DEFAULT_NAME is the fallback for those cases regardless.
There was a problem hiding this comment.
Hi @ong6, I think you need to fix the rebase - the tests are failing because your .gitignore/.eslintignore are not ignoring the files that they should, probably because of an error when you rebased
Please rebase carefully! Your rebase deleted all of the changes from master in the .gitignore and .eslintignore.
| } | ||
|
|
||
| return this.layouts[name].insertPage(pageContent, pageNav, pageIncludedFiles); | ||
| return this.layouts[name].insertPage(pageContent, pageNav, new Set<string>(pageIncludedFiles)); |
There was a problem hiding this comment.
Why do we create a new instance of pageIncludedFiles here? Is it to avoid passing by reference?
| const doesLayoutHavePageNav = this.layout ? this.pageConfig.layoutManager.layoutHasPageNav( | ||
| this.layout) : false; |
There was a problem hiding this comment.
I think we can avoid all of these typing issues with this.layout, and the additions of ?? LAYOUT_DEFAULT_NAME below, by asserting that the layout attribute exists with a ! operator.
You'll need to modify this too (just delete the question mark)
Feel free to trace to verify that this is safe!
|
Will create new PR for this |
What is the purpose of this pull request?
Part of #1913
Overview of changes:
Migrate Layouts file and Layouts Manager to typescript
Anything you'd like to highlight/discuss:
N/A
Testing instructions:
N/A
Proposed commit message: (wrap lines at 72 characters)
(rebase commit)
Checklist: ☑️