-
-
Notifications
You must be signed in to change notification settings - Fork 834
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
Mithril 2 update #2255
Mithril 2 update #2255
Conversation
5a9df3c
to
9ab6c2c
Compare
Decisions made thus far:
References to props in comments have not been changed; they will be removed when we introduce attr typing in the typescript part of the rewrite. Some issues that need fixes
|
a1c8ae1
to
356215e
Compare
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.
Found a bunch of stuff already. Haven't looked at all files yet, though.
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.
I'd like to suggest we create a util method or Mithril patch for m.route.set('/', null, { state: { key: Date.now() } });
. It's not obvious what it does and it would be much simpler to have it inside of a named method instead of adding a comment everywhere. Something like setRouteWithForcedRefresh()
I have read through the changes in this PR last week and again now and I think it's still not an exhaustive review but I think I agree with the vast majority of changes.
That's a great idea! Also allows us to document this centrally. Done! |
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.
All good regarding my previous comments. Not sure if I should do another read-through before the end of the week or if it's enough to wait on others to complete their own review?
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.
Ooo 2 approving reviews, does that mean we can merge 🤣
(just to clarify, no merge until everyone agrees or Franz overrides. This approval is largely symbolic in that I think thisr implementation is sufficient to not diminish extensibility, and does not introduce bugs (that I have been able to find))
1d728b9
to
a680c51
Compare
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.
We still have some lazyRedraw
s left behind - see https://github.com/flarum/core/blob/4c4c148c6e3fe6c951941762a685ab42f2329453/js/src/common/Model.js#L183
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.
A few post stream questions for @askvortsov1
b59d383
to
6f4de6c
Compare
- Update libraries - Add Typescript typings for Mithril - Rename "props" to "attrs" - New lifecycle hooks - Other mechanical changes, following the upgrade guide - Remove some of the custom stuff in our Component base class - Introduce "fragments" for non-components that control their own DOM - Remove Mithril patches, introduce a few new ones Challenges: - Behavior of links to current page changed in Mithril - Native Promise rejections are shown on console when not handled - ... Refs #1821. Co-authored-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com> Co-authored-by: Matthew Kilgore <tankerkiller125@gmail.com> Co-authored-by: Franz Liedke <franz@develophp.org>
8c63ff2
to
161cd57
Compare
… to break anything based on local tests)
We now have 3 overloads: `show(children)`, `show(attrs, children)` `show(componentClass, attrs, children)`
Congrats! 🎉 |
Supersedes #2126.
Some minor TypeScript changes will be here because it makes the development easier. Don't yell at us.
Decisions made thus far:
References to props in comments have not been changed; they will be removed when we introduce attr typing in the typescript part of the rewrite.
Some issues that need fixes
Extracted fixes: