Git Product home page Git Product logo

prestashop-ui-kit's Issues

Issues in develop branch

I found some issues while browsing the preview on the develop branch:

  1. Low contrast link color in informational alert:

Screenshot 2020-08-03 at 17 07 59

  1. Blue link in green alert, again low contrast (and arguably ugly :P)

Screenshot 2020-08-03 at 17 08 44

  1. Low contrast in description text & icon color

Screenshot 2020-08-03 at 17 09 42

  1. The warning text is low contrast; the warning color background looks a little "muddy" to me, perhaps we should pick a more orangey yellow instead.

Screenshot 2020-08-03 at 17 10 14

  1. The warning badge looks even more muddy

Screenshot 2020-08-03 at 17 11 54

  1. The warning buttons suffer from the same color/contrast problems:

Screenshot 2020-08-03 at 17 12 40

  1. Again, low contrast:

Screenshot 2020-08-03 at 17 13 51

  1. Rounded background in the selected pill looks weird:

Screenshot 2020-08-03 at 17 14 52

How to use it in our PS module ?

Hi,

in the README you say:

Note: If you use PrestaShop, there's no need to install – the UI kit is already installed in PrestaShop.

But when I copy/paste some code from http://build.prestashop.com/prestashop-ui-kit like the select box component into my configure.tpl file I get the old design and not the one from PSUI.

Do we have to do something special to use it in our module development ?

Regards

Replace tooltips icon

We are currently using the same icon for our tooltips and info alerts which is called "info". Also this icon looks a lot like the icon used for danger alert which is called "error". To prevent any type of dyslexia or to avoid confusing both icons between each other, it will be better to replace the tooltips icon by the one called "help". It's more representative of the feature.

See the difference

Before:
tooltips-before

After:
tooltips-after

Usage in module

Is it possible to use this a module which uses Symfony pages for the back office without having to compile anything via npm?

If I add a component to my twig template, it seems to render as expected, however JS does not seem to work on it, for example, toggling behaviours do not work.

For example, when using a dropdown button and the button is clicked, the following JS error appears in the browser:

main.bundle.js:629 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'ownerDocument')
at P (main.bundle.js:629:6759)
at F (main.bundle.js:629:7163)
at e.W (main.bundle.js:629:8375)
at e.value (main.bundle.js:629:20374)
at main.bundle.js:629:346

Am I missing something?

Operator outside calc scope

The file bootstrap-prestashop-ui-kit.css either from the npm repo or the cdn has an error.

height:calc(1.751rem + 2px)-2;

This causes that when you use a CSS preprocessor to make the kit works with your own custom modules.
#66 (comment)

This is the error that appears when you try to import it in a sass.
ima03fK57O

Buttons: white text on cyan background fails the simplest contrast test (WCAG:AA)

Readability and accessibility

Readability and accessibility are paramount these days and companies get fined for not complying with accessibility basic rules (in the US and soon in Europe)

Acccessibility issue

The buttons used in PrestaShop UI kit fail the simplest contrast test (WCAG:AA) Foreground:#FFFFFF background:#2eb9d7

https://color.a11y.com/ContrastPair/?bgcolor=2eb9d7&fgcolor=ffffff

image

Fix proposition

One way to fix this would be to use the purple that's available in PrestaShop's colors #442CC7 ensuring a good contrast between the text and the background

https://color.a11y.com/ContrastPair/?bgcolor=442CC7&fgcolor=ffffff

image

use github-pages to have a live overview

We should setup the main branch for "github-pages" feature, in order to provide a live overview.

Then we update the readme.md with a link. This way it will be easy for anyone to look at it, without using rawgit or other stuff like that.

prestashop admin theme conflicts (prestashop ui kit does not work properly)

What i did:
I opened this guide
Copied some sample code
Then pasted in configure.tpl of my custom module.

The result:
It has no effect. its like styles do not exist in prestashop admin theme.

Then what i did:
I downloaded prestashop ui kit with npm.
Added these lines:
<link href="{$css_dir}" rel="stylesheet">
<script src="{$js_dir}"></script>
It shows some changes but it has lots of conflicts with admin theme.

This is an image of what expected:
image

This is an image of result:
image

btn-light has wrong text color

Problem
Button element in the UI kit has wrong color in btn-light variant.

Desired look
btn-light should have dark text.

How to reproduce
Insert <button type="button" class="btn btn-light">Light</button> anywhere in BO.

Screenshot
image

Enhancement: size of the invalid state

Hello,

I suggest to increase the font-size of the validation message.
For now, the font-size compute to 10px.

It comes from the mixin @mixin ps-form-validation-state($state, $color) in scss/mixins/_forms.scss

@mixin ps-form-validation-state($state, $color) {
  .form-control.is-#{$state},
  .is-#{$state} {
    border-color: $color;

    &:focus {
      box-shadow: none;
    }
  }

  .#{$state}-feedback {
    margin-top: 0.3125rem;
    font-size: $font-size-xs;
    font-weight: $font-weight-bold;
    color: $color;
  }
}

The variable $font-size-xs is defined in scss/_variables.scss:
The value is:

$font-size-xs: 0.625rem; // PS custom

What do you think about increasing the computed value to 12px instead?

Improvements: Removing link styling for links styled as button in alert

Hello there,
Sorry for the long title, but I couldn't find a way to phrase it better.

Issue:

When one uses an anchor tag <a> with the class .btn in an alert, the button will be underlined and the color won't be the one from the class .btn.

Markup:

<div class="alert alert-info" role="alert">
  <p class="alert-text">
    This is a info alert with <a href="#">an example link</a>. Click me to delete
  </p>
  <div>
    <a href="//google.com" class="btn btn-secondary">
      I'm an a tag
    </a>
  </div>
</div>

How it looks:

image

How it should look:

image

Fix suggested:

In _alert.scss, replace line 10:

From:

  a {

To:

  a:not(.btn) {

I can't think of any potential issue with this fix, let me know what you think about it.
Thank you :)

LICENSE file missing ?

package.json mentions OSL license but the file is not in the repo. Should we add the file?

Add a ColorPicker to UI Kit

After discussion with @MatShir, @PrestaShop/ux-team could you design a colorpicker ?

After that, I will work on its implementation. Thanks for advance

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.