Skip to content

Deferred static files #77

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

Merged
merged 37 commits into from
Jul 1, 2022
Merged

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Jun 23, 2022

This PR adds a static_css component, which reads the CSS file's from disk, stores the contents in cache (for performance purposes), and then puts the file contents into a html.style tag.

Currently, IDOM has no real way to "wait for CSS to load". This will lead to visual jank when attempting to use html.link to defer load CSS loading until a certain component exists. For example, visual jank occurs when using

html.link({"rel": "stylesheet", "href": static("conreq/buttons.css")})

This also mitigates the need for the following (within Django only):

Changelog

  • Deferred static file components
  • Docs for deferred static files
  • Bump minimum IDOM version
  • Create PR templates
  • Sync issue form template with idom-team/idom
  • Pin selenium to 4.2 for compatibility
  • Bump django-idom to v1.1.0
  • Docstring for component template tag
  • Minor readme wordsmithing

Archmonger and others added 2 commits June 23, 2022 15:14
Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
@Archmonger Archmonger changed the title Static CSS component Static CSS and JS components Jun 23, 2022
@Archmonger
Copy link
Contributor Author

@rmorshea This PR is still a draft, I have a bit more to work on.

I will mark as "Ready for review" when complete.

@Archmonger Archmonger marked this pull request as ready for review June 24, 2022 00:58
@Archmonger Archmonger requested a review from rmorshea June 24, 2022 00:58
@Archmonger Archmonger linked an issue Jun 24, 2022 that may be closed by this pull request
@Archmonger Archmonger changed the title Static CSS and JS components Deferred static files Jun 24, 2022
@Archmonger
Copy link
Contributor Author

@rmorshea Would you have time to review this weekend?

@rmorshea
Copy link
Contributor

I'll try to get to this today or tomorrow.

@Archmonger Archmonger mentioned this pull request Jun 29, 2022
3 tasks
@rmorshea
Copy link
Contributor

apologies. i will make time tomorrow

Copy link
Contributor

@rmorshea rmorshea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor things here and there. Besides that, LGTM!

Archmonger and others added 6 commits June 30, 2022 21:39
Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
@Archmonger
Copy link
Contributor Author

Can't merge without re-approval.

@Archmonger Archmonger merged commit 18a419f into reactive-python:main Jul 1, 2022
@Archmonger Archmonger deleted the static-css branch July 1, 2022 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Welcome Message" CI Workflow
2 participants