-
Notifications
You must be signed in to change notification settings - Fork 273
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
customize the url where to load font and localization json files #1524
Comments
Hi @BubbleLeaf In the meantime, you could try this workaround: import { _registerMappingFunction } from "@ui5/webcomponents-base/dist/asset-registries/LocaleData.js";
_registerMappingFunction((locale) => {
return `https://unpkg.com/@ui5/[email protected]/dist/generated/assets/cldr/${locale}.json`
}); This lets you tell the framework where to look for CLDR files. Please let me know if this worked out for you. Regards, |
Regarding fonts, no way to configure this is present yet. We'll allow for this too. |
@vladitasev , et al., SuccessFactors has a need for this enhancement - in short, we need UI5 Web Components to use the same path to the font files that UI5 will eventually use to avoid the Browser from downloading 2 different versions of the same font files. Our page will start-up with no UI5 and at some random time UI5 will be added lazily only once something is loaded on the page that requires UI5 (such as a popup that the user activates from the header). In addition - during our analysis using Chrome Lighthouse tool, there was a recommendation to adjust the font-face. The suggestion was to add the following modifier to the font-face rule:
I don't know the full story behind this particular property, but you can research and if it makes sense maybe add this little thing as well. |
See https://web.dev/font-display/ for details on why Lighthouse suggests specifying |
I'm sorry to reply to your message so late. I just tried it works, thanks for your help. I'm looking forward to your next version。 |
@stoehr We tried |
Part of the solution: #1650 |
SuccessFactors doesn’t need the core UI5 WC code to specify the But I could imagine others wanting to have the option for having the core UI5 WC code specify |
Solution to customizing font location: Solution to customizing CLDR assets location: |
Is your feature request related to a problem? Please describe.
The CDN of SAP is good , but it`s unuseable in some scenarios . So I hope I can make decision where to load the resource .
The text was updated successfully, but these errors were encountered: