Skip to content

Comments

[4.0] Load webcomponents with asset manager#27418

Merged
wilsonge merged 1 commit intojoomla:4.0-devfrom
Fedik:asset-wc2
Jan 7, 2020
Merged

[4.0] Load webcomponents with asset manager#27418
wilsonge merged 1 commit intojoomla:4.0-devfrom
Fedik:asset-wc2

Conversation

@Fedik
Copy link
Member

@Fedik Fedik commented Jan 6, 2020

Summary of Changes

This will load webcomponents with asset manager.

Testing Instructions

Apply patch run npm install
Click around, try create/edit content, all should work as before.

Expected result

Everything works

Actual result

Everything works

Documentation Changes Required

Need to update Asset documentation to describe how to add webcomponent to it.

ping @wilsonge

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.0-dev labels Jan 6, 2020
@jwaisner
Copy link
Member

jwaisner commented Jan 6, 2020

I have tested this item ✅ successfully on 0afe53a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27418.

@dgrammatiko
Copy link
Contributor

@Fedik are you also covering this hidden functionality:

self::_('stylesheet', str_replace('.js', '.css', $file), $options);

@Fedik
Copy link
Member Author

Fedik commented Jan 6, 2020

nope, it not hidden now
it need to explicitly call to the style if webcomponent have a style, eg:

Factory::getDocument()->getWebAssetManager()
->useStyle('webcomponent.field-simple-color')
->useScript('webcomponent.field-simple-color');

@dgrammatiko
Copy link
Contributor

much better 👍

@wilsonge wilsonge merged commit 5964578 into joomla:4.0-dev Jan 7, 2020
@wilsonge
Copy link
Contributor

wilsonge commented Jan 7, 2020

Thanks!

1 similar comment
@wilsonge
Copy link
Contributor

wilsonge commented Jan 7, 2020

Thanks!

@wilsonge wilsonge added this to the Joomla 4.0 milestone Jan 7, 2020
@Fedik Fedik deleted the asset-wc2 branch January 7, 2020 17:40
@Fedik
Copy link
Member Author

Fedik commented Jan 8, 2020

brianteeman pushed a commit to brianteeman/joomla-cms that referenced this pull request Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants