Repository navigation
fix: resolve stylesheets' relative urls next to their real file #8010
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
Open
benedikt-bartscher
wants to merge
34
commits into
reflex-dev:main
Choose a base branch
from
benedikt-bartscher:stylesheet-source-urls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
269c675
feat: add_page(stylesheets=...) for stylesheets only one page loads
benedikt-bartscher f2c7596
Merge remote-tracking branch 'github/main' into page-stylesheets
benedikt-bartscher 8771b81
docs: link the page stylesheet example from the assets root so the do…
benedikt-bartscher 1c67e57
docs: link the page stylesheet example from the assets root so the do…
benedikt-bartscher f626c69
Merge commit '1c67e57c82' into page-stylesheets
benedikt-bartscher a4bdb9a
fix: resolve stylesheets' relative urls next to their real file
benedikt-bartscher d39b5f9
Merge branch 'page-stylesheets' into stylesheet-source-urls
benedikt-bartscher 0416e78
fix: keep a page's stylesheets when its @rx.page function is added again
benedikt-bartscher 0a7f236
fix: compile a sass stylesheet named like another one to its own file
benedikt-bartscher 2ed603b
test: navigate client-side between the pages of the page stylesheet test
benedikt-bartscher 15e0b5a
test: compare the plain page's compiled output in full
benedikt-bartscher 3ebe036
Merge branch 'page-stylesheets' into stylesheet-source-urls
benedikt-bartscher 55b61bc
fix: never write compiled sass through a stylesheet link left in its …
benedikt-bartscher 072ccc5
test: compare the vite config in full and import its template at the top
benedikt-bartscher bbf8c69
fix: keep a page's stylesheets when its @rx.page function is added again
benedikt-bartscher d3ffa21
fix: compile a sass stylesheet named like another one to its own file
benedikt-bartscher d1179ac
test: navigate client-side between the pages of the page stylesheet test
benedikt-bartscher 945a824
test: compare the plain page's compiled output in full
benedikt-bartscher c2e2357
Merge commit '945a824083' into page-stylesheets
benedikt-bartscher 949b8c5
fix: never write compiled sass through a stylesheet link left in its …
benedikt-bartscher 30b4807
test: compare the vite config in full and import its template at the top
benedikt-bartscher 1efd55d
Merge branch 'page-stylesheets' into stylesheet-source-urls
benedikt-bartscher 7ed283f
Merge commit '30b4807cae' into stylesheet-source-urls
benedikt-bartscher 4d83a29
Merge branch 'main' into stylesheet-source-urls
benedikt-bartscher 2377cbc
Merge branch 'main' into page-stylesheets
benedikt-bartscher d72b9ba
fix: take a single page stylesheet given as a string as one stylesheet
benedikt-bartscher 29267f9
fix: give page hooks a page's stylesheets in backend-only compiles too
benedikt-bartscher c2d35c5
fix: load page stylesheets in an embedded app, which renders no <Links/>
benedikt-bartscher 24d84bc
docs: say what plugins see of page stylesheets in the reflex-base news
benedikt-bartscher 59c3190
Merge commit '24d84bcd1a' into page-stylesheets
benedikt-bartscher 85138f8
fix: replace a link when writing a compiled file instead of writing t…
benedikt-bartscher 64d81ab
test: skip the linked stylesheet build where symlinks need a privilege
benedikt-bartscher bef314e
Merge branch 'page-stylesheets' into stylesheet-source-urls
benedikt-bartscher 9a0709e
Merge commit '64d81aba7f' into stylesheet-source-urls
benedikt-bartscher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Relative `url()`s in stylesheets from the assets directory, including shared assets that `rx.asset(shared=True)` links in from a package, resolve next to the stylesheet's real file: the build bundles the fonts and images they name instead of leaving URLs that only work at some depths. The styles directory links each stylesheet instead of copying it, falling back to a copy where symlinks are unavailable, and the dev server may serve files under the app root. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| `add_page` and `@rx.page` take `stylesheets=`, stylesheets only that page loads, after the app's: `app.add_page(pricing, stylesheets=["/pages/pricing.css"])`. They take the same asset files and URLs as `rx.App(stylesheets=...)` and become the page's React Router `links`, so they are in the prerendered `<head>`, load before the page renders on client-side navigation and are removed when it is left, in an `EmbedPlugin` widget too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| A sass stylesheet named like another stylesheet next to it, such as `theme.scss` beside `theme.css`, no longer compiles to the same file in `.web/styles`, where whichever compiled last replaced the other: it keeps its suffix there, as `theme.scss.css`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| `vite_config_template` takes `fs_allow`, directories the dev server may serve besides its own root. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Plugins see a page's stylesheets: the `add_page` that `register_route` receives takes `stylesheets=`, and `PageContext.stylesheets` holds them. `page_template` takes `links`, which the route module exports as React Router's `links`, and an embedded app's entry renders them with their page, as it has no `<Links/>`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.