-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Move resourcepath logic onto serverside #2092
Comments
I've been looking into this and there's a couple of problems here:
We also need to consider other places in which resource URIs are manually resolved or
For (1.) - considering the bigger picture - I'd suggest the following plan:
Case (2.) can be easily solved by either passing the dummy image URI as configuration or add the Case (3.) is more complicated, I'm afraid. The What do you think of these suggestions? |
Other new hard coded resource uris like for the node creation dialog also cause problems: #3616 Would it be tooo inefficient to have an endpoint for those edgecase / consumer defined icons that will A) either directly redirect them or B) return the correct path?
|
I'd opt for B) with a We must be careful with that though and append all additional query parameters to the redirect location to allow for cache-busting. |
I am currently experimenting with B, and the first idea was a Schnapsidee as the request would be async and we wouldnt know what to do until the resource is loaded. Also two server roundtrips would be necessary. Additionally while looking into the help thumbnail i found that there were two different type of thumbnails: 1property help, this was a bit tricky as this option is currently not documented: properties:
title:
ui:
help:
message: "title"
thumbnail: resource://Neos.Neos/Images/dummy-image.svg 2on the node type level as documented here https://neos.readthedocs.io/en/stable/References/NodeTypeDefinition.html#nodetype-definition-reference ui:
help:
message: "node type"
# note that we need the /Public/ part here!!! But the documentation above is also wrong :D
thumbnail: resource://Neos.Neos/Public/Images/dummy-image.svg The "global" help will be actually resolved on the server and additionally there is more magic in
This was introduced via: |
Update August 2024So there have been now lots of discussions regarding this topic some directly with seb and Wilhelm some on GitHub and slack but its all spread out. So im going to conclude what our current approach to fix this issue in the longterm is: We decided against any client based While we shortly evaluated using sprite svg to bundle all svgs efficiently it turned out to be rather complex in comparison to the gain - which would be bundle size and improved loading. As discussed in #3695 (comment) its simply not worth to use svg sprite for 4!!! icons and we will rather see to it how we can make font awesome more bundle friendly as it currently takes up 1.2mb (one third!!!) of the whole bundle. Step 1So our first step is to inline svgs in the final bundle which are hardcoded. Step 2As second step we will enhance the |
As mentioned in this PR: #2087 (comment)
The logic to transform resource uris from
yaml
files should be moved onto the server side as the current one can lead to errors.The text was updated successfully, but these errors were encountered: