Code Monkey home page Code Monkey logo

Comments (15)

justeen35 avatar justeen35 commented on May 28, 2024 2

Hi, just tested that it works 👍

You might want to add this to documentation https://devdocs.prestashop.com/ I add trouble finding this

from prestashop-ui-kit.

NeOMakinG avatar NeOMakinG commented on May 28, 2024 2

@PrestaShop/prestashop-modules do you've some modules using the UIKit ?

from prestashop-ui-kit.

NeOMakinG avatar NeOMakinG commented on May 28, 2024 1

@TheTakylo import it by using npm install --save prestakit, then import it inside a scss selector like this :

#myModulePageSelector {
  @import '~prestakit/dist/bootstrap-prestashop-ui-kit.css';
}

That should be fine and override the style from the BO, I think that's how the module team does...

I agree that's dirty as hell, but we're trying to improve that :)

from prestashop-ui-kit.

JS-starlord avatar JS-starlord commented on May 28, 2024 1

@justeen35 sorry for the late answer, I think I'm gonna work on that after the next uikit release which will be way complete and reusable!

Any news about the release of the next uikit ?

from prestashop-ui-kit.

TheTakylo avatar TheTakylo commented on May 28, 2024

Is there a solution ? Because even when importing css / js files there are style conflicts with PrestaShop
Capture d’écran_2020-02-15_13-55-59

from prestashop-ui-kit.

matks avatar matks commented on May 28, 2024

Ping @NeOMakinG

from prestashop-ui-kit.

NeOMakinG avatar NeOMakinG commented on May 28, 2024

On legacy page, how the module team does is that they import the UIKit inside a new parent class/id, so they only have the last uikit release on their app without creating conflict with the existing BO style @TheTakylo

from prestashop-ui-kit.

TheTakylo avatar TheTakylo commented on May 28, 2024

@NeOMakinG Okay, so how can I make it look the same as here for example

from prestashop-ui-kit.

NeOMakinG avatar NeOMakinG commented on May 28, 2024

@justeen35 sorry for the late answer, I think I'm gonna work on that after the next uikit release which will be way complete and reusable!

from prestashop-ui-kit.

NeOMakinG avatar NeOMakinG commented on May 28, 2024

@JS-starlord It's released

PrestaShop/PrestaShop#18396 currently working on the BO theme to use source files!

from prestashop-ui-kit.

JS-starlord avatar JS-starlord commented on May 28, 2024

Is it possible to use uikit without entering in conflict with Prestashop BO's bootstrap ? If i compare popovers on ui storybook and popovers on my module, there is clearly a visual difference (see attachment). How can i get the exact same visual of prestaui kit when developing a module ?

on my module's back-office :

Capture d’écran 2021-01-19 165400

on https://build.prestashop.com/prestashop-ui-kit/?path=/docs/popovers--popovers
image

from prestashop-ui-kit.

NeOMakinG avatar NeOMakinG commented on May 28, 2024

I think @PrestaShop/prestashop-modules team does include the UIKit inside a specific selector in order to override the default theme bootstrap on a legacy controller

from prestashop-ui-kit.

JS-starlord avatar JS-starlord commented on May 28, 2024

I don't see any prestashop official modules using uikit, do you have some hint to guide me ? I have try to put my uikit import in a body selector for my module, but it's don't seem to totally override the default theme

from prestashop-ui-kit.

alisamie97 avatar alisamie97 commented on May 28, 2024

@TheTakylo import it by using npm install --save prestakit, then import it inside a scss selector like this :

#myModulePageSelector {
  @import '~prestakit/dist/bootstrap-prestashop-ui-kit.css';
}

That should be fine and override the style from the BO, I think that's how the module team does...

I agree that's dirty as hell, but we're trying to improve that :)

i tried but no changes. i installed prestashop-ui-kit by npm in /<myshop>/modules/<mymodule>/src/
and it created node_modules directory

then i made a file named back.scss and loaded it in module config page like this: $this->context->controller->addCSS('back.scss') and checked through view page source and it is loaded

then i write this part you mentioned
#myModulePageSelector { @import '~prestakit/dist/bootstrap-prestashop-ui-kit.css'; }
not working and tried this
#myModulePageSelector { @import '../../node_modules/prestakit/dist/bootstrap-prestashop-ui-kit.css'; }

from prestashop-ui-kit.

NeOMakinG avatar NeOMakinG commented on May 28, 2024

Hey @stifler97, did you properly add the selector (might be stupid but I prefer to ask)?

Also, $this->context->controller->addCSS('back.scss') won't work, you need a preprocessor such as Webpack to "compile" the SCSS in order to import the CSS

from prestashop-ui-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.