Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[AssetMapper] Only download a CSS file if it is explicitly advertised#52524

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

weaverryan
Copy link
Member

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesNone
LicenseMIT

When we download a JS package, we check to see if that JS package has a CSS file. And if it does, we add that too. This is purely to be helpful. For example,importmap:require bootstrap grabs the Bootstrap CSS file.

A JavaScript package can explicitly advertise that it has a CSS file or jsdelivr can "guess". It tells us if it's guessing or not:

I propose we only grab the CSS file if it's a "sure thing". Right now, when you installtom-select, it's grabbing a CSS file that... we certainly don't use and I'm not sure if anyone does. It'd be better if it grabbed nothing. And, if needed (probably will be), we an make Flex install any enabled "autoimports" - e.g.https://github.com/symfony/ux/blob/2.x/src/Autocomplete/assets/package.json#L17

Overall, I'm still tweaking with the ideal UX here. I think life will be better if we only install "for sure" CSS files.

Thanks!

evertharmeling reacted with thumbs up emoji
@weaverryanweaverryanforce-pushed theasset-mapper-only-exact-css-files branch from335c460 to1f41d67CompareNovember 10, 2023 02:35
@WebMamba
Copy link
Contributor

Just speaking from a DX perspective: I think we shouldALWAYS grab the CSS file. A lot of js packages have small CSS files, but without it, everything can look a bit buggy. And I think CSS is part of the packages, the maintainer chooses to add CSS in their packages, so we should follow this decision. And I think it's easier if we don't have to run two commands one to install the CSS and on for the Js.

@weaverryan
Copy link
MemberAuthor

And I think CSS is part of the packages, the maintainer chooses to add CSS in their packages, so we should follow this decision

I totally agree. But if that's the case, they will / should advertise that they have a CSS file - e.g. via thestyle key inpackage.json. If they haven't done this, then that's an indication that there is no one, main CSS file.

@fabpotfabpot merged commit541c80c intosymfony:6.4Nov 10, 2023
This was referencedNov 10, 2023
@weaverryanweaverryan deleted the asset-mapper-only-exact-css-files branchNovember 11, 2023 01:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

4 participants
@weaverryan@WebMamba@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp