-
Notifications
You must be signed in to change notification settings - Fork 46
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
Import all sprites in the project #10680
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10680 +/- ##
==========================================
- Coverage 81.93% 81.92% -0.01%
==========================================
Files 1083 1083
Lines 107554 107553 -1
Branches 741 741
==========================================
- Hits 88124 88118 -6
- Misses 19389 19394 +5
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
How large are these new assets? |
When taking the largest on my computer (@2x, I suppose this would be the same for most users), that used to be hosted separately
You can see in the diff on github the size reduction for the existing sprites (~40%) |
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.
You are using way too much sprites.
For example all "Arret *" are not used at all (referenced only in SignalsName.ts
).
It's annoying to put all sprites under signal_sprites
when some are not signals (e.g. “HEURTOIR”).
- We could rename this folder to `sprites.
- We could move the default sprites in another folder.
f60ec38
to
49bb8e2
Compare
Thank you for the feedback
As a result, the served PNG is now less than 300kb big, and of course we need less space in the repo |
49bb8e2
to
e6861f3
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.
LGTM, I wonder if we want to keep the blueprint style. It was there to visualize the infra schematic (which no longer exists).
We should ask @thibautsailly. If it's not essential to keep this style, we could drop all the blue sprites.
e6861f3
to
6227130
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.
Lgtm and tested, sprites are still there :) (except the remaining error for etcs)
6227130
to
fcb377b
Compare
7283410
to
0e963e6
Compare
They are now built either during the docker build Or must be generated by hand as described in the readme Signed-off-by: Tristram Gräbener <[email protected]>
…rch in subdirectories Signed-off-by: Tristram Gräbener <[email protected]>
0e963e6
to
c0f4b22
Compare
We added signals that are no longer only for signals Signed-off-by: Tristram Gräbener <[email protected]>
…fn-svg Signed-off-by: Tristram Gräbener <[email protected]>
This reduces a dependency to an external server The sprites are also smaller 0.41Mb instead of 1.2Mb for the default sprite @2x Signed-off-by: Tristram Gräbener <[email protected]>
The source is https://github.com/Nakaner/railway-signals/ The licence is CC-0, so we are good Signed-off-by: Tristram Gräbener <[email protected]>
c0f4b22
to
8caf39b
Compare
Ref #10627
What does this pull request do
This pull requests imports the sprites to have them locally instead of a remote server (4f6659c)
We also change the tool to generate. This reduces a bit the size of the generated atlas and is — arguably — a little bit easier to use 92a75ff
The front now uses those new sprites f60ec38
Benefits
How to test
There should be no behavior change.
Navigate through the map with the signal layer on. See in the console if there are no missing sprites and in the network tools that all
sprites
files are correctly loaded from the osrd server and no longer https://static.osm.osrd.fr/sprites/spritesIn editoast, run generate-atlas.sh (it shouldn’t change anything, but output what atlases have been generated). This requires spreet (
cargo install spreet
)