-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Single style tags - put stylesheets into single <style>
tags
#8118
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Oh I forgot to mention that here I've also added the modern-normalize 2.0.0 instead of the 1.0.0 |
If I download an empty wiki from https://tiddlywiki.com/prerelease and an empty wiki from the Preview of this PR and I enable Performance Instrumentation on both, I get comparable results |
Thanks @BurningTreeC
That should be a separate PR, please. |
Hi @Jermolene, I've reverted adding modern-normalize 2.0.0 Another question: What was your idea for the |
Hello @Jermolene I found that I need a fake widget and a fake domNode for this - do you have a better idea? Thank you, |
I temporarily enabled performance instrumentation for this PR, I will disable it at the end |
This PR is now ready for review. It doesn't incorporate changes to the This PR alone - without the changes in #8125 - will NOT update styles if anything changes |
Thank you @BurningTreeC, I appreciate your time on this. I am afraid there is a bad smell from the fact that render.js has to track the style widgets and style elements between refreshes. That's really what I meant about duplicating the logic of the list widget; the hallmark of the list widget is that it keeps the previous list contents so that it can optimise changes. We should be able to leverage those existing optimisations. Further I strongly think changes like this will need some tests to underpin them. We need to verify that the refresh mechanism works as expected, with no unexpected refreshes. There are some existing tests that show how this can be done. |
This PR is an alternative to #8106
I open this as a Draft PR for Discussion.
This PR still uses the
<$transclude mode="block">
widget since I couldn't figure out a fast way for theview
widget to detect if its text changes. But here thetransclude
widget can simply be replaced.The advantage of this PR is, that the
<style>
tags are not necessarily needed. If they are omitted, then the styles are put in one single style tag like it does currently.The heavy lifting is done within the
styleRefresh
and the times will probably go up. Needs testing