Coder Social home page Coder Social logo

cartoassets's Introduction

CartoAssets NPM version

Share frontend assets between different CartoDB repositories

Installation

As easy as:

Build

If you want to use any of the CartoAssets components, after the installation just run:

  • grunt build

Development

It will generate a UI documentation about the components in this repository:

  • grunt dev

If you want to check the documentation, it is generated in the dist folder.

How to add/update the icon font

See this instructions

Publish a new version in NPM

In order to publish a new version of CartoAssets you need to:

  • Change version of the package.
  • Be a collaborator of the npm module (Send an email to xavijam[at]cartodb.com).

If you have these previous steps done:

  • npm publish

Publish CartoAssets styleguide and documentation in GH-Pages

Just run this command:

  • grunt publish

Browser support

Chrome Firefox IE Opera Safari
31+ ✔ 38+ ✔ 11+ ✔ 31+ ✔ 8+ ✔

cartoassets's People

Contributors

alonsogarciapablo avatar elenatorro avatar iagolast avatar javierarce avatar jesus89 avatar jesusbotella avatar mariacheca avatar matallo avatar nobuti avatar piensaenpixel avatar rjimenezda avatar rubenmoya avatar saleiva avatar victorvelarde avatar viddo avatar xavijam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cartoassets's Issues

prepare proposal for grid

  • Add automatic margin helpers (for/loop, $baseSpace: 2px, [s, m , l, h]).
  • Create base grid helpers (CDB-ColX).

Review CDB-Button sub classes

  • Check CDB-Button-Text class, text should be in lower case.
  • We should remove CDB-Text due to the fact that we already have a CDB-Button-(T)ext class, or viceversa.
<button class="CDB-Button CDB-Button--primary">
  <span class="CDB-Button-text is-semibold CDB-Size-medium">SAVE</span>
</button>

Add namespace to SCSS folders

The method we are going to use to import specific files from CartoAssets uses an entry file to load the SCSS (see for example the one for DeepInsights here)

In the following example, we are importing the sizes & mixins files from CartoAssets, but the developer could be mislead and think that those libraries come from the local project and not CartoAssets:

// Variables and functions
@import 'variables/sizes';
@import 'utilities/mixins';
// Deep-insights styles
@import 'map/canvas';
@import 'map/dashboard-info';

I think it would make sense to add a namespace to the variables, utilities, etc. folders in order to avoid confusion.

We would have something like this instead:

// Variables and functions
@import 'cdb-variables/sizes';
@import 'cdb-utilities/mixins';
// Deep-insights styles
@import 'map/canvas';
@import 'map/dashboard-info';

What do you think, @xavijam, @piensaenpixel, @matallo, & @viddo?

Add new reset styles

The background-color, border, border-radius, and padding for buttons, both button element and input with types button, submit and reset has changed in chrome for the macOS version, we should add resets for this properties since right now it's breaking builder's UI:

screen shot 2017-10-20 at 12 46 51

The summary of changes:

Before these CLs, the default style for buttons was:
  background-color: ButtonFace; (-> #C0C0C0)
  border: 2px outset ButtonFace;
  padding: 2px 6px 3px 6px;

After these CLs, it is:
  background-color: ButtonFace; (-> #FFFFFF)
  border-color: #D8D8D8 #D1D1D1 #BABABA;
  border-radius: 4px;
  border-style: solid;
  border-width: 1px;
  padding: 1px 7px 2px 7px;

More info about this changes: https://www.chromestatus.com/features/5743649186906112

Add common icon-font

To take into account:

  • is Editor icon-font a good start?
  • should we place the icon-font generated? or should it generated in every module/repository?

update README.md

  • following instructions in the README.mdthere was a missing npm install step which keep showing

npm WARN [email protected] requires a peer of grunt@~0.4.5 but none was installed. npm WARN [email protected] requires a peer of grunt@~0.4.0 but none was installed. npm WARN [email protected] requires a peer of grunt@~0.4.0 but none was installed. npm WARN [email protected] requires a peer of grunt@~0.4.1 but none was installed.

u-tSpace-xl is wrong

Rest of modifiers are --x whatever, but only that one is with -xl. Please let's change it and change the references in CARTO builder too.

Add release process / versioning

Right now we're using CartoAssets#master in the package.json in Builder, which could lead to problems if we merge/deploy things without caution. We should start versioning CartoAssets the same way we do in cartodb.js and deep-inisghts.js, using semver, creating git tags, and maybe publishing it to npm to get the full power of semver.

At the same time, we could review the tools/build process used in CartoAssets and try to improve it.

Pinging @Jesus89 since he's the one who created the release process document.

"Hollow" icons do not show up correctly on Linux

This is how the icon font is shown on Linux (Firefox or Chrome):

screenshot_20160607_120510

Notice that the two hearts icons (first row) look the same or the download icon (second row) is shown as a circle (without the white arrow inside). There are more examples. In general, icons that have a white drawing on a black background are not displayed correctly.

cc @xavijam

Possibility to require some (not all) assets

For the moment, if any repository/module needs CartoAssets, we have to require everything, without restriction, in order to avoid compatibility problems.

For example, for scss files within a scss grunt task:

...
    dist: {
        options: {
          sourceMap: false,
          outputStyle: 'compressed'
        },
        files: [{
          expand: true,
          src: [
            'node_modules/cartoassets/src/scss/**/*.scss',
            'node_modules/perfect-scrollbar/**/*.scss',
            'themes/scss/**/*.scss'
          ],
          dest: '.tmp/scss',
          ext: '.css'
        }]
      }
...

In the future would be great if user could decide which assets are necessary or not.

cc @viddo @javierarce

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.