-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
View Widget View handler #8135
base: master
Are you sure you want to change the base?
View Widget View handler #8135
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thanks @BurningTreeC I am just linking this back to the earlier discussion in #8125. Sorry for the delay. I am now a bit concerned that this is a lot of complexity to introduce in order to be able to attempt the optimisation proposed in #8105. However, I am not sure that at this point we have confidence that the eventual performance improvements will be worthwhile. Does this PR as it stand give you enough material to be able to explore the performance impact on #8105? |
This PR adds a
ViewHandler
base class to theview
widget andsubclasses
for each of the different viewsThe
ViewHandler
has methodsrender
,renderWikified
,createTextNode
,createWikifiedTextNode
,createFakeWidget
andrefresh
- EDIT: and now alsorefreshWikified
These methods are used by more than one of the different subclasses.
The subclasses are initialised if they're needed.
There's still a big
switch
statement in theViewWidget
'sgetView
method to find the view and initialise the correct subclass, maybe there's a better method to do so but I haven't found one.Each subclass has its own
getValue
method.The wikified views also have dedicated
render
andrefresh
methods.I hope I got this right this time 😸
Please review and test and leave me some comments if this is the right approach and what could be simplified.
I had to read about subclassing for this and am not 100% sure if I got it right.