Skip to content
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

feat: implement css injector in archetype #308

Merged
merged 9 commits into from
Aug 9, 2023

Conversation

CachedaCodes
Copy link
Contributor

@CachedaCodes CachedaCodes commented Aug 2, 2023

Implementation of the css injector in the archetype.

This PR should encapsulate the tailwindcss styles inside the x overlay.

Test it by setting a button with the class x-button in the index.html. When the injection is applied, it should look like a regular button. When it's not applied, it should have the styles of the X design system.

The injection only works with the build process, so run build:serve to see it.

package.json Outdated
@@ -31,7 +31,7 @@
"dependencies": {
"@empathyco/x-adapter": "^8.0.0-alpha.22",
"@empathyco/x-adapter-platform": "^1.0.0-alpha.79",
"@empathyco/x-archetype-utils": "^0.1.0-alpha.15",
"@empathyco/x-archetype-utils": "file:../x/packages/x-archetype-utils/empathyco-x-archetype-utils-1.0.0-alpha.2.tgz",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change with your generated build file

@CachedaCodes CachedaCodes marked this pull request as ready for review August 9, 2023 07:41
@CachedaCodes CachedaCodes requested a review from a team as a code owner August 9, 2023 07:41
@@ -108,7 +108,7 @@ const customCommands: CustomCommands = {
cy.typeQuery(query).type('{enter}');
});
},
typeQuery: query => cy.getByDataTest('search-input').type(query),
typeQuery: query => cy.getByDataTest('search-input').type(query, { force: true }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed but not desirable.
Seems to be working without forcing it in newer Cypress versions cypress-io/cypress#21433

@jenkins-empathy
Copy link

PR #308 preview deployed in https://x.test.empathy.co/preview/308/index.html

Copy link
Contributor

@annacv annacv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@annacv annacv merged commit 8245344 into main Aug 9, 2023
3 checks passed
@annacv annacv deleted the feature/EMP-1230-isolate-styles-with-shadow-dom branch August 9, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants